diff --git a/Makefile b/Makefile index 9501a1a..6026723 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,31 @@ -.PHONY: install example - -install: - go install github.com/golang/protobuf/protoc-gen-go - protoc --go_out=paths=source_relative:./pb -I=./pb ./pb/*.proto - go install ./protoc-gen-gql - go install ./protoc-gen-gogqlgen - go install ./protoc-gen-gqlgencfg - -example: - protoc \ - --go_out=plugins=grpc,paths=source_relative:. \ - --gqlgencfg_out=paths=source_relative:. \ - --gql_out=svcdir=true,paths=source_relative:. \ - --gogqlgen_out=paths=source_relative,gogoimport=false:. \ - -I=. -I=./example/ ./example/*.proto - -example2: - protoc --go_out=plugins=grpc,paths=source_relative:. -I=. -I=./reflect/examples/optionsserver/pb/ ./reflect/examples/optionsserver/pb/*.proto +# Go tools dependencies +GO_TOOLS := \ + google.golang.org/grpc/cmd/protoc-gen-go-grpc \ + google.golang.org/protobuf/cmd/protoc-gen-go \ + github.com/99designs/gqlgen \ + ./protoc-gen-gql \ + ./protoc-gen-gogql + +GOPATH := $(shell go env GOPATH) + +.PHONY: all +all: all-tools pb/graphql.pb.go + +.PHONY: all-tools +all-tools: ${GOPATH}/bin/protoc go-tools + +.PHONY: go-tools +go-tools: $(foreach l, ${GO_TOOLS}, ${GOPATH}/bin/$(notdir $(l))) + +define LIST_RULE +${GOPATH}/bin/$(notdir $(1)): go.mod + go install $(1) +endef + +$(foreach l, $(GO_TOOLS), $(eval $(call LIST_RULE, $(l) ))) + +pb/graphql.pb.go: ./pb/graphql.proto all-tools + protoc --go_out=paths=source_relative:. ./pb/graphql.proto + +${GOPATH}/bin/protoc: + ./scripts/install-protoc.sh diff --git a/Readme.md b/Readme.md index ace6f2a..56265fa 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ -Protoc plugins for generating graphql schema +Protoc plugins for generating graphql schema and go graphql code -If you use micro-service architecture with grpc for backend and graphql api gateway for frontend you will find yourself +If you use micro-service architecture with grpc for back-end and graphql api gateway for front-end, you will find yourself repeating a lot of code for translating from one transport layer to another (which many times may be a source of bugs) This repository aims to simplify working with grpc trough protocol buffers and graphql by generating code. @@ -10,8 +10,7 @@ Install: ```sh go install github.com/danielvladco/go-proto-gql/protoc-gen-gql -go install github.com/danielvladco/go-proto-gql/protoc-gen-gogqlgen -go install github.com/danielvladco/go-proto-gql/protoc-gen-gqlgencfg +go install github.com/danielvladco/go-proto-gql/protoc-gen-gogql ``` Usage Examples: @@ -23,7 +22,7 @@ export PATH=${PATH}:${GOPATH}/bin ``` --- -`--gql_out` plugin will generate graphql files with extension .graphqls +`--gql_out` plugin will generate graphql files with extension `.graphqls` rather than go code which means it can be further used for any other language or framework. Example: @@ -36,38 +35,28 @@ http://github.com/99designs/gqlgen plugin, and map all the generated go types wi Luckily `--gqlgencfg_out` plugin does exactly this. --- -`--gqlgencfg_out` plugin generates yaml configs that can be used further by the http://github.com/99designs/gqlgen library. - -Example: -```sh -protoc --gqlgencfg_out=paths=source_relative:. -I=. -I=./example/ ./example/*.proto -``` - -The generated go code will work fine if you don't have any `enum`s, `oneof`s or `map`s. For this purpose use `--gogqlgen_out` plugin. - ---- -`--gogqlgen_out` plugin generates generates methods for implementing +`--gogql_out` plugin generates methods for implementing `github.com/99designs/gqlgen/graphql.Marshaler` and `github.com/99designs/gqlgen/graphql.Unmarshaler` interfaces. Now proto `enum`s, `oneof`s and `map`s will work fine with graphql. This plugin also creates convenience methods that will implement generated by the `gqlgen` `MutationResolver` and `QueryResolver` interfaces. -NOTE: to generate with gogo import add `gogoimport=true` as a parameter - Example: ```sh -protoc --gogqlgen_out=gogoimport=false,paths=source_relative:. -I=. -I=./example/ ./example/*.proto +protoc --gogql_out=gogoimport=false,paths=source_relative:. -I=. -I=./example/ ./example/*.proto ``` --- See `/example` folder for more examples. -TODO: -- Create a better implementation of `map`s and `oneof`s. -- Add comments from proto to gql for documentation purposes. -- Add more documentation. +## Gateway (alpha) +A unified gateway is also possible. Right now a gateway can be spawn up +pointing to a list of grpc endpoints (grpc reflection must be enabled on the grpc servers). +The gateway will query the servers for protobuf descriptors and generate a graphql schema abstract tree. +The requests to the gateway will be transformed on the fly to grpc servers without any additional code generation +or writing any code at all. See `examples/gateway` for usage more info. ## Community: -I am one on this. Will be very glad for any contributions so feel free to create issues and forks. +Will be very glad for any contributions so feel free to create issues, forks and PRs. ## License: diff --git a/reflect/gateway/server.go b/cmd/gateway/main.go similarity index 89% rename from reflect/gateway/server.go rename to cmd/gateway/main.go index f470c58..56cf003 100644 --- a/reflect/gateway/server.go +++ b/cmd/gateway/main.go @@ -4,15 +4,16 @@ import ( "context" "encoding/json" "flag" - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/generator" "log" "net/http" "os" - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/server" "github.com/mitchellh/mapstructure" "github.com/nautilus/gateway" "github.com/nautilus/graphql" + + "github.com/danielvladco/go-proto-gql/pkg/generator" + "github.com/danielvladco/go-proto-gql/pkg/server" ) type Config struct { @@ -46,16 +47,14 @@ func main() { log.Fatal(err) } - //gqlDesc := server.GenerateGQLComponents(res, descs) - gqlDesc, err := generator.NewSchemas(descs, true) + gqlDesc, err := generator.NewSchemas(descs, true, true) fatalOnErr(err) - repo := generator.NewInmemRepository(gqlDesc) + repo := generator.NewRegistry(gqlDesc) queryFactory := gateway.QueryerFactory(func(ctx *gateway.PlanningContext, url string) graphql.Queryer { return server.QueryerLogger{server.NewQueryer(repo, caller)} }) - sources := []*graphql.RemoteSchema{{URL: "url1"}} sources[0].Schema = gqlDesc.AsGraphql()[0] diff --git a/cmd/protogql/main.go b/cmd/protogql/main.go new file mode 100644 index 0000000..a360296 --- /dev/null +++ b/cmd/protogql/main.go @@ -0,0 +1,94 @@ +package main + +import ( + "flag" + "log" + "os" + "path" + "path/filepath" + "strings" + + "github.com/jhump/protoreflect/desc/protoparse" + "github.com/vektah/gqlparser/v2/formatter" + + "github.com/danielvladco/go-proto-gql/pkg/generator" +) + +type arrayFlags []string + +func (i *arrayFlags) String() string { + return "str list" +} + +func (i *arrayFlags) Set(value string) error { + *i = append(*i, value) + return nil +} + +var ( + importPath = arrayFlags{} + fileNames = arrayFlags{} + svc = flag.Bool("svc", false, "") + merge = flag.Bool("merge", false, "") +) + +func main() { + flag.Var(&importPath, "I", "path") + flag.Var(&fileNames, "f", "path") + flag.Parse() + + newFileNames, err := protoparse.ResolveFilenames(importPath, fileNames...) + if err != nil { + log.Fatal(err) + } + descs, err := protoparse.Parser{ImportPaths: importPath}.ParseFiles(newFileNames...) + if err != nil { + log.Fatal(err) + } + gqlDesc, err := generator.NewSchemas(descs, *merge, *svc) + if err != nil { + log.Fatal(err) + } + for _, schema := range gqlDesc { + if len(schema.FileDescriptors) < 1 { + log.Fatalf("unexpected number of proto descriptors: %d for gql schema", len(schema.FileDescriptors)) + } + if len(schema.FileDescriptors) > 1 { + if err := generateFile(schema, true); err != nil { + log.Fatal(err) + } + break + } + if err := generateFile(schema, *merge); err != nil { + log.Fatal(err) + } + } +} + +func generateFile(schema *generator.SchemaDescriptor, merge bool) error { + sc, err := os.Create(resolveGraphqlFilename(schema.FileDescriptors[0].GetName(), merge)) + if err != nil { + return err + } + defer sc.Close() + + formatter.NewFormatter(sc).FormatSchema(schema.AsGraphql()) + return nil +} + +func resolveGraphqlFilename(protoFileName string, merge bool) string { + if merge { + gqlFileName := "schema.graphqls" + absProtoFileName, err := filepath.Abs(protoFileName) + if err == nil { + protoDirSlice := strings.Split(filepath.Dir(absProtoFileName), string(filepath.Separator)) + if len(protoDirSlice) > 0 { + gqlFileName = protoDirSlice[len(protoDirSlice)-1] + ".graphqls" + } + } + protoDir, _ := path.Split(protoFileName) + return path.Join(protoDir, gqlFileName) + } + + return strings.TrimSuffix(protoFileName, path.Ext(protoFileName)) + ".graphqls" +} diff --git a/example/codegen/Makefile b/example/codegen/Makefile new file mode 100644 index 0000000..4f02a03 --- /dev/null +++ b/example/codegen/Makefile @@ -0,0 +1,22 @@ +.PHONY: generate start + +start: generate + go run ./main.go + +generate: gql/constructs/generated.go gql/options/generated.go + +pb/%.gqlgen.pb.go: pb/%.proto pb/%_grpc.pb.go pb/%.pb.go + protoc --gogql_out=paths=source_relative:. -I . -I ../../ ./pb/$*.proto + +pb/%_grpc.pb.go: pb/%.proto pb/%.pb.go + protoc --go-grpc_out=paths=source_relative:. -I . -I ../../ ./pb/$*.proto + +pb/%.pb.go: pb/%.proto + protoc --go_out=paths=source_relative:. -I . -I ../../ ./pb/$*.proto + +pb/%.graphqls: pb/%.proto + protoc --gql_out=svc=true:. -I . -I ../../ ./pb/$*.proto + +gql/%/generated.go: pb/%.graphqls pb/%.gqlgen.pb.go + gqlgen --config ./gqlgen-$*.yaml + diff --git a/example/codegen/gql/constructs/generated.go b/example/codegen/gql/constructs/generated.go new file mode 100644 index 0000000..e02a68b --- /dev/null +++ b/example/codegen/gql/constructs/generated.go @@ -0,0 +1,13623 @@ +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. + +package constructs + +import ( + "bytes" + "context" + "errors" + "fmt" + "strconv" + "sync" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/introspection" + "github.com/danielvladco/go-proto-gql/example/codegen/pb" + "github.com/danielvladco/go-proto-gql/pkg/types" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// region ************************** generated!.gotpl ************************** + +// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. +func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { + return &executableSchema{ + resolvers: cfg.Resolvers, + directives: cfg.Directives, + complexity: cfg.Complexity, + } +} + +type Config struct { + Resolvers ResolverRoot + Directives DirectiveRoot + Complexity ComplexityRoot +} + +type ResolverRoot interface { + Maps() MapsResolver + Mutation() MutationResolver + Oneof() OneofResolver + Query() QueryResolver + MapsInput() MapsInputResolver + OneofInput() OneofInputResolver +} + +type DirectiveRoot struct { + Constructs func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Oneof_Oneof1 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Oneof_Oneof2 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Oneof_Oneof3 func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) +} + +type ComplexityRoot struct { + Baz struct { + Param1 func(childComplexity int) int + } + + Foo struct { + Param1 func(childComplexity int) int + Param2 func(childComplexity int) int + } + + FooFoo2 struct { + Param1 func(childComplexity int) int + } + + GoogleProtobufTimestamp struct { + Nanos func(childComplexity int) int + Seconds func(childComplexity int) int + } + + Maps struct { + BoolBool func(childComplexity int) int + Fixed32Fixed32 func(childComplexity int) int + Fixed64Fixed64 func(childComplexity int) int + Int32Int32 func(childComplexity int) int + Int64Int64 func(childComplexity int) int + Sfixed32Sfixed32 func(childComplexity int) int + Sfixed64Sfixed64 func(childComplexity int) int + Sint32Sint32 func(childComplexity int) int + Sint64Sint64 func(childComplexity int) int + StringBar func(childComplexity int) int + StringBytes func(childComplexity int) int + StringDouble func(childComplexity int) int + StringFloat func(childComplexity int) int + StringFoo func(childComplexity int) int + StringString func(childComplexity int) int + Uint32Uint32 func(childComplexity int) int + Uint64Uint64 func(childComplexity int) int + } + + MapsBoolBoolEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsFixed32Fixed32Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsFixed64Fixed64Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsInt32Int32Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsInt64Int64Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsSfixed32Sfixed32Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsSfixed64Sfixed64Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsSint32Sint32Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsSint64Sint64Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsStringBarEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsStringBytesEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsStringDoubleEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsStringFloatEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsStringFooEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsStringStringEntry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsUint32Uint32Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + MapsUint64Uint64Entry struct { + Key func(childComplexity int) int + Value func(childComplexity int) int + } + + Mutation struct { + ConstructsAny func(childComplexity int, in *anypb.Any) int + ConstructsCallWithID func(childComplexity int) int + ConstructsEmpty func(childComplexity int) int + ConstructsEmpty2 func(childComplexity int) int + ConstructsEmpty3 func(childComplexity int) int + ConstructsMaps func(childComplexity int, in *pb.Maps) int + ConstructsOneof func(childComplexity int, in *pb.Oneof) int + ConstructsRef func(childComplexity int, in *pb.Ref) int + ConstructsRepeated func(childComplexity int, in *pb.Repeated) int + ConstructsScalars func(childComplexity int, in *pb.Scalars) int + } + + Oneof struct { + Oneof1 func(childComplexity int) int + Oneof2 func(childComplexity int) int + Oneof3 func(childComplexity int) int + Param1 func(childComplexity int) int + } + + OneofParam2 struct { + Param2 func(childComplexity int) int + } + + OneofParam3 struct { + Param3 func(childComplexity int) int + } + + OneofParam4 struct { + Param4 func(childComplexity int) int + } + + OneofParam5 struct { + Param5 func(childComplexity int) int + } + + OneofParam6 struct { + Param6 func(childComplexity int) int + } + + PbAny struct { + Param1 func(childComplexity int) int + } + + Query struct { + Dummy func(childComplexity int) int + } + + Ref struct { + En1 func(childComplexity int) int + En2 func(childComplexity int) int + External func(childComplexity int) int + File func(childComplexity int) int + FileEnum func(childComplexity int) int + FileMsg func(childComplexity int) int + Foreign func(childComplexity int) int + Gz func(childComplexity int) int + Local func(childComplexity int) int + LocalTime func(childComplexity int) int + LocalTime2 func(childComplexity int) int + } + + RefBar struct { + Param1 func(childComplexity int) int + } + + RefFoo struct { + Bar1 func(childComplexity int) int + Bar2 func(childComplexity int) int + En1 func(childComplexity int) int + En2 func(childComplexity int) int + ExternalTime1 func(childComplexity int) int + LocalTime2 func(childComplexity int) int + } + + RefFooBar struct { + Param1 func(childComplexity int) int + } + + RefFooBazGz struct { + Param1 func(childComplexity int) int + } + + Repeated struct { + Bar func(childComplexity int) int + Bool func(childComplexity int) int + Bytes func(childComplexity int) int + Double func(childComplexity int) int + Fixed32 func(childComplexity int) int + Fixed64 func(childComplexity int) int + Float func(childComplexity int) int + Foo func(childComplexity int) int + Int32 func(childComplexity int) int + Int64 func(childComplexity int) int + Sfixed32 func(childComplexity int) int + Sfixed64 func(childComplexity int) int + Sint32 func(childComplexity int) int + Sint64 func(childComplexity int) int + StringX func(childComplexity int) int + Uint32 func(childComplexity int) int + Uint64 func(childComplexity int) int + } + + Scalars struct { + Bool func(childComplexity int) int + Bytes func(childComplexity int) int + Double func(childComplexity int) int + Fixed32 func(childComplexity int) int + Fixed64 func(childComplexity int) int + Float func(childComplexity int) int + Int32 func(childComplexity int) int + Int64 func(childComplexity int) int + Sfixed32 func(childComplexity int) int + Sfixed64 func(childComplexity int) int + Sint32 func(childComplexity int) int + Sint64 func(childComplexity int) int + StringX func(childComplexity int) int + Uint32 func(childComplexity int) int + Uint64 func(childComplexity int) int + } + + Timestamp struct { + Time func(childComplexity int) int + } +} + +type MapsResolver interface { + Int32Int32(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Int32Int32Entry, error) + Int64Int64(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Int64Int64Entry, error) + Uint32Uint32(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Uint32Uint32Entry, error) + Uint64Uint64(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Uint64Uint64Entry, error) + Sint32Sint32(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Sint32Sint32Entry, error) + Sint64Sint64(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Sint64Sint64Entry, error) + Fixed32Fixed32(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Fixed32Fixed32Entry, error) + Fixed64Fixed64(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Fixed64Fixed64Entry, error) + Sfixed32Sfixed32(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Sfixed32Sfixed32Entry, error) + Sfixed64Sfixed64(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_Sfixed64Sfixed64Entry, error) + BoolBool(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_BoolBoolEntry, error) + StringString(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_StringStringEntry, error) + StringBytes(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_StringBytesEntry, error) + StringFloat(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_StringFloatEntry, error) + StringDouble(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_StringDoubleEntry, error) + StringFoo(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_StringFooEntry, error) + StringBar(ctx context.Context, obj *pb.Maps) ([]*pb.Maps_StringBarEntry, error) +} +type MutationResolver interface { + ConstructsScalars(ctx context.Context, in *pb.Scalars) (*pb.Scalars, error) + ConstructsRepeated(ctx context.Context, in *pb.Repeated) (*pb.Repeated, error) + ConstructsMaps(ctx context.Context, in *pb.Maps) (*pb.Maps, error) + ConstructsAny(ctx context.Context, in *anypb.Any) (*pb.Any, error) + ConstructsEmpty(ctx context.Context) (*bool, error) + ConstructsEmpty2(ctx context.Context) (*bool, error) + ConstructsEmpty3(ctx context.Context) (*bool, error) + ConstructsRef(ctx context.Context, in *pb.Ref) (*pb.Ref, error) + ConstructsOneof(ctx context.Context, in *pb.Oneof) (*pb.Oneof, error) + ConstructsCallWithID(ctx context.Context) (*bool, error) +} +type OneofResolver interface { + Oneof1(ctx context.Context, obj *pb.Oneof) (pb.Oneof_Oneof1, error) + Oneof2(ctx context.Context, obj *pb.Oneof) (pb.Oneof_Oneof2, error) + Oneof3(ctx context.Context, obj *pb.Oneof) (pb.Oneof_Oneof3, error) +} +type QueryResolver interface { + Dummy(ctx context.Context) (*bool, error) +} + +type MapsInputResolver interface { + Int32Int32(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Int32Int32Entry) error + Int64Int64(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Int64Int64Entry) error + Uint32Uint32(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Uint32Uint32Entry) error + Uint64Uint64(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Uint64Uint64Entry) error + Sint32Sint32(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Sint32Sint32Entry) error + Sint64Sint64(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Sint64Sint64Entry) error + Fixed32Fixed32(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Fixed32Fixed32Entry) error + Fixed64Fixed64(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Fixed64Fixed64Entry) error + Sfixed32Sfixed32(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Sfixed32Sfixed32Entry) error + Sfixed64Sfixed64(ctx context.Context, obj *pb.Maps, data []*pb.Maps_Sfixed64Sfixed64Entry) error + BoolBool(ctx context.Context, obj *pb.Maps, data []*pb.Maps_BoolBoolEntry) error + StringString(ctx context.Context, obj *pb.Maps, data []*pb.Maps_StringStringEntry) error + StringBytes(ctx context.Context, obj *pb.Maps, data []*pb.Maps_StringBytesEntry) error + StringFloat(ctx context.Context, obj *pb.Maps, data []*pb.Maps_StringFloatEntry) error + StringDouble(ctx context.Context, obj *pb.Maps, data []*pb.Maps_StringDoubleEntry) error + StringFoo(ctx context.Context, obj *pb.Maps, data []*pb.Maps_StringFooEntry) error + StringBar(ctx context.Context, obj *pb.Maps, data []*pb.Maps_StringBarEntry) error +} +type OneofInputResolver interface { + Param2(ctx context.Context, obj *pb.Oneof, data *string) error + Param3(ctx context.Context, obj *pb.Oneof, data *string) error + Param4(ctx context.Context, obj *pb.Oneof, data *string) error + Param5(ctx context.Context, obj *pb.Oneof, data *string) error + Param6(ctx context.Context, obj *pb.Oneof, data *string) error +} + +type executableSchema struct { + resolvers ResolverRoot + directives DirectiveRoot + complexity ComplexityRoot +} + +func (e *executableSchema) Schema() *ast.Schema { + return parsedSchema +} + +func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { + ec := executionContext{nil, e} + _ = ec + switch typeName + "." + field { + + case "Baz.param1": + if e.complexity.Baz.Param1 == nil { + break + } + + return e.complexity.Baz.Param1(childComplexity), true + + case "Foo.param1": + if e.complexity.Foo.Param1 == nil { + break + } + + return e.complexity.Foo.Param1(childComplexity), true + + case "Foo.param2": + if e.complexity.Foo.Param2 == nil { + break + } + + return e.complexity.Foo.Param2(childComplexity), true + + case "Foo_Foo2.param1": + if e.complexity.FooFoo2.Param1 == nil { + break + } + + return e.complexity.FooFoo2.Param1(childComplexity), true + + case "GoogleProtobuf_Timestamp.nanos": + if e.complexity.GoogleProtobufTimestamp.Nanos == nil { + break + } + + return e.complexity.GoogleProtobufTimestamp.Nanos(childComplexity), true + + case "GoogleProtobuf_Timestamp.seconds": + if e.complexity.GoogleProtobufTimestamp.Seconds == nil { + break + } + + return e.complexity.GoogleProtobufTimestamp.Seconds(childComplexity), true + + case "Maps.boolBool": + if e.complexity.Maps.BoolBool == nil { + break + } + + return e.complexity.Maps.BoolBool(childComplexity), true + + case "Maps.fixed32Fixed32": + if e.complexity.Maps.Fixed32Fixed32 == nil { + break + } + + return e.complexity.Maps.Fixed32Fixed32(childComplexity), true + + case "Maps.fixed64Fixed64": + if e.complexity.Maps.Fixed64Fixed64 == nil { + break + } + + return e.complexity.Maps.Fixed64Fixed64(childComplexity), true + + case "Maps.int32Int32": + if e.complexity.Maps.Int32Int32 == nil { + break + } + + return e.complexity.Maps.Int32Int32(childComplexity), true + + case "Maps.int64Int64": + if e.complexity.Maps.Int64Int64 == nil { + break + } + + return e.complexity.Maps.Int64Int64(childComplexity), true + + case "Maps.sfixed32Sfixed32": + if e.complexity.Maps.Sfixed32Sfixed32 == nil { + break + } + + return e.complexity.Maps.Sfixed32Sfixed32(childComplexity), true + + case "Maps.sfixed64Sfixed64": + if e.complexity.Maps.Sfixed64Sfixed64 == nil { + break + } + + return e.complexity.Maps.Sfixed64Sfixed64(childComplexity), true + + case "Maps.sint32Sint32": + if e.complexity.Maps.Sint32Sint32 == nil { + break + } + + return e.complexity.Maps.Sint32Sint32(childComplexity), true + + case "Maps.sint64Sint64": + if e.complexity.Maps.Sint64Sint64 == nil { + break + } + + return e.complexity.Maps.Sint64Sint64(childComplexity), true + + case "Maps.stringBar": + if e.complexity.Maps.StringBar == nil { + break + } + + return e.complexity.Maps.StringBar(childComplexity), true + + case "Maps.stringBytes": + if e.complexity.Maps.StringBytes == nil { + break + } + + return e.complexity.Maps.StringBytes(childComplexity), true + + case "Maps.stringDouble": + if e.complexity.Maps.StringDouble == nil { + break + } + + return e.complexity.Maps.StringDouble(childComplexity), true + + case "Maps.stringFloat": + if e.complexity.Maps.StringFloat == nil { + break + } + + return e.complexity.Maps.StringFloat(childComplexity), true + + case "Maps.stringFoo": + if e.complexity.Maps.StringFoo == nil { + break + } + + return e.complexity.Maps.StringFoo(childComplexity), true + + case "Maps.stringString": + if e.complexity.Maps.StringString == nil { + break + } + + return e.complexity.Maps.StringString(childComplexity), true + + case "Maps.uint32Uint32": + if e.complexity.Maps.Uint32Uint32 == nil { + break + } + + return e.complexity.Maps.Uint32Uint32(childComplexity), true + + case "Maps.uint64Uint64": + if e.complexity.Maps.Uint64Uint64 == nil { + break + } + + return e.complexity.Maps.Uint64Uint64(childComplexity), true + + case "Maps_BoolBoolEntry.key": + if e.complexity.MapsBoolBoolEntry.Key == nil { + break + } + + return e.complexity.MapsBoolBoolEntry.Key(childComplexity), true + + case "Maps_BoolBoolEntry.value": + if e.complexity.MapsBoolBoolEntry.Value == nil { + break + } + + return e.complexity.MapsBoolBoolEntry.Value(childComplexity), true + + case "Maps_Fixed32Fixed32Entry.key": + if e.complexity.MapsFixed32Fixed32Entry.Key == nil { + break + } + + return e.complexity.MapsFixed32Fixed32Entry.Key(childComplexity), true + + case "Maps_Fixed32Fixed32Entry.value": + if e.complexity.MapsFixed32Fixed32Entry.Value == nil { + break + } + + return e.complexity.MapsFixed32Fixed32Entry.Value(childComplexity), true + + case "Maps_Fixed64Fixed64Entry.key": + if e.complexity.MapsFixed64Fixed64Entry.Key == nil { + break + } + + return e.complexity.MapsFixed64Fixed64Entry.Key(childComplexity), true + + case "Maps_Fixed64Fixed64Entry.value": + if e.complexity.MapsFixed64Fixed64Entry.Value == nil { + break + } + + return e.complexity.MapsFixed64Fixed64Entry.Value(childComplexity), true + + case "Maps_Int32Int32Entry.key": + if e.complexity.MapsInt32Int32Entry.Key == nil { + break + } + + return e.complexity.MapsInt32Int32Entry.Key(childComplexity), true + + case "Maps_Int32Int32Entry.value": + if e.complexity.MapsInt32Int32Entry.Value == nil { + break + } + + return e.complexity.MapsInt32Int32Entry.Value(childComplexity), true + + case "Maps_Int64Int64Entry.key": + if e.complexity.MapsInt64Int64Entry.Key == nil { + break + } + + return e.complexity.MapsInt64Int64Entry.Key(childComplexity), true + + case "Maps_Int64Int64Entry.value": + if e.complexity.MapsInt64Int64Entry.Value == nil { + break + } + + return e.complexity.MapsInt64Int64Entry.Value(childComplexity), true + + case "Maps_Sfixed32Sfixed32Entry.key": + if e.complexity.MapsSfixed32Sfixed32Entry.Key == nil { + break + } + + return e.complexity.MapsSfixed32Sfixed32Entry.Key(childComplexity), true + + case "Maps_Sfixed32Sfixed32Entry.value": + if e.complexity.MapsSfixed32Sfixed32Entry.Value == nil { + break + } + + return e.complexity.MapsSfixed32Sfixed32Entry.Value(childComplexity), true + + case "Maps_Sfixed64Sfixed64Entry.key": + if e.complexity.MapsSfixed64Sfixed64Entry.Key == nil { + break + } + + return e.complexity.MapsSfixed64Sfixed64Entry.Key(childComplexity), true + + case "Maps_Sfixed64Sfixed64Entry.value": + if e.complexity.MapsSfixed64Sfixed64Entry.Value == nil { + break + } + + return e.complexity.MapsSfixed64Sfixed64Entry.Value(childComplexity), true + + case "Maps_Sint32Sint32Entry.key": + if e.complexity.MapsSint32Sint32Entry.Key == nil { + break + } + + return e.complexity.MapsSint32Sint32Entry.Key(childComplexity), true + + case "Maps_Sint32Sint32Entry.value": + if e.complexity.MapsSint32Sint32Entry.Value == nil { + break + } + + return e.complexity.MapsSint32Sint32Entry.Value(childComplexity), true + + case "Maps_Sint64Sint64Entry.key": + if e.complexity.MapsSint64Sint64Entry.Key == nil { + break + } + + return e.complexity.MapsSint64Sint64Entry.Key(childComplexity), true + + case "Maps_Sint64Sint64Entry.value": + if e.complexity.MapsSint64Sint64Entry.Value == nil { + break + } + + return e.complexity.MapsSint64Sint64Entry.Value(childComplexity), true + + case "Maps_StringBarEntry.key": + if e.complexity.MapsStringBarEntry.Key == nil { + break + } + + return e.complexity.MapsStringBarEntry.Key(childComplexity), true + + case "Maps_StringBarEntry.value": + if e.complexity.MapsStringBarEntry.Value == nil { + break + } + + return e.complexity.MapsStringBarEntry.Value(childComplexity), true + + case "Maps_StringBytesEntry.key": + if e.complexity.MapsStringBytesEntry.Key == nil { + break + } + + return e.complexity.MapsStringBytesEntry.Key(childComplexity), true + + case "Maps_StringBytesEntry.value": + if e.complexity.MapsStringBytesEntry.Value == nil { + break + } + + return e.complexity.MapsStringBytesEntry.Value(childComplexity), true + + case "Maps_StringDoubleEntry.key": + if e.complexity.MapsStringDoubleEntry.Key == nil { + break + } + + return e.complexity.MapsStringDoubleEntry.Key(childComplexity), true + + case "Maps_StringDoubleEntry.value": + if e.complexity.MapsStringDoubleEntry.Value == nil { + break + } + + return e.complexity.MapsStringDoubleEntry.Value(childComplexity), true + + case "Maps_StringFloatEntry.key": + if e.complexity.MapsStringFloatEntry.Key == nil { + break + } + + return e.complexity.MapsStringFloatEntry.Key(childComplexity), true + + case "Maps_StringFloatEntry.value": + if e.complexity.MapsStringFloatEntry.Value == nil { + break + } + + return e.complexity.MapsStringFloatEntry.Value(childComplexity), true + + case "Maps_StringFooEntry.key": + if e.complexity.MapsStringFooEntry.Key == nil { + break + } + + return e.complexity.MapsStringFooEntry.Key(childComplexity), true + + case "Maps_StringFooEntry.value": + if e.complexity.MapsStringFooEntry.Value == nil { + break + } + + return e.complexity.MapsStringFooEntry.Value(childComplexity), true + + case "Maps_StringStringEntry.key": + if e.complexity.MapsStringStringEntry.Key == nil { + break + } + + return e.complexity.MapsStringStringEntry.Key(childComplexity), true + + case "Maps_StringStringEntry.value": + if e.complexity.MapsStringStringEntry.Value == nil { + break + } + + return e.complexity.MapsStringStringEntry.Value(childComplexity), true + + case "Maps_Uint32Uint32Entry.key": + if e.complexity.MapsUint32Uint32Entry.Key == nil { + break + } + + return e.complexity.MapsUint32Uint32Entry.Key(childComplexity), true + + case "Maps_Uint32Uint32Entry.value": + if e.complexity.MapsUint32Uint32Entry.Value == nil { + break + } + + return e.complexity.MapsUint32Uint32Entry.Value(childComplexity), true + + case "Maps_Uint64Uint64Entry.key": + if e.complexity.MapsUint64Uint64Entry.Key == nil { + break + } + + return e.complexity.MapsUint64Uint64Entry.Key(childComplexity), true + + case "Maps_Uint64Uint64Entry.value": + if e.complexity.MapsUint64Uint64Entry.Value == nil { + break + } + + return e.complexity.MapsUint64Uint64Entry.Value(childComplexity), true + + case "Mutation.constructsAny_": + if e.complexity.Mutation.ConstructsAny == nil { + break + } + + args, err := ec.field_Mutation_constructsAny__args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ConstructsAny(childComplexity, args["in"].(*anypb.Any)), true + + case "Mutation.constructsCallWithId": + if e.complexity.Mutation.ConstructsCallWithID == nil { + break + } + + return e.complexity.Mutation.ConstructsCallWithID(childComplexity), true + + case "Mutation.constructsEmpty_": + if e.complexity.Mutation.ConstructsEmpty == nil { + break + } + + return e.complexity.Mutation.ConstructsEmpty(childComplexity), true + + case "Mutation.constructsEmpty2_": + if e.complexity.Mutation.ConstructsEmpty2 == nil { + break + } + + return e.complexity.Mutation.ConstructsEmpty2(childComplexity), true + + case "Mutation.constructsEmpty3_": + if e.complexity.Mutation.ConstructsEmpty3 == nil { + break + } + + return e.complexity.Mutation.ConstructsEmpty3(childComplexity), true + + case "Mutation.constructsMaps_": + if e.complexity.Mutation.ConstructsMaps == nil { + break + } + + args, err := ec.field_Mutation_constructsMaps__args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ConstructsMaps(childComplexity, args["in"].(*pb.Maps)), true + + case "Mutation.constructsOneof_": + if e.complexity.Mutation.ConstructsOneof == nil { + break + } + + args, err := ec.field_Mutation_constructsOneof__args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ConstructsOneof(childComplexity, args["in"].(*pb.Oneof)), true + + case "Mutation.constructsRef_": + if e.complexity.Mutation.ConstructsRef == nil { + break + } + + args, err := ec.field_Mutation_constructsRef__args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ConstructsRef(childComplexity, args["in"].(*pb.Ref)), true + + case "Mutation.constructsRepeated_": + if e.complexity.Mutation.ConstructsRepeated == nil { + break + } + + args, err := ec.field_Mutation_constructsRepeated__args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ConstructsRepeated(childComplexity, args["in"].(*pb.Repeated)), true + + case "Mutation.constructsScalars_": + if e.complexity.Mutation.ConstructsScalars == nil { + break + } + + args, err := ec.field_Mutation_constructsScalars__args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ConstructsScalars(childComplexity, args["in"].(*pb.Scalars)), true + + case "Oneof.oneof1": + if e.complexity.Oneof.Oneof1 == nil { + break + } + + return e.complexity.Oneof.Oneof1(childComplexity), true + + case "Oneof.oneof2": + if e.complexity.Oneof.Oneof2 == nil { + break + } + + return e.complexity.Oneof.Oneof2(childComplexity), true + + case "Oneof.oneof3": + if e.complexity.Oneof.Oneof3 == nil { + break + } + + return e.complexity.Oneof.Oneof3(childComplexity), true + + case "Oneof.param1": + if e.complexity.Oneof.Param1 == nil { + break + } + + return e.complexity.Oneof.Param1(childComplexity), true + + case "Oneof_Param2.param2": + if e.complexity.OneofParam2.Param2 == nil { + break + } + + return e.complexity.OneofParam2.Param2(childComplexity), true + + case "Oneof_Param3.param3": + if e.complexity.OneofParam3.Param3 == nil { + break + } + + return e.complexity.OneofParam3.Param3(childComplexity), true + + case "Oneof_Param4.param4": + if e.complexity.OneofParam4.Param4 == nil { + break + } + + return e.complexity.OneofParam4.Param4(childComplexity), true + + case "Oneof_Param5.param5": + if e.complexity.OneofParam5.Param5 == nil { + break + } + + return e.complexity.OneofParam5.Param5(childComplexity), true + + case "Oneof_Param6.param6": + if e.complexity.OneofParam6.Param6 == nil { + break + } + + return e.complexity.OneofParam6.Param6(childComplexity), true + + case "Pb_Any.param1": + if e.complexity.PbAny.Param1 == nil { + break + } + + return e.complexity.PbAny.Param1(childComplexity), true + + case "Query.dummy": + if e.complexity.Query.Dummy == nil { + break + } + + return e.complexity.Query.Dummy(childComplexity), true + + case "Ref.en1": + if e.complexity.Ref.En1 == nil { + break + } + + return e.complexity.Ref.En1(childComplexity), true + + case "Ref.en2": + if e.complexity.Ref.En2 == nil { + break + } + + return e.complexity.Ref.En2(childComplexity), true + + case "Ref.external": + if e.complexity.Ref.External == nil { + break + } + + return e.complexity.Ref.External(childComplexity), true + + case "Ref.file": + if e.complexity.Ref.File == nil { + break + } + + return e.complexity.Ref.File(childComplexity), true + + case "Ref.fileEnum": + if e.complexity.Ref.FileEnum == nil { + break + } + + return e.complexity.Ref.FileEnum(childComplexity), true + + case "Ref.fileMsg": + if e.complexity.Ref.FileMsg == nil { + break + } + + return e.complexity.Ref.FileMsg(childComplexity), true + + case "Ref.foreign": + if e.complexity.Ref.Foreign == nil { + break + } + + return e.complexity.Ref.Foreign(childComplexity), true + + case "Ref.gz": + if e.complexity.Ref.Gz == nil { + break + } + + return e.complexity.Ref.Gz(childComplexity), true + + case "Ref.local": + if e.complexity.Ref.Local == nil { + break + } + + return e.complexity.Ref.Local(childComplexity), true + + case "Ref.localTime": + if e.complexity.Ref.LocalTime == nil { + break + } + + return e.complexity.Ref.LocalTime(childComplexity), true + + case "Ref.localTime2": + if e.complexity.Ref.LocalTime2 == nil { + break + } + + return e.complexity.Ref.LocalTime2(childComplexity), true + + case "Ref_Bar.param1": + if e.complexity.RefBar.Param1 == nil { + break + } + + return e.complexity.RefBar.Param1(childComplexity), true + + case "Ref_Foo.bar1": + if e.complexity.RefFoo.Bar1 == nil { + break + } + + return e.complexity.RefFoo.Bar1(childComplexity), true + + case "Ref_Foo.bar2": + if e.complexity.RefFoo.Bar2 == nil { + break + } + + return e.complexity.RefFoo.Bar2(childComplexity), true + + case "Ref_Foo.en1": + if e.complexity.RefFoo.En1 == nil { + break + } + + return e.complexity.RefFoo.En1(childComplexity), true + + case "Ref_Foo.en2": + if e.complexity.RefFoo.En2 == nil { + break + } + + return e.complexity.RefFoo.En2(childComplexity), true + + case "Ref_Foo.externalTime1": + if e.complexity.RefFoo.ExternalTime1 == nil { + break + } + + return e.complexity.RefFoo.ExternalTime1(childComplexity), true + + case "Ref_Foo.localTime2": + if e.complexity.RefFoo.LocalTime2 == nil { + break + } + + return e.complexity.RefFoo.LocalTime2(childComplexity), true + + case "Ref_Foo_Bar.param1": + if e.complexity.RefFooBar.Param1 == nil { + break + } + + return e.complexity.RefFooBar.Param1(childComplexity), true + + case "Ref_Foo_Baz_Gz.param1": + if e.complexity.RefFooBazGz.Param1 == nil { + break + } + + return e.complexity.RefFooBazGz.Param1(childComplexity), true + + case "Repeated.bar": + if e.complexity.Repeated.Bar == nil { + break + } + + return e.complexity.Repeated.Bar(childComplexity), true + + case "Repeated.bool": + if e.complexity.Repeated.Bool == nil { + break + } + + return e.complexity.Repeated.Bool(childComplexity), true + + case "Repeated.bytes": + if e.complexity.Repeated.Bytes == nil { + break + } + + return e.complexity.Repeated.Bytes(childComplexity), true + + case "Repeated.double": + if e.complexity.Repeated.Double == nil { + break + } + + return e.complexity.Repeated.Double(childComplexity), true + + case "Repeated.fixed32": + if e.complexity.Repeated.Fixed32 == nil { + break + } + + return e.complexity.Repeated.Fixed32(childComplexity), true + + case "Repeated.fixed64": + if e.complexity.Repeated.Fixed64 == nil { + break + } + + return e.complexity.Repeated.Fixed64(childComplexity), true + + case "Repeated.float": + if e.complexity.Repeated.Float == nil { + break + } + + return e.complexity.Repeated.Float(childComplexity), true + + case "Repeated.foo": + if e.complexity.Repeated.Foo == nil { + break + } + + return e.complexity.Repeated.Foo(childComplexity), true + + case "Repeated.int32": + if e.complexity.Repeated.Int32 == nil { + break + } + + return e.complexity.Repeated.Int32(childComplexity), true + + case "Repeated.int64": + if e.complexity.Repeated.Int64 == nil { + break + } + + return e.complexity.Repeated.Int64(childComplexity), true + + case "Repeated.sfixed32": + if e.complexity.Repeated.Sfixed32 == nil { + break + } + + return e.complexity.Repeated.Sfixed32(childComplexity), true + + case "Repeated.sfixed64": + if e.complexity.Repeated.Sfixed64 == nil { + break + } + + return e.complexity.Repeated.Sfixed64(childComplexity), true + + case "Repeated.sint32": + if e.complexity.Repeated.Sint32 == nil { + break + } + + return e.complexity.Repeated.Sint32(childComplexity), true + + case "Repeated.sint64": + if e.complexity.Repeated.Sint64 == nil { + break + } + + return e.complexity.Repeated.Sint64(childComplexity), true + + case "Repeated.stringX": + if e.complexity.Repeated.StringX == nil { + break + } + + return e.complexity.Repeated.StringX(childComplexity), true + + case "Repeated.uint32": + if e.complexity.Repeated.Uint32 == nil { + break + } + + return e.complexity.Repeated.Uint32(childComplexity), true + + case "Repeated.uint64": + if e.complexity.Repeated.Uint64 == nil { + break + } + + return e.complexity.Repeated.Uint64(childComplexity), true + + case "Scalars.bool": + if e.complexity.Scalars.Bool == nil { + break + } + + return e.complexity.Scalars.Bool(childComplexity), true + + case "Scalars.bytes": + if e.complexity.Scalars.Bytes == nil { + break + } + + return e.complexity.Scalars.Bytes(childComplexity), true + + case "Scalars.double": + if e.complexity.Scalars.Double == nil { + break + } + + return e.complexity.Scalars.Double(childComplexity), true + + case "Scalars.fixed32": + if e.complexity.Scalars.Fixed32 == nil { + break + } + + return e.complexity.Scalars.Fixed32(childComplexity), true + + case "Scalars.fixed64": + if e.complexity.Scalars.Fixed64 == nil { + break + } + + return e.complexity.Scalars.Fixed64(childComplexity), true + + case "Scalars.float": + if e.complexity.Scalars.Float == nil { + break + } + + return e.complexity.Scalars.Float(childComplexity), true + + case "Scalars.int32": + if e.complexity.Scalars.Int32 == nil { + break + } + + return e.complexity.Scalars.Int32(childComplexity), true + + case "Scalars.int64": + if e.complexity.Scalars.Int64 == nil { + break + } + + return e.complexity.Scalars.Int64(childComplexity), true + + case "Scalars.sfixed32": + if e.complexity.Scalars.Sfixed32 == nil { + break + } + + return e.complexity.Scalars.Sfixed32(childComplexity), true + + case "Scalars.sfixed64": + if e.complexity.Scalars.Sfixed64 == nil { + break + } + + return e.complexity.Scalars.Sfixed64(childComplexity), true + + case "Scalars.sint32": + if e.complexity.Scalars.Sint32 == nil { + break + } + + return e.complexity.Scalars.Sint32(childComplexity), true + + case "Scalars.sint64": + if e.complexity.Scalars.Sint64 == nil { + break + } + + return e.complexity.Scalars.Sint64(childComplexity), true + + case "Scalars.stringX": + if e.complexity.Scalars.StringX == nil { + break + } + + return e.complexity.Scalars.StringX(childComplexity), true + + case "Scalars.uint32": + if e.complexity.Scalars.Uint32 == nil { + break + } + + return e.complexity.Scalars.Uint32(childComplexity), true + + case "Scalars.uint64": + if e.complexity.Scalars.Uint64 == nil { + break + } + + return e.complexity.Scalars.Uint64(childComplexity), true + + case "Timestamp.time": + if e.complexity.Timestamp.Time == nil { + break + } + + return e.complexity.Timestamp.Time(childComplexity), true + + } + return 0, false +} + +func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { + rc := graphql.GetOperationContext(ctx) + ec := executionContext{rc, e} + first := true + + switch rc.Operation.Operation { + case ast.Query: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + data := ec._Query(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Mutation: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + data := ec._Mutation(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + + default: + return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) + } +} + +type executionContext struct { + *graphql.OperationContext + *executableSchema +} + +func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapSchema(parsedSchema), nil +} + +func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil +} + +var sources = []*ast.Source{ + {Name: "pb/constructs.graphqls", Input: `directive @Constructs on FIELD_DEFINITION +directive @Oneof_Oneof1 on INPUT_FIELD_DEFINITION +directive @Oneof_Oneof2 on INPUT_FIELD_DEFINITION +directive @Oneof_Oneof3 on INPUT_FIELD_DEFINITION +""" +Any is any json type +""" +scalar Any +enum Bar { + BAR1 + BAR2 + BAR3 +} +type Baz { + param1: String +} +input BazInput { + param1: String +} +scalar Bytes +type Foo { + param1: String + param2: String +} +input FooInput { + param1: String + param2: String +} +type Foo_Foo2 { + param1: String +} +input Foo_Foo2Input { + param1: String +} +""" + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX ` + "`" + `time()` + "`" + `. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX ` + "`" + `gettimeofday()` + "`" + `. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 ` + "`" + `GetSystemTimeAsFileTime()` + "`" + `. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java ` + "`" + `System.currentTimeMillis()` + "`" + `. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + + Example 5: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard ` + "`" + `datetime.datetime` + "`" + ` object can be converted + to this format using + [` + "`" + `strftime` + "`" + `](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [` + "`" + `ISODateTimeFormat.dateTime()` + "`" + `]( + http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + ) to obtain a formatter capable of generating timestamps in this format. + + + +""" +type GoogleProtobuf_Timestamp { + """ + Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + 9999-12-31T23:59:59Z inclusive. + + """ + seconds: Int + """ + Non-negative fractions of a second at nanosecond resolution. Negative + second values with fractions must still have non-negative nanos values + that count forward in time. Must be from 0 to 999,999,999 + inclusive. + + """ + nanos: Int +} +""" + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX ` + "`" + `time()` + "`" + `. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX ` + "`" + `gettimeofday()` + "`" + `. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 ` + "`" + `GetSystemTimeAsFileTime()` + "`" + `. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java ` + "`" + `System.currentTimeMillis()` + "`" + `. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + + Example 5: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard ` + "`" + `datetime.datetime` + "`" + ` object can be converted + to this format using + [` + "`" + `strftime` + "`" + `](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [` + "`" + `ISODateTimeFormat.dateTime()` + "`" + `]( + http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + ) to obtain a formatter capable of generating timestamps in this format. + + + +""" +input GoogleProtobuf_TimestampInput { + """ + Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + 9999-12-31T23:59:59Z inclusive. + + """ + seconds: Int + """ + Non-negative fractions of a second at nanosecond resolution. Negative + second values with fractions must still have non-negative nanos values + that count forward in time. Must be from 0 to 999,999,999 + inclusive. + + """ + nanos: Int +} +type Maps { + int32Int32: [Maps_Int32Int32Entry!] + int64Int64: [Maps_Int64Int64Entry!] + uint32Uint32: [Maps_Uint32Uint32Entry!] + uint64Uint64: [Maps_Uint64Uint64Entry!] + sint32Sint32: [Maps_Sint32Sint32Entry!] + sint64Sint64: [Maps_Sint64Sint64Entry!] + fixed32Fixed32: [Maps_Fixed32Fixed32Entry!] + fixed64Fixed64: [Maps_Fixed64Fixed64Entry!] + sfixed32Sfixed32: [Maps_Sfixed32Sfixed32Entry!] + sfixed64Sfixed64: [Maps_Sfixed64Sfixed64Entry!] + boolBool: [Maps_BoolBoolEntry!] + stringString: [Maps_StringStringEntry!] + stringBytes: [Maps_StringBytesEntry!] + stringFloat: [Maps_StringFloatEntry!] + stringDouble: [Maps_StringDoubleEntry!] + stringFoo: [Maps_StringFooEntry!] + stringBar: [Maps_StringBarEntry!] +} +input MapsInput { + int32Int32: [Maps_Int32Int32EntryInput!] + int64Int64: [Maps_Int64Int64EntryInput!] + uint32Uint32: [Maps_Uint32Uint32EntryInput!] + uint64Uint64: [Maps_Uint64Uint64EntryInput!] + sint32Sint32: [Maps_Sint32Sint32EntryInput!] + sint64Sint64: [Maps_Sint64Sint64EntryInput!] + fixed32Fixed32: [Maps_Fixed32Fixed32EntryInput!] + fixed64Fixed64: [Maps_Fixed64Fixed64EntryInput!] + sfixed32Sfixed32: [Maps_Sfixed32Sfixed32EntryInput!] + sfixed64Sfixed64: [Maps_Sfixed64Sfixed64EntryInput!] + boolBool: [Maps_BoolBoolEntryInput!] + stringString: [Maps_StringStringEntryInput!] + stringBytes: [Maps_StringBytesEntryInput!] + stringFloat: [Maps_StringFloatEntryInput!] + stringDouble: [Maps_StringDoubleEntryInput!] + stringFoo: [Maps_StringFooEntryInput!] + stringBar: [Maps_StringBarEntryInput!] +} +type Maps_BoolBoolEntry { + key: Boolean + value: Boolean +} +input Maps_BoolBoolEntryInput { + key: Boolean + value: Boolean +} +type Maps_Fixed32Fixed32Entry { + key: Int + value: Int +} +input Maps_Fixed32Fixed32EntryInput { + key: Int + value: Int +} +type Maps_Fixed64Fixed64Entry { + key: Int + value: Int +} +input Maps_Fixed64Fixed64EntryInput { + key: Int + value: Int +} +type Maps_Int32Int32Entry { + key: Int + value: Int +} +input Maps_Int32Int32EntryInput { + key: Int + value: Int +} +type Maps_Int64Int64Entry { + key: Int + value: Int +} +input Maps_Int64Int64EntryInput { + key: Int + value: Int +} +type Maps_Sfixed32Sfixed32Entry { + key: Int + value: Int +} +input Maps_Sfixed32Sfixed32EntryInput { + key: Int + value: Int +} +type Maps_Sfixed64Sfixed64Entry { + key: Int + value: Int +} +input Maps_Sfixed64Sfixed64EntryInput { + key: Int + value: Int +} +type Maps_Sint32Sint32Entry { + key: Int + value: Int +} +input Maps_Sint32Sint32EntryInput { + key: Int + value: Int +} +type Maps_Sint64Sint64Entry { + key: Int + value: Int +} +input Maps_Sint64Sint64EntryInput { + key: Int + value: Int +} +type Maps_StringBarEntry { + key: String + value: Bar +} +input Maps_StringBarEntryInput { + key: String + value: Bar +} +type Maps_StringBytesEntry { + key: String + value: Bytes +} +input Maps_StringBytesEntryInput { + key: String + value: Bytes +} +type Maps_StringDoubleEntry { + key: String + value: Float +} +input Maps_StringDoubleEntryInput { + key: String + value: Float +} +type Maps_StringFloatEntry { + key: String + value: Float +} +input Maps_StringFloatEntryInput { + key: String + value: Float +} +type Maps_StringFooEntry { + key: String + value: Foo +} +input Maps_StringFooEntryInput { + key: String + value: FooInput +} +type Maps_StringStringEntry { + key: String + value: String +} +input Maps_StringStringEntryInput { + key: String + value: String +} +type Maps_Uint32Uint32Entry { + key: Int + value: Int +} +input Maps_Uint32Uint32EntryInput { + key: Int + value: Int +} +type Maps_Uint64Uint64Entry { + key: Int + value: Int +} +input Maps_Uint64Uint64EntryInput { + key: Int + value: Int +} +type Mutation { + """ + all possible scalars and same message as input and output + + """ + constructsScalars_(in: ScalarsInput): Scalars @Constructs + """ + all scalars messages and enums as repeated + + """ + constructsRepeated_(in: RepeatedInput): Repeated @Constructs + """ + all possible maps and different messages as input and output + + """ + constructsMaps_(in: MapsInput): Maps @Constructs + """ + same name different types + + """ + constructsAny_(in: Any): Pb_Any @Constructs + """ + empty input and empty output + + """ + constructsEmpty_: Boolean @Constructs + """ + messages with all empty fields + + """ + constructsEmpty2_: Boolean @Constructs + """ + messages with all empty fields + + """ + constructsEmpty3_: Boolean @Constructs + constructsRef_(in: RefInput): Ref @Constructs + constructsOneof_(in: OneofInput): Oneof @Constructs + constructsCallWithId: Boolean @Constructs +} +type Oneof { + param1: String + oneof1: Oneof_Oneof1 + oneof2: Oneof_Oneof2 + oneof3: Oneof_Oneof3 +} +input OneofInput { + param1: String + param2: String @Oneof_Oneof1 + param3: String @Oneof_Oneof1 + param4: String @Oneof_Oneof2 + param5: String @Oneof_Oneof2 + param6: String @Oneof_Oneof3 +} +union Oneof_Oneof1 = Oneof_Param2 | Oneof_Param3 +union Oneof_Oneof2 = Oneof_Param4 | Oneof_Param5 +union Oneof_Oneof3 = Oneof_Param6 +type Oneof_Param2 { + param2: String +} +type Oneof_Param3 { + param3: String +} +type Oneof_Param4 { + param4: String +} +type Oneof_Param5 { + param5: String +} +type Oneof_Param6 { + param6: String +} +type Pb_Any { + param1: String +} +type Query { + dummy: Boolean +} +type Ref { + localTime2: Timestamp + external: GoogleProtobuf_Timestamp + localTime: Timestamp + file: Baz + fileMsg: Foo + fileEnum: Bar + local: Ref_Foo + foreign: Foo_Foo2 + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En + gz: Ref_Foo_Baz_Gz +} +input RefInput { + localTime2: TimestampInput + external: GoogleProtobuf_TimestampInput + localTime: TimestampInput + file: BazInput + fileMsg: FooInput + fileEnum: Bar + local: Ref_FooInput + foreign: Foo_Foo2Input + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En + gz: Ref_Foo_Baz_GzInput +} +type Ref_Bar { + param1: String +} +input Ref_BarInput { + param1: String +} +type Ref_Foo { + bar1: Ref_Foo_Bar + localTime2: Timestamp + externalTime1: GoogleProtobuf_Timestamp + bar2: Ref_Bar + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En +} +input Ref_FooInput { + bar1: Ref_Foo_BarInput + localTime2: TimestampInput + externalTime1: GoogleProtobuf_TimestampInput + bar2: Ref_BarInput + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En +} +type Ref_Foo_Bar { + param1: String +} +input Ref_Foo_BarInput { + param1: String +} +enum Ref_Foo_Bar_En { + A0 + A1 +} +type Ref_Foo_Baz_Gz { + param1: String +} +input Ref_Foo_Baz_GzInput { + param1: String +} +enum Ref_Foo_En { + A0 + A1 +} +type Repeated { + double: [Float!] + float: [Float!] + int32: [Int!] + int64: [Int!] + uint32: [Int!] + uint64: [Int!] + sint32: [Int!] + sint64: [Int!] + fixed32: [Int!] + fixed64: [Int!] + sfixed32: [Int!] + sfixed64: [Int!] + bool: [Boolean!] + stringX: [String!] + bytes: [Bytes!] + foo: [Foo!] + bar: [Bar!] +} +input RepeatedInput { + double: [Float!] + float: [Float!] + int32: [Int!] + int64: [Int!] + uint32: [Int!] + uint64: [Int!] + sint32: [Int!] + sint64: [Int!] + fixed32: [Int!] + fixed64: [Int!] + sfixed32: [Int!] + sfixed64: [Int!] + bool: [Boolean!] + stringX: [String!] + bytes: [Bytes!] + foo: [FooInput!] + bar: [Bar!] +} +type Scalars { + double: Float + float: Float + int32: Int + int64: Int + uint32: Int + uint64: Int + sint32: Int + sint64: Int + fixed32: Int + fixed64: Int + sfixed32: Int + sfixed64: Int + bool: Boolean + """ + x for collisions with go method String + + """ + stringX: String + bytes: Bytes +} +input ScalarsInput { + double: Float + float: Float + int32: Int + int64: Int + uint32: Int + uint64: Int + sint32: Int + sint64: Int + fixed32: Int + fixed64: Int + sfixed32: Int + sfixed64: Int + bool: Boolean + """ + x for collisions with go method String + + """ + stringX: String + bytes: Bytes +} +type Timestamp { + time: String +} +input TimestampInput { + time: String +} +`, BuiltIn: false}, +} +var parsedSchema = gqlparser.MustLoadSchema(sources...) + +// endregion ************************** generated!.gotpl ************************** + +// region ***************************** args.gotpl ***************************** + +func (ec *executionContext) field_Mutation_constructsAny__args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *anypb.Any + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalOAny2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋanypbᚐAny(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_constructsMaps__args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Maps + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_constructsOneof__args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Oneof + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_constructsRef__args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Ref + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_constructsRepeated__args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Repeated + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_constructsScalars__args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Scalars + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalOScalarsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +// endregion ***************************** args.gotpl ***************************** + +// region ************************** directives.gotpl ************************** + +// endregion ************************** directives.gotpl ************************** + +// region **************************** field.gotpl ***************************** + +func (ec *executionContext) _Baz_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Baz) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Baz", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Foo_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Foo_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Foo_Foo2_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo_Foo2) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Foo_Foo2", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _GoogleProtobuf_Timestamp_seconds(ctx context.Context, field graphql.CollectedField, obj *timestamppb.Timestamp) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "GoogleProtobuf_Timestamp", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Seconds, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _GoogleProtobuf_Timestamp_nanos(ctx context.Context, field graphql.CollectedField, obj *timestamppb.Timestamp) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "GoogleProtobuf_Timestamp", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Nanos, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_int32Int32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Int32Int32(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Int32Int32Entry) + fc.Result = res + return ec.marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_int64Int64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Int64Int64(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Int64Int64Entry) + fc.Result = res + return ec.marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_uint32Uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Uint32Uint32(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Uint32Uint32Entry) + fc.Result = res + return ec.marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_uint64Uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Uint64Uint64(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Uint64Uint64Entry) + fc.Result = res + return ec.marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_sint32Sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Sint32Sint32(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Sint32Sint32Entry) + fc.Result = res + return ec.marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_sint64Sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Sint64Sint64(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Sint64Sint64Entry) + fc.Result = res + return ec.marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_fixed32Fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Fixed32Fixed32(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Fixed32Fixed32Entry) + fc.Result = res + return ec.marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_fixed64Fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Fixed64Fixed64(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Fixed64Fixed64Entry) + fc.Result = res + return ec.marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_sfixed32Sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Sfixed32Sfixed32(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Sfixed32Sfixed32Entry) + fc.Result = res + return ec.marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_sfixed64Sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().Sfixed64Sfixed64(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_Sfixed64Sfixed64Entry) + fc.Result = res + return ec.marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_boolBool(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().BoolBool(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_BoolBoolEntry) + fc.Result = res + return ec.marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_stringString(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().StringString(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_StringStringEntry) + fc.Result = res + return ec.marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_stringBytes(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().StringBytes(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_StringBytesEntry) + fc.Result = res + return ec.marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_stringFloat(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().StringFloat(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_StringFloatEntry) + fc.Result = res + return ec.marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_stringDouble(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().StringDouble(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_StringDoubleEntry) + fc.Result = res + return ec.marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_stringFoo(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().StringFoo(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_StringFooEntry) + fc.Result = res + return ec.marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_stringBar(ctx context.Context, field graphql.CollectedField, obj *pb.Maps) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Maps().StringBar(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Maps_StringBarEntry) + fc.Result = res + return ec.marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_BoolBoolEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_BoolBoolEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_BoolBoolEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalOBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_BoolBoolEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_BoolBoolEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_BoolBoolEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalOBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Fixed32Fixed32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed32Fixed32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Fixed32Fixed32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint32) + fc.Result = res + return ec.marshalOInt2uint32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Fixed32Fixed32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed32Fixed32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Fixed32Fixed32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint32) + fc.Result = res + return ec.marshalOInt2uint32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Fixed64Fixed64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed64Fixed64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Fixed64Fixed64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint64) + fc.Result = res + return ec.marshalOInt2uint64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Fixed64Fixed64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Fixed64Fixed64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Fixed64Fixed64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint64) + fc.Result = res + return ec.marshalOInt2uint64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Int32Int32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int32Int32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Int32Int32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Int32Int32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int32Int32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Int32Int32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Int64Int64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int64Int64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Int64Int64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Int64Int64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Int64Int64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Int64Int64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed32Sfixed32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sfixed32Sfixed32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed32Sfixed32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sfixed32Sfixed32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed64Sfixed64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sfixed64Sfixed64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sfixed64Sfixed64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sfixed64Sfixed64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sint32Sint32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint32Sint32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sint32Sint32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sint32Sint32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint32Sint32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sint32Sint32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sint64Sint64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint64Sint64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sint64Sint64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Sint64Sint64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Sint64Sint64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Sint64Sint64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringBarEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBarEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringBarEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringBarEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBarEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringBarEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Bar) + fc.Result = res + return ec.marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringBytesEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBytesEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringBytesEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringBytesEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringBytesEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringBytesEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]byte) + fc.Result = res + return ec.marshalOBytes2ᚕbyte(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringDoubleEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringDoubleEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringDoubleEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringDoubleEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringDoubleEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringDoubleEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalOFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringFloatEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFloatEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringFloatEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringFloatEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFloatEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringFloatEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(float32) + fc.Result = res + return ec.marshalOFloat2float32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringFooEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFooEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringFooEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringFooEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringFooEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringFooEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Foo) + fc.Result = res + return ec.marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringStringEntry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringStringEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringStringEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_StringStringEntry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_StringStringEntry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_StringStringEntry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Uint32Uint32Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint32Uint32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Uint32Uint32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint32) + fc.Result = res + return ec.marshalOInt2uint32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Uint32Uint32Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint32Uint32Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Uint32Uint32Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint32) + fc.Result = res + return ec.marshalOInt2uint32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Uint64Uint64Entry_key(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint64Uint64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Uint64Uint64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint64) + fc.Result = res + return ec.marshalOInt2uint64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Maps_Uint64Uint64Entry_value(ctx context.Context, field graphql.CollectedField, obj *pb.Maps_Uint64Uint64Entry) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Maps_Uint64Uint64Entry", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint64) + fc.Result = res + return ec.marshalOInt2uint64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsScalars_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_constructsScalars__args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsScalars(rctx, args["in"].(*pb.Scalars)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Scalars); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Scalars`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Scalars) + fc.Result = res + return ec.marshalOScalars2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsRepeated_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_constructsRepeated__args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsRepeated(rctx, args["in"].(*pb.Repeated)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Repeated); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Repeated`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Repeated) + fc.Result = res + return ec.marshalORepeated2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsMaps_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_constructsMaps__args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsMaps(rctx, args["in"].(*pb.Maps)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Maps); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Maps`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Maps) + fc.Result = res + return ec.marshalOMaps2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsAny_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_constructsAny__args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsAny(rctx, args["in"].(*anypb.Any)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Any); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Any`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Any) + fc.Result = res + return ec.marshalOPb_Any2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐAny(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsEmpty_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsEmpty(rctx) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsEmpty2_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsEmpty2(rctx) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsEmpty3_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsEmpty3(rctx) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsRef_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_constructsRef__args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsRef(rctx, args["in"].(*pb.Ref)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Ref); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Ref`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Ref) + fc.Result = res + return ec.marshalORef2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsOneof_(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_constructsOneof__args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsOneof(rctx, args["in"].(*pb.Oneof)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Oneof); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Oneof`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Oneof) + fc.Result = res + return ec.marshalOOneof2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_constructsCallWithId(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ConstructsCallWithID(rctx) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Constructs == nil { + return nil, errors.New("directive Constructs is not implemented") + } + return ec.directives.Constructs(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_oneof1(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Oneof().Oneof1(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Oneof_Oneof1) + fc.Result = res + return ec.marshalOOneof_Oneof12githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof1(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_oneof2(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Oneof().Oneof2(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Oneof_Oneof2) + fc.Result = res + return ec.marshalOOneof_Oneof22githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof2(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_oneof3(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Oneof().Oneof3(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Oneof_Oneof3) + fc.Result = res + return ec.marshalOOneof_Oneof32githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof3(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_Param2_param2(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param2) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof_Param2", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_Param3_param3(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param3) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof_Param3", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param3, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_Param4_param4(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param4) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof_Param4", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param4, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_Param5_param5(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param5) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof_Param5", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param5, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Oneof_Param6_param6(ctx context.Context, field graphql.CollectedField, obj *pb.Oneof_Param6) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Oneof_Param6", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param6, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Pb_Any_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Any) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Pb_Any", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query_dummy(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().Dummy(rctx) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query___type_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(args["name"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectSchema() + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Schema) + fc.Result = res + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_localTime2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LocalTime2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Timestamp) + fc.Result = res + return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_external(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.External, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*timestamppb.Timestamp) + fc.Result = res + return ec.marshalOGoogleProtobuf_Timestamp2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_localTime(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LocalTime, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Timestamp) + fc.Result = res + return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_file(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.File, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Baz) + fc.Result = res + return ec.marshalOBaz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_fileMsg(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FileMsg, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Foo) + fc.Result = res + return ec.marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_fileEnum(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FileEnum, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Bar) + fc.Result = res + return ec.marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_local(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Local, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Ref_Foo) + fc.Result = res + return ec.marshalORef_Foo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_foreign(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Foreign, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Foo_Foo2) + fc.Result = res + return ec.marshalOFoo_Foo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_en1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.En1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Ref_Foo_En) + fc.Result = res + return ec.marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_en2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.En2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Ref_Foo_Bar_En) + fc.Result = res + return ec.marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_gz(ctx context.Context, field graphql.CollectedField, obj *pb.Ref) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Gz, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Ref_Foo_Baz_Gz) + fc.Result = res + return ec.marshalORef_Foo_Baz_Gz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Bar_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Bar) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Bar", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_bar1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bar1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Ref_Foo_Bar) + fc.Result = res + return ec.marshalORef_Foo_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_localTime2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LocalTime2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Timestamp) + fc.Result = res + return ec.marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_externalTime1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ExternalTime1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*timestamppb.Timestamp) + fc.Result = res + return ec.marshalOGoogleProtobuf_Timestamp2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_bar2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bar2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Ref_Bar) + fc.Result = res + return ec.marshalORef_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_en1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.En1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Ref_Foo_En) + fc.Result = res + return ec.marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_en2(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.En2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(pb.Ref_Foo_Bar_En) + fc.Result = res + return ec.marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_Bar_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo_Bar) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo_Bar", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Ref_Foo_Baz_Gz_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Ref_Foo_Baz_Gz) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Ref_Foo_Baz_Gz", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_double(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Double, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]float64) + fc.Result = res + return ec.marshalOFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_float(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Float, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]float32) + fc.Result = res + return ec.marshalOFloat2ᚕfloat32ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_int32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Int32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]int32) + fc.Result = res + return ec.marshalOInt2ᚕint32ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_int64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Int64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]int64) + fc.Result = res + return ec.marshalOInt2ᚕint64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Uint32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]uint32) + fc.Result = res + return ec.marshalOInt2ᚕuint32ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Uint64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]uint64) + fc.Result = res + return ec.marshalOInt2ᚕuint64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sint32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]int32) + fc.Result = res + return ec.marshalOInt2ᚕint32ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sint64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]int64) + fc.Result = res + return ec.marshalOInt2ᚕint64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fixed32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]uint32) + fc.Result = res + return ec.marshalOInt2ᚕuint32ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fixed64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]uint64) + fc.Result = res + return ec.marshalOInt2ᚕuint64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sfixed32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]int32) + fc.Result = res + return ec.marshalOInt2ᚕint32ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sfixed64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]int64) + fc.Result = res + return ec.marshalOInt2ᚕint64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_bool(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bool, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]bool) + fc.Result = res + return ec.marshalOBoolean2ᚕboolᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StringX, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_bytes(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bytes, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([][]byte) + fc.Result = res + return ec.marshalOBytes2ᚕᚕbyteᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Foo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*pb.Foo) + fc.Result = res + return ec.marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Repeated_bar(ctx context.Context, field graphql.CollectedField, obj *pb.Repeated) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Repeated", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bar, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]pb.Bar) + fc.Result = res + return ec.marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_double(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Double, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(float64) + fc.Result = res + return ec.marshalOFloat2float64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_float(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Float, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(float32) + fc.Result = res + return ec.marshalOFloat2float32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_int32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Int32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_int64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Int64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_uint32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Uint32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint32) + fc.Result = res + return ec.marshalOInt2uint32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_uint64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Uint64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint64) + fc.Result = res + return ec.marshalOInt2uint64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_sint32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sint32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_sint64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sint64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_fixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fixed32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint32) + fc.Result = res + return ec.marshalOInt2uint32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_fixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fixed64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(uint64) + fc.Result = res + return ec.marshalOInt2uint64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_sfixed32(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sfixed32, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int32) + fc.Result = res + return ec.marshalOInt2int32(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_sfixed64(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Sfixed64, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_bool(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bool, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalOBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StringX, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Scalars_bytes(ctx context.Context, field graphql.CollectedField, obj *pb.Scalars) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Scalars", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Bytes, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]byte) + fc.Result = res + return ec.marshalOBytes2ᚕbyte(ctx, field.Selections, res) +} + +func (ec *executionContext) _Timestamp_time(ctx context.Context, field graphql.CollectedField, obj *pb.Timestamp) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Timestamp", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Time, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Locations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field___Type_fields_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field___Type_enumValues_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +func (ec *executionContext) unmarshalInputBazInput(ctx context.Context, obj interface{}) (pb.Baz, error) { + var it pb.Baz + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputFooInput(ctx context.Context, obj interface{}) (pb.Foo, error) { + var it pb.Foo + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "param2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param2")) + it.Param2, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputFoo_Foo2Input(ctx context.Context, obj interface{}) (pb.Foo_Foo2, error) { + var it pb.Foo_Foo2 + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGoogleProtobuf_TimestampInput(ctx context.Context, obj interface{}) (timestamppb.Timestamp, error) { + var it timestamppb.Timestamp + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "seconds": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("seconds")) + it.Seconds, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "nanos": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nanos")) + it.Nanos, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMapsInput(ctx context.Context, obj interface{}) (pb.Maps, error) { + var it pb.Maps + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "int32Int32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int32Int32")) + data, err := ec.unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Int32Int32(ctx, &it, data); err != nil { + return it, err + } + case "int64Int64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int64Int64")) + data, err := ec.unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Int64Int64(ctx, &it, data); err != nil { + return it, err + } + case "uint32Uint32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint32Uint32")) + data, err := ec.unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Uint32Uint32(ctx, &it, data); err != nil { + return it, err + } + case "uint64Uint64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint64Uint64")) + data, err := ec.unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Uint64Uint64(ctx, &it, data); err != nil { + return it, err + } + case "sint32Sint32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint32Sint32")) + data, err := ec.unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Sint32Sint32(ctx, &it, data); err != nil { + return it, err + } + case "sint64Sint64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint64Sint64")) + data, err := ec.unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Sint64Sint64(ctx, &it, data); err != nil { + return it, err + } + case "fixed32Fixed32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed32Fixed32")) + data, err := ec.unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Fixed32Fixed32(ctx, &it, data); err != nil { + return it, err + } + case "fixed64Fixed64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed64Fixed64")) + data, err := ec.unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Fixed64Fixed64(ctx, &it, data); err != nil { + return it, err + } + case "sfixed32Sfixed32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed32Sfixed32")) + data, err := ec.unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Sfixed32Sfixed32(ctx, &it, data); err != nil { + return it, err + } + case "sfixed64Sfixed64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed64Sfixed64")) + data, err := ec.unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().Sfixed64Sfixed64(ctx, &it, data); err != nil { + return it, err + } + case "boolBool": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("boolBool")) + data, err := ec.unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().BoolBool(ctx, &it, data); err != nil { + return it, err + } + case "stringString": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringString")) + data, err := ec.unmarshalOMaps_StringStringEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().StringString(ctx, &it, data); err != nil { + return it, err + } + case "stringBytes": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringBytes")) + data, err := ec.unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().StringBytes(ctx, &it, data); err != nil { + return it, err + } + case "stringFloat": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringFloat")) + data, err := ec.unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().StringFloat(ctx, &it, data); err != nil { + return it, err + } + case "stringDouble": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringDouble")) + data, err := ec.unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().StringDouble(ctx, &it, data); err != nil { + return it, err + } + case "stringFoo": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringFoo")) + data, err := ec.unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().StringFoo(ctx, &it, data); err != nil { + return it, err + } + case "stringBar": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringBar")) + data, err := ec.unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MapsInput().StringBar(ctx, &it, data); err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_BoolBoolEntryInput(ctx context.Context, obj interface{}) (pb.Maps_BoolBoolEntry, error) { + var it pb.Maps_BoolBoolEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Fixed32Fixed32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Fixed32Fixed32Entry, error) { + var it pb.Maps_Fixed32Fixed32Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2uint32(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2uint32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Fixed64Fixed64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Fixed64Fixed64Entry, error) { + var it pb.Maps_Fixed64Fixed64Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2uint64(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2uint64(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Int32Int32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Int32Int32Entry, error) { + var it pb.Maps_Int32Int32Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Int64Int64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Int64Int64Entry, error) { + var it pb.Maps_Int64Int64Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Sfixed32Sfixed32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sfixed32Sfixed32Entry, error) { + var it pb.Maps_Sfixed32Sfixed32Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Sfixed64Sfixed64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sfixed64Sfixed64Entry, error) { + var it pb.Maps_Sfixed64Sfixed64Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Sint32Sint32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sint32Sint32Entry, error) { + var it pb.Maps_Sint32Sint32Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Sint64Sint64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Sint64Sint64Entry, error) { + var it pb.Maps_Sint64Sint64Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_StringBarEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringBarEntry, error) { + var it pb.Maps_StringBarEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_StringBytesEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringBytesEntry, error) { + var it pb.Maps_StringBytesEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOBytes2ᚕbyte(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_StringDoubleEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringDoubleEntry, error) { + var it pb.Maps_StringDoubleEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOFloat2float64(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_StringFloatEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringFloatEntry, error) { + var it pb.Maps_StringFloatEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOFloat2float32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_StringFooEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringFooEntry, error) { + var it pb.Maps_StringFooEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_StringStringEntryInput(ctx context.Context, obj interface{}) (pb.Maps_StringStringEntry, error) { + var it pb.Maps_StringStringEntry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Uint32Uint32EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Uint32Uint32Entry, error) { + var it pb.Maps_Uint32Uint32Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2uint32(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2uint32(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMaps_Uint64Uint64EntryInput(ctx context.Context, obj interface{}) (pb.Maps_Uint64Uint64Entry, error) { + var it pb.Maps_Uint64Uint64Entry + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + it.Key, err = ec.unmarshalOInt2uint64(ctx, v) + if err != nil { + return it, err + } + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + it.Value, err = ec.unmarshalOInt2uint64(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputOneofInput(ctx context.Context, obj interface{}) (pb.Oneof, error) { + var it pb.Oneof + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "param2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param2")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Oneof_Oneof1 == nil { + return nil, errors.New("directive Oneof_Oneof1 is not implemented") + } + return ec.directives.Oneof_Oneof1(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.OneofInput().Param2(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + case "param3": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param3")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Oneof_Oneof1 == nil { + return nil, errors.New("directive Oneof_Oneof1 is not implemented") + } + return ec.directives.Oneof_Oneof1(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.OneofInput().Param3(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + case "param4": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param4")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Oneof_Oneof2 == nil { + return nil, errors.New("directive Oneof_Oneof2 is not implemented") + } + return ec.directives.Oneof_Oneof2(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.OneofInput().Param4(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + case "param5": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param5")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Oneof_Oneof2 == nil { + return nil, errors.New("directive Oneof_Oneof2 is not implemented") + } + return ec.directives.Oneof_Oneof2(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.OneofInput().Param5(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + case "param6": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param6")) + directive0 := func(ctx context.Context) (interface{}, error) { return ec.unmarshalOString2ᚖstring(ctx, v) } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Oneof_Oneof3 == nil { + return nil, errors.New("directive Oneof_Oneof3 is not implemented") + } + return ec.directives.Oneof_Oneof3(ctx, obj, directive0) + } + + tmp, err := directive1(ctx) + if err != nil { + return it, graphql.ErrorOnPath(ctx, err) + } + if data, ok := tmp.(*string); ok { + if err = ec.resolvers.OneofInput().Param6(ctx, &it, data); err != nil { + return it, err + } + } else { + err := fmt.Errorf(`unexpected type %T from directive, should be *string`, tmp) + return it, graphql.ErrorOnPath(ctx, err) + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRefInput(ctx context.Context, obj interface{}) (pb.Ref, error) { + var it pb.Ref + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "localTime2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("localTime2")) + it.LocalTime2, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, v) + if err != nil { + return it, err + } + case "external": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("external")) + it.External, err = ec.unmarshalOGoogleProtobuf_TimestampInput2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx, v) + if err != nil { + return it, err + } + case "localTime": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("localTime")) + it.LocalTime, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, v) + if err != nil { + return it, err + } + case "file": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("file")) + it.File, err = ec.unmarshalOBazInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx, v) + if err != nil { + return it, err + } + case "fileMsg": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileMsg")) + it.FileMsg, err = ec.unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, v) + if err != nil { + return it, err + } + case "fileEnum": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileEnum")) + it.FileEnum, err = ec.unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, v) + if err != nil { + return it, err + } + case "local": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("local")) + it.Local, err = ec.unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx, v) + if err != nil { + return it, err + } + case "foreign": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foreign")) + it.Foreign, err = ec.unmarshalOFoo_Foo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx, v) + if err != nil { + return it, err + } + case "en1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en1")) + it.En1, err = ec.unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, v) + if err != nil { + return it, err + } + case "en2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en2")) + it.En2, err = ec.unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, v) + if err != nil { + return it, err + } + case "gz": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("gz")) + it.Gz, err = ec.unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRef_BarInput(ctx context.Context, obj interface{}) (pb.Ref_Bar, error) { + var it pb.Ref_Bar + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRef_FooInput(ctx context.Context, obj interface{}) (pb.Ref_Foo, error) { + var it pb.Ref_Foo + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "bar1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar1")) + it.Bar1, err = ec.unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx, v) + if err != nil { + return it, err + } + case "localTime2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("localTime2")) + it.LocalTime2, err = ec.unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx, v) + if err != nil { + return it, err + } + case "externalTime1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("externalTime1")) + it.ExternalTime1, err = ec.unmarshalOGoogleProtobuf_TimestampInput2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx, v) + if err != nil { + return it, err + } + case "bar2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar2")) + it.Bar2, err = ec.unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx, v) + if err != nil { + return it, err + } + case "en1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en1")) + it.En1, err = ec.unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx, v) + if err != nil { + return it, err + } + case "en2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("en2")) + it.En2, err = ec.unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRef_Foo_BarInput(ctx context.Context, obj interface{}) (pb.Ref_Foo_Bar, error) { + var it pb.Ref_Foo_Bar + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRef_Foo_Baz_GzInput(ctx context.Context, obj interface{}) (pb.Ref_Foo_Baz_Gz, error) { + var it pb.Ref_Foo_Baz_Gz + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputRepeatedInput(ctx context.Context, obj interface{}) (pb.Repeated, error) { + var it pb.Repeated + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "double": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("double")) + it.Double, err = ec.unmarshalOFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "float": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("float")) + it.Float, err = ec.unmarshalOFloat2ᚕfloat32ᚄ(ctx, v) + if err != nil { + return it, err + } + case "int32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int32")) + it.Int32, err = ec.unmarshalOInt2ᚕint32ᚄ(ctx, v) + if err != nil { + return it, err + } + case "int64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int64")) + it.Int64, err = ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "uint32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint32")) + it.Uint32, err = ec.unmarshalOInt2ᚕuint32ᚄ(ctx, v) + if err != nil { + return it, err + } + case "uint64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint64")) + it.Uint64, err = ec.unmarshalOInt2ᚕuint64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "sint32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint32")) + it.Sint32, err = ec.unmarshalOInt2ᚕint32ᚄ(ctx, v) + if err != nil { + return it, err + } + case "sint64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint64")) + it.Sint64, err = ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "fixed32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed32")) + it.Fixed32, err = ec.unmarshalOInt2ᚕuint32ᚄ(ctx, v) + if err != nil { + return it, err + } + case "fixed64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed64")) + it.Fixed64, err = ec.unmarshalOInt2ᚕuint64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "sfixed32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed32")) + it.Sfixed32, err = ec.unmarshalOInt2ᚕint32ᚄ(ctx, v) + if err != nil { + return it, err + } + case "sfixed64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed64")) + it.Sfixed64, err = ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "bool": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bool")) + it.Bool, err = ec.unmarshalOBoolean2ᚕboolᚄ(ctx, v) + if err != nil { + return it, err + } + case "stringX": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringX")) + it.StringX, err = ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + case "bytes": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bytes")) + it.Bytes, err = ec.unmarshalOBytes2ᚕᚕbyteᚄ(ctx, v) + if err != nil { + return it, err + } + case "foo": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) + it.Foo, err = ec.unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx, v) + if err != nil { + return it, err + } + case "bar": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bar")) + it.Bar, err = ec.unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputScalarsInput(ctx context.Context, obj interface{}) (pb.Scalars, error) { + var it pb.Scalars + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "double": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("double")) + it.Double, err = ec.unmarshalOFloat2float64(ctx, v) + if err != nil { + return it, err + } + case "float": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("float")) + it.Float, err = ec.unmarshalOFloat2float32(ctx, v) + if err != nil { + return it, err + } + case "int32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int32")) + it.Int32, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + case "int64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("int64")) + it.Int64, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "uint32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint32")) + it.Uint32, err = ec.unmarshalOInt2uint32(ctx, v) + if err != nil { + return it, err + } + case "uint64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("uint64")) + it.Uint64, err = ec.unmarshalOInt2uint64(ctx, v) + if err != nil { + return it, err + } + case "sint32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint32")) + it.Sint32, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + case "sint64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sint64")) + it.Sint64, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "fixed32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed32")) + it.Fixed32, err = ec.unmarshalOInt2uint32(ctx, v) + if err != nil { + return it, err + } + case "fixed64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fixed64")) + it.Fixed64, err = ec.unmarshalOInt2uint64(ctx, v) + if err != nil { + return it, err + } + case "sfixed32": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed32")) + it.Sfixed32, err = ec.unmarshalOInt2int32(ctx, v) + if err != nil { + return it, err + } + case "sfixed64": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sfixed64")) + it.Sfixed64, err = ec.unmarshalOInt2int64(ctx, v) + if err != nil { + return it, err + } + case "bool": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bool")) + it.Bool, err = ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + case "stringX": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringX")) + it.StringX, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "bytes": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bytes")) + it.Bytes, err = ec.unmarshalOBytes2ᚕbyte(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputTimestampInput(ctx context.Context, obj interface{}) (pb.Timestamp, error) { + var it pb.Timestamp + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "time": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("time")) + it.Time, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +func (ec *executionContext) _Oneof_Oneof1(ctx context.Context, sel ast.SelectionSet, obj pb.Oneof_Oneof1) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case pb.Oneof_Param2: + return ec._Oneof_Param2(ctx, sel, &obj) + case *pb.Oneof_Param2: + if obj == nil { + return graphql.Null + } + return ec._Oneof_Param2(ctx, sel, obj) + case pb.Oneof_Param3: + return ec._Oneof_Param3(ctx, sel, &obj) + case *pb.Oneof_Param3: + if obj == nil { + return graphql.Null + } + return ec._Oneof_Param3(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +func (ec *executionContext) _Oneof_Oneof2(ctx context.Context, sel ast.SelectionSet, obj pb.Oneof_Oneof2) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case pb.Oneof_Param4: + return ec._Oneof_Param4(ctx, sel, &obj) + case *pb.Oneof_Param4: + if obj == nil { + return graphql.Null + } + return ec._Oneof_Param4(ctx, sel, obj) + case pb.Oneof_Param5: + return ec._Oneof_Param5(ctx, sel, &obj) + case *pb.Oneof_Param5: + if obj == nil { + return graphql.Null + } + return ec._Oneof_Param5(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +func (ec *executionContext) _Oneof_Oneof3(ctx context.Context, sel ast.SelectionSet, obj pb.Oneof_Oneof3) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case pb.Oneof_Param6: + return ec._Oneof_Param6(ctx, sel, &obj) + case *pb.Oneof_Param6: + if obj == nil { + return graphql.Null + } + return ec._Oneof_Param6(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +// endregion ************************** interface.gotpl *************************** + +// region **************************** object.gotpl **************************** + +var bazImplementors = []string{"Baz"} + +func (ec *executionContext) _Baz(ctx context.Context, sel ast.SelectionSet, obj *pb.Baz) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, bazImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Baz") + case "param1": + out.Values[i] = ec._Baz_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var fooImplementors = []string{"Foo"} + +func (ec *executionContext) _Foo(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, fooImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Foo") + case "param1": + out.Values[i] = ec._Foo_param1(ctx, field, obj) + case "param2": + out.Values[i] = ec._Foo_param2(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var foo_Foo2Implementors = []string{"Foo_Foo2"} + +func (ec *executionContext) _Foo_Foo2(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo_Foo2) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, foo_Foo2Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Foo_Foo2") + case "param1": + out.Values[i] = ec._Foo_Foo2_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var googleProtobuf_TimestampImplementors = []string{"GoogleProtobuf_Timestamp"} + +func (ec *executionContext) _GoogleProtobuf_Timestamp(ctx context.Context, sel ast.SelectionSet, obj *timestamppb.Timestamp) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, googleProtobuf_TimestampImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("GoogleProtobuf_Timestamp") + case "seconds": + out.Values[i] = ec._GoogleProtobuf_Timestamp_seconds(ctx, field, obj) + case "nanos": + out.Values[i] = ec._GoogleProtobuf_Timestamp_nanos(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var mapsImplementors = []string{"Maps"} + +func (ec *executionContext) _Maps(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mapsImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps") + case "int32Int32": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_int32Int32(ctx, field, obj) + return res + }) + case "int64Int64": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_int64Int64(ctx, field, obj) + return res + }) + case "uint32Uint32": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_uint32Uint32(ctx, field, obj) + return res + }) + case "uint64Uint64": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_uint64Uint64(ctx, field, obj) + return res + }) + case "sint32Sint32": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_sint32Sint32(ctx, field, obj) + return res + }) + case "sint64Sint64": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_sint64Sint64(ctx, field, obj) + return res + }) + case "fixed32Fixed32": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_fixed32Fixed32(ctx, field, obj) + return res + }) + case "fixed64Fixed64": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_fixed64Fixed64(ctx, field, obj) + return res + }) + case "sfixed32Sfixed32": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_sfixed32Sfixed32(ctx, field, obj) + return res + }) + case "sfixed64Sfixed64": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_sfixed64Sfixed64(ctx, field, obj) + return res + }) + case "boolBool": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_boolBool(ctx, field, obj) + return res + }) + case "stringString": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_stringString(ctx, field, obj) + return res + }) + case "stringBytes": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_stringBytes(ctx, field, obj) + return res + }) + case "stringFloat": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_stringFloat(ctx, field, obj) + return res + }) + case "stringDouble": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_stringDouble(ctx, field, obj) + return res + }) + case "stringFoo": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_stringFoo(ctx, field, obj) + return res + }) + case "stringBar": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Maps_stringBar(ctx, field, obj) + return res + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_BoolBoolEntryImplementors = []string{"Maps_BoolBoolEntry"} + +func (ec *executionContext) _Maps_BoolBoolEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_BoolBoolEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_BoolBoolEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_BoolBoolEntry") + case "key": + out.Values[i] = ec._Maps_BoolBoolEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_BoolBoolEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Fixed32Fixed32EntryImplementors = []string{"Maps_Fixed32Fixed32Entry"} + +func (ec *executionContext) _Maps_Fixed32Fixed32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Fixed32Fixed32EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Fixed32Fixed32Entry") + case "key": + out.Values[i] = ec._Maps_Fixed32Fixed32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Fixed32Fixed32Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Fixed64Fixed64EntryImplementors = []string{"Maps_Fixed64Fixed64Entry"} + +func (ec *executionContext) _Maps_Fixed64Fixed64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Fixed64Fixed64EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Fixed64Fixed64Entry") + case "key": + out.Values[i] = ec._Maps_Fixed64Fixed64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Fixed64Fixed64Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Int32Int32EntryImplementors = []string{"Maps_Int32Int32Entry"} + +func (ec *executionContext) _Maps_Int32Int32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Int32Int32Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Int32Int32EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Int32Int32Entry") + case "key": + out.Values[i] = ec._Maps_Int32Int32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Int32Int32Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Int64Int64EntryImplementors = []string{"Maps_Int64Int64Entry"} + +func (ec *executionContext) _Maps_Int64Int64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Int64Int64Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Int64Int64EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Int64Int64Entry") + case "key": + out.Values[i] = ec._Maps_Int64Int64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Int64Int64Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Sfixed32Sfixed32EntryImplementors = []string{"Maps_Sfixed32Sfixed32Entry"} + +func (ec *executionContext) _Maps_Sfixed32Sfixed32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sfixed32Sfixed32EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Sfixed32Sfixed32Entry") + case "key": + out.Values[i] = ec._Maps_Sfixed32Sfixed32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sfixed32Sfixed32Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Sfixed64Sfixed64EntryImplementors = []string{"Maps_Sfixed64Sfixed64Entry"} + +func (ec *executionContext) _Maps_Sfixed64Sfixed64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sfixed64Sfixed64EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Sfixed64Sfixed64Entry") + case "key": + out.Values[i] = ec._Maps_Sfixed64Sfixed64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sfixed64Sfixed64Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Sint32Sint32EntryImplementors = []string{"Maps_Sint32Sint32Entry"} + +func (ec *executionContext) _Maps_Sint32Sint32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sint32Sint32Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sint32Sint32EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Sint32Sint32Entry") + case "key": + out.Values[i] = ec._Maps_Sint32Sint32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sint32Sint32Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Sint64Sint64EntryImplementors = []string{"Maps_Sint64Sint64Entry"} + +func (ec *executionContext) _Maps_Sint64Sint64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Sint64Sint64Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Sint64Sint64EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Sint64Sint64Entry") + case "key": + out.Values[i] = ec._Maps_Sint64Sint64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Sint64Sint64Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_StringBarEntryImplementors = []string{"Maps_StringBarEntry"} + +func (ec *executionContext) _Maps_StringBarEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringBarEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringBarEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_StringBarEntry") + case "key": + out.Values[i] = ec._Maps_StringBarEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringBarEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_StringBytesEntryImplementors = []string{"Maps_StringBytesEntry"} + +func (ec *executionContext) _Maps_StringBytesEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringBytesEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringBytesEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_StringBytesEntry") + case "key": + out.Values[i] = ec._Maps_StringBytesEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringBytesEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_StringDoubleEntryImplementors = []string{"Maps_StringDoubleEntry"} + +func (ec *executionContext) _Maps_StringDoubleEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringDoubleEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringDoubleEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_StringDoubleEntry") + case "key": + out.Values[i] = ec._Maps_StringDoubleEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringDoubleEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_StringFloatEntryImplementors = []string{"Maps_StringFloatEntry"} + +func (ec *executionContext) _Maps_StringFloatEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringFloatEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringFloatEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_StringFloatEntry") + case "key": + out.Values[i] = ec._Maps_StringFloatEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringFloatEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_StringFooEntryImplementors = []string{"Maps_StringFooEntry"} + +func (ec *executionContext) _Maps_StringFooEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringFooEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringFooEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_StringFooEntry") + case "key": + out.Values[i] = ec._Maps_StringFooEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringFooEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_StringStringEntryImplementors = []string{"Maps_StringStringEntry"} + +func (ec *executionContext) _Maps_StringStringEntry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_StringStringEntry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_StringStringEntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_StringStringEntry") + case "key": + out.Values[i] = ec._Maps_StringStringEntry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_StringStringEntry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Uint32Uint32EntryImplementors = []string{"Maps_Uint32Uint32Entry"} + +func (ec *executionContext) _Maps_Uint32Uint32Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Uint32Uint32Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Uint32Uint32EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Uint32Uint32Entry") + case "key": + out.Values[i] = ec._Maps_Uint32Uint32Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Uint32Uint32Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var maps_Uint64Uint64EntryImplementors = []string{"Maps_Uint64Uint64Entry"} + +func (ec *executionContext) _Maps_Uint64Uint64Entry(ctx context.Context, sel ast.SelectionSet, obj *pb.Maps_Uint64Uint64Entry) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, maps_Uint64Uint64EntryImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Maps_Uint64Uint64Entry") + case "key": + out.Values[i] = ec._Maps_Uint64Uint64Entry_key(ctx, field, obj) + case "value": + out.Values[i] = ec._Maps_Uint64Uint64Entry_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var mutationImplementors = []string{"Mutation"} + +func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) + + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Mutation", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Mutation") + case "constructsScalars_": + out.Values[i] = ec._Mutation_constructsScalars_(ctx, field) + case "constructsRepeated_": + out.Values[i] = ec._Mutation_constructsRepeated_(ctx, field) + case "constructsMaps_": + out.Values[i] = ec._Mutation_constructsMaps_(ctx, field) + case "constructsAny_": + out.Values[i] = ec._Mutation_constructsAny_(ctx, field) + case "constructsEmpty_": + out.Values[i] = ec._Mutation_constructsEmpty_(ctx, field) + case "constructsEmpty2_": + out.Values[i] = ec._Mutation_constructsEmpty2_(ctx, field) + case "constructsEmpty3_": + out.Values[i] = ec._Mutation_constructsEmpty3_(ctx, field) + case "constructsRef_": + out.Values[i] = ec._Mutation_constructsRef_(ctx, field) + case "constructsOneof_": + out.Values[i] = ec._Mutation_constructsOneof_(ctx, field) + case "constructsCallWithId": + out.Values[i] = ec._Mutation_constructsCallWithId(ctx, field) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var oneofImplementors = []string{"Oneof"} + +func (ec *executionContext) _Oneof(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, oneofImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oneof") + case "param1": + out.Values[i] = ec._Oneof_param1(ctx, field, obj) + case "oneof1": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Oneof_oneof1(ctx, field, obj) + return res + }) + case "oneof2": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Oneof_oneof2(ctx, field, obj) + return res + }) + case "oneof3": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Oneof_oneof3(ctx, field, obj) + return res + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var oneof_Param2Implementors = []string{"Oneof_Param2", "Oneof_Oneof1"} + +func (ec *executionContext) _Oneof_Param2(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param2) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param2Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oneof_Param2") + case "param2": + out.Values[i] = ec._Oneof_Param2_param2(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var oneof_Param3Implementors = []string{"Oneof_Param3", "Oneof_Oneof1"} + +func (ec *executionContext) _Oneof_Param3(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param3) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param3Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oneof_Param3") + case "param3": + out.Values[i] = ec._Oneof_Param3_param3(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var oneof_Param4Implementors = []string{"Oneof_Param4", "Oneof_Oneof2"} + +func (ec *executionContext) _Oneof_Param4(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param4) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param4Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oneof_Param4") + case "param4": + out.Values[i] = ec._Oneof_Param4_param4(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var oneof_Param5Implementors = []string{"Oneof_Param5", "Oneof_Oneof2"} + +func (ec *executionContext) _Oneof_Param5(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param5) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param5Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oneof_Param5") + case "param5": + out.Values[i] = ec._Oneof_Param5_param5(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var oneof_Param6Implementors = []string{"Oneof_Param6", "Oneof_Oneof3"} + +func (ec *executionContext) _Oneof_Param6(ctx context.Context, sel ast.SelectionSet, obj *pb.Oneof_Param6) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, oneof_Param6Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oneof_Param6") + case "param6": + out.Values[i] = ec._Oneof_Param6_param6(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var pb_AnyImplementors = []string{"Pb_Any"} + +func (ec *executionContext) _Pb_Any(ctx context.Context, sel ast.SelectionSet, obj *pb.Any) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, pb_AnyImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Pb_Any") + case "param1": + out.Values[i] = ec._Pb_Any_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var queryImplementors = []string{"Query"} + +func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) + + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Query", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Query") + case "dummy": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_dummy(ctx, field) + return res + }) + case "__type": + out.Values[i] = ec._Query___type(ctx, field) + case "__schema": + out.Values[i] = ec._Query___schema(ctx, field) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var refImplementors = []string{"Ref"} + +func (ec *executionContext) _Ref(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, refImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Ref") + case "localTime2": + out.Values[i] = ec._Ref_localTime2(ctx, field, obj) + case "external": + out.Values[i] = ec._Ref_external(ctx, field, obj) + case "localTime": + out.Values[i] = ec._Ref_localTime(ctx, field, obj) + case "file": + out.Values[i] = ec._Ref_file(ctx, field, obj) + case "fileMsg": + out.Values[i] = ec._Ref_fileMsg(ctx, field, obj) + case "fileEnum": + out.Values[i] = ec._Ref_fileEnum(ctx, field, obj) + case "local": + out.Values[i] = ec._Ref_local(ctx, field, obj) + case "foreign": + out.Values[i] = ec._Ref_foreign(ctx, field, obj) + case "en1": + out.Values[i] = ec._Ref_en1(ctx, field, obj) + case "en2": + out.Values[i] = ec._Ref_en2(ctx, field, obj) + case "gz": + out.Values[i] = ec._Ref_gz(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var ref_BarImplementors = []string{"Ref_Bar"} + +func (ec *executionContext) _Ref_Bar(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Bar) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, ref_BarImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Ref_Bar") + case "param1": + out.Values[i] = ec._Ref_Bar_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var ref_FooImplementors = []string{"Ref_Foo"} + +func (ec *executionContext) _Ref_Foo(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Foo) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, ref_FooImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Ref_Foo") + case "bar1": + out.Values[i] = ec._Ref_Foo_bar1(ctx, field, obj) + case "localTime2": + out.Values[i] = ec._Ref_Foo_localTime2(ctx, field, obj) + case "externalTime1": + out.Values[i] = ec._Ref_Foo_externalTime1(ctx, field, obj) + case "bar2": + out.Values[i] = ec._Ref_Foo_bar2(ctx, field, obj) + case "en1": + out.Values[i] = ec._Ref_Foo_en1(ctx, field, obj) + case "en2": + out.Values[i] = ec._Ref_Foo_en2(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var ref_Foo_BarImplementors = []string{"Ref_Foo_Bar"} + +func (ec *executionContext) _Ref_Foo_Bar(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Foo_Bar) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, ref_Foo_BarImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Ref_Foo_Bar") + case "param1": + out.Values[i] = ec._Ref_Foo_Bar_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var ref_Foo_Baz_GzImplementors = []string{"Ref_Foo_Baz_Gz"} + +func (ec *executionContext) _Ref_Foo_Baz_Gz(ctx context.Context, sel ast.SelectionSet, obj *pb.Ref_Foo_Baz_Gz) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, ref_Foo_Baz_GzImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Ref_Foo_Baz_Gz") + case "param1": + out.Values[i] = ec._Ref_Foo_Baz_Gz_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var repeatedImplementors = []string{"Repeated"} + +func (ec *executionContext) _Repeated(ctx context.Context, sel ast.SelectionSet, obj *pb.Repeated) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, repeatedImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Repeated") + case "double": + out.Values[i] = ec._Repeated_double(ctx, field, obj) + case "float": + out.Values[i] = ec._Repeated_float(ctx, field, obj) + case "int32": + out.Values[i] = ec._Repeated_int32(ctx, field, obj) + case "int64": + out.Values[i] = ec._Repeated_int64(ctx, field, obj) + case "uint32": + out.Values[i] = ec._Repeated_uint32(ctx, field, obj) + case "uint64": + out.Values[i] = ec._Repeated_uint64(ctx, field, obj) + case "sint32": + out.Values[i] = ec._Repeated_sint32(ctx, field, obj) + case "sint64": + out.Values[i] = ec._Repeated_sint64(ctx, field, obj) + case "fixed32": + out.Values[i] = ec._Repeated_fixed32(ctx, field, obj) + case "fixed64": + out.Values[i] = ec._Repeated_fixed64(ctx, field, obj) + case "sfixed32": + out.Values[i] = ec._Repeated_sfixed32(ctx, field, obj) + case "sfixed64": + out.Values[i] = ec._Repeated_sfixed64(ctx, field, obj) + case "bool": + out.Values[i] = ec._Repeated_bool(ctx, field, obj) + case "stringX": + out.Values[i] = ec._Repeated_stringX(ctx, field, obj) + case "bytes": + out.Values[i] = ec._Repeated_bytes(ctx, field, obj) + case "foo": + out.Values[i] = ec._Repeated_foo(ctx, field, obj) + case "bar": + out.Values[i] = ec._Repeated_bar(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var scalarsImplementors = []string{"Scalars"} + +func (ec *executionContext) _Scalars(ctx context.Context, sel ast.SelectionSet, obj *pb.Scalars) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, scalarsImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Scalars") + case "double": + out.Values[i] = ec._Scalars_double(ctx, field, obj) + case "float": + out.Values[i] = ec._Scalars_float(ctx, field, obj) + case "int32": + out.Values[i] = ec._Scalars_int32(ctx, field, obj) + case "int64": + out.Values[i] = ec._Scalars_int64(ctx, field, obj) + case "uint32": + out.Values[i] = ec._Scalars_uint32(ctx, field, obj) + case "uint64": + out.Values[i] = ec._Scalars_uint64(ctx, field, obj) + case "sint32": + out.Values[i] = ec._Scalars_sint32(ctx, field, obj) + case "sint64": + out.Values[i] = ec._Scalars_sint64(ctx, field, obj) + case "fixed32": + out.Values[i] = ec._Scalars_fixed32(ctx, field, obj) + case "fixed64": + out.Values[i] = ec._Scalars_fixed64(ctx, field, obj) + case "sfixed32": + out.Values[i] = ec._Scalars_sfixed32(ctx, field, obj) + case "sfixed64": + out.Values[i] = ec._Scalars_sfixed64(ctx, field, obj) + case "bool": + out.Values[i] = ec._Scalars_bool(ctx, field, obj) + case "stringX": + out.Values[i] = ec._Scalars_stringX(ctx, field, obj) + case "bytes": + out.Values[i] = ec._Scalars_bytes(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var timestampImplementors = []string{"Timestamp"} + +func (ec *executionContext) _Timestamp(ctx context.Context, sel ast.SelectionSet, obj *pb.Timestamp) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, timestampImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Timestamp") + case "time": + out.Values[i] = ec._Timestamp_time(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __DirectiveImplementors = []string{"__Directive"} + +func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Directive") + case "name": + out.Values[i] = ec.___Directive_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __EnumValueImplementors = []string{"__EnumValue"} + +func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__EnumValue") + case "name": + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __FieldImplementors = []string{"__Field"} + +func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Field") + case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __InputValueImplementors = []string{"__InputValue"} + +func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__InputValue") + case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __SchemaImplementors = []string{"__Schema"} + +func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Schema") + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __TypeImplementors = []string{"__Type"} + +func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Type") + case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +// endregion **************************** object.gotpl **************************** + +// region ***************************** type.gotpl ***************************** + +func (ec *executionContext) unmarshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, v interface{}) (pb.Bar, error) { + res, err := pb.UnmarshalBar(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, sel ast.SelectionSet, v pb.Bar) graphql.Marshaler { + res := pb.MarshalBar(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNBytes2ᚕbyte(ctx context.Context, v interface{}) ([]byte, error) { + res, err := types.UnmarshalBytes(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := types.MarshalBytes(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNFloat2float32(ctx context.Context, v interface{}) (float32, error) { + res, err := types.UnmarshalFloat32(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNFloat2float32(ctx context.Context, sel ast.SelectionSet, v float32) graphql.Marshaler { + res := types.MarshalFloat32(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { + res, err := graphql.UnmarshalFloat(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { + res := graphql.MarshalFloat(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) marshalNFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, sel ast.SelectionSet, v *pb.Foo) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Foo(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, v interface{}) (*pb.Foo, error) { + res, err := ec.unmarshalInputFooInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNInt2int32(ctx context.Context, v interface{}) (int32, error) { + res, err := graphql.UnmarshalInt32(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { + res := graphql.MarshalInt32(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { + res, err := graphql.UnmarshalInt64(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { + res := graphql.MarshalInt64(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNInt2uint32(ctx context.Context, v interface{}) (uint32, error) { + res, err := types.UnmarshalUint32(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2uint32(ctx context.Context, sel ast.SelectionSet, v uint32) graphql.Marshaler { + res := types.MarshalUint32(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNInt2uint64(ctx context.Context, v interface{}) (uint64, error) { + res, err := types.UnmarshalUint64(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2uint64(ctx context.Context, sel ast.SelectionSet, v uint64) graphql.Marshaler { + res := types.MarshalUint64(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) marshalNMaps_BoolBoolEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_BoolBoolEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_BoolBoolEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_BoolBoolEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx context.Context, v interface{}) (*pb.Maps_BoolBoolEntry, error) { + res, err := ec.unmarshalInputMaps_BoolBoolEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Fixed32Fixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Fixed32Fixed32Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Fixed32Fixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx context.Context, v interface{}) (*pb.Maps_Fixed32Fixed32Entry, error) { + res, err := ec.unmarshalInputMaps_Fixed32Fixed32EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Fixed64Fixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Fixed64Fixed64Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Fixed64Fixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx context.Context, v interface{}) (*pb.Maps_Fixed64Fixed64Entry, error) { + res, err := ec.unmarshalInputMaps_Fixed64Fixed64EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Int32Int32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Int32Int32Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Int32Int32Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Int32Int32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx context.Context, v interface{}) (*pb.Maps_Int32Int32Entry, error) { + res, err := ec.unmarshalInputMaps_Int32Int32EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Int64Int64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Int64Int64Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Int64Int64Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Int64Int64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx context.Context, v interface{}) (*pb.Maps_Int64Int64Entry, error) { + res, err := ec.unmarshalInputMaps_Int64Int64EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Sfixed32Sfixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Sfixed32Sfixed32Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Sfixed32Sfixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx context.Context, v interface{}) (*pb.Maps_Sfixed32Sfixed32Entry, error) { + res, err := ec.unmarshalInputMaps_Sfixed32Sfixed32EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Sfixed64Sfixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Sfixed64Sfixed64Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Sfixed64Sfixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx context.Context, v interface{}) (*pb.Maps_Sfixed64Sfixed64Entry, error) { + res, err := ec.unmarshalInputMaps_Sfixed64Sfixed64EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Sint32Sint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sint32Sint32Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Sint32Sint32Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Sint32Sint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx context.Context, v interface{}) (*pb.Maps_Sint32Sint32Entry, error) { + res, err := ec.unmarshalInputMaps_Sint32Sint32EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Sint64Sint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Sint64Sint64Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Sint64Sint64Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Sint64Sint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx context.Context, v interface{}) (*pb.Maps_Sint64Sint64Entry, error) { + res, err := ec.unmarshalInputMaps_Sint64Sint64EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_StringBarEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringBarEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_StringBarEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_StringBarEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx context.Context, v interface{}) (*pb.Maps_StringBarEntry, error) { + res, err := ec.unmarshalInputMaps_StringBarEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_StringBytesEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringBytesEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_StringBytesEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_StringBytesEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx context.Context, v interface{}) (*pb.Maps_StringBytesEntry, error) { + res, err := ec.unmarshalInputMaps_StringBytesEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_StringDoubleEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringDoubleEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_StringDoubleEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_StringDoubleEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx context.Context, v interface{}) (*pb.Maps_StringDoubleEntry, error) { + res, err := ec.unmarshalInputMaps_StringDoubleEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_StringFloatEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringFloatEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_StringFloatEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_StringFloatEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx context.Context, v interface{}) (*pb.Maps_StringFloatEntry, error) { + res, err := ec.unmarshalInputMaps_StringFloatEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_StringFooEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringFooEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_StringFooEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_StringFooEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx context.Context, v interface{}) (*pb.Maps_StringFooEntry, error) { + res, err := ec.unmarshalInputMaps_StringFooEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_StringStringEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_StringStringEntry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_StringStringEntry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_StringStringEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx context.Context, v interface{}) (*pb.Maps_StringStringEntry, error) { + res, err := ec.unmarshalInputMaps_StringStringEntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Uint32Uint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Uint32Uint32Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Uint32Uint32Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Uint32Uint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx context.Context, v interface{}) (*pb.Maps_Uint32Uint32Entry, error) { + res, err := ec.unmarshalInputMaps_Uint32Uint32EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMaps_Uint64Uint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx context.Context, sel ast.SelectionSet, v *pb.Maps_Uint64Uint64Entry) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Maps_Uint64Uint64Entry(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNMaps_Uint64Uint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx context.Context, v interface{}) (*pb.Maps_Uint64Uint64Entry, error) { + res, err := ec.unmarshalInputMaps_Uint64Uint64EntryInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { + return ec.___Directive(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { + return ec.___EnumValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { + return ec.___Field(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { + return ec.___InputValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalOAny2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋanypbᚐAny(ctx context.Context, v interface{}) (*anypb.Any, error) { + if v == nil { + return nil, nil + } + res, err := types.UnmarshalAny(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOAny2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋanypbᚐAny(ctx context.Context, sel ast.SelectionSet, v *anypb.Any) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return types.MarshalAny(v) +} + +func (ec *executionContext) unmarshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, v interface{}) (pb.Bar, error) { + res, err := pb.UnmarshalBar(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx context.Context, sel ast.SelectionSet, v pb.Bar) graphql.Marshaler { + return pb.MarshalBar(v) +} + +func (ec *executionContext) unmarshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx context.Context, v interface{}) ([]pb.Bar, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]pb.Bar, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOBar2ᚕgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBarᚄ(ctx context.Context, sel ast.SelectionSet, v []pb.Bar) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNBar2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBar(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalOBaz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx context.Context, sel ast.SelectionSet, v *pb.Baz) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Baz(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOBazInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐBaz(ctx context.Context, v interface{}) (*pb.Baz, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputBazInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + return graphql.MarshalBoolean(v) +} + +func (ec *executionContext) unmarshalOBoolean2ᚕboolᚄ(ctx context.Context, v interface{}) ([]bool, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]bool, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNBoolean2bool(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOBoolean2ᚕboolᚄ(ctx context.Context, sel ast.SelectionSet, v []bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNBoolean2bool(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalBoolean(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.MarshalBoolean(*v) +} + +func (ec *executionContext) unmarshalOBytes2ᚕbyte(ctx context.Context, v interface{}) ([]byte, error) { + if v == nil { + return nil, nil + } + res, err := types.UnmarshalBytes(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBytes2ᚕbyte(ctx context.Context, sel ast.SelectionSet, v []byte) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return types.MarshalBytes(v) +} + +func (ec *executionContext) unmarshalOBytes2ᚕᚕbyteᚄ(ctx context.Context, v interface{}) ([][]byte, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([][]byte, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNBytes2ᚕbyte(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOBytes2ᚕᚕbyteᚄ(ctx context.Context, sel ast.SelectionSet, v [][]byte) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNBytes2ᚕbyte(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOFloat2float32(ctx context.Context, v interface{}) (float32, error) { + res, err := types.UnmarshalFloat32(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOFloat2float32(ctx context.Context, sel ast.SelectionSet, v float32) graphql.Marshaler { + return types.MarshalFloat32(v) +} + +func (ec *executionContext) unmarshalOFloat2float64(ctx context.Context, v interface{}) (float64, error) { + res, err := graphql.UnmarshalFloat(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { + return graphql.MarshalFloat(v) +} + +func (ec *executionContext) unmarshalOFloat2ᚕfloat32ᚄ(ctx context.Context, v interface{}) ([]float32, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]float32, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float32(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOFloat2ᚕfloat32ᚄ(ctx context.Context, sel ast.SelectionSet, v []float32) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float32(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]float64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) marshalOFoo2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Foo) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalOFoo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, sel ast.SelectionSet, v *pb.Foo) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Foo(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOFooInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFooᚄ(ctx context.Context, v interface{}) ([]*pb.Foo, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Foo, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOFooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo(ctx context.Context, v interface{}) (*pb.Foo, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputFooInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOFoo_Foo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo_Foo2) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Foo_Foo2(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOFoo_Foo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo_Foo2(ctx context.Context, v interface{}) (*pb.Foo_Foo2, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputFoo_Foo2Input(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGoogleProtobuf_Timestamp2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx context.Context, sel ast.SelectionSet, v *timestamppb.Timestamp) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._GoogleProtobuf_Timestamp(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGoogleProtobuf_TimestampInput2ᚖgoogleᚗgolangᚗorgᚋprotobufᚋtypesᚋknownᚋtimestamppbᚐTimestamp(ctx context.Context, v interface{}) (*timestamppb.Timestamp, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGoogleProtobuf_TimestampInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOInt2int32(ctx context.Context, v interface{}) (int32, error) { + res, err := graphql.UnmarshalInt32(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOInt2int32(ctx context.Context, sel ast.SelectionSet, v int32) graphql.Marshaler { + return graphql.MarshalInt32(v) +} + +func (ec *executionContext) unmarshalOInt2int64(ctx context.Context, v interface{}) (int64, error) { + res, err := graphql.UnmarshalInt64(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { + return graphql.MarshalInt64(v) +} + +func (ec *executionContext) unmarshalOInt2uint32(ctx context.Context, v interface{}) (uint32, error) { + res, err := types.UnmarshalUint32(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOInt2uint32(ctx context.Context, sel ast.SelectionSet, v uint32) graphql.Marshaler { + return types.MarshalUint32(v) +} + +func (ec *executionContext) unmarshalOInt2uint64(ctx context.Context, v interface{}) (uint64, error) { + res, err := types.UnmarshalUint64(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOInt2uint64(ctx context.Context, sel ast.SelectionSet, v uint64) graphql.Marshaler { + return types.MarshalUint64(v) +} + +func (ec *executionContext) unmarshalOInt2ᚕint32ᚄ(ctx context.Context, v interface{}) ([]int32, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]int32, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNInt2int32(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOInt2ᚕint32ᚄ(ctx context.Context, sel ast.SelectionSet, v []int32) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNInt2int32(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOInt2ᚕint64ᚄ(ctx context.Context, v interface{}) ([]int64, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]int64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNInt2int64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOInt2ᚕint64ᚄ(ctx context.Context, sel ast.SelectionSet, v []int64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNInt2int64(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOInt2ᚕuint32ᚄ(ctx context.Context, v interface{}) ([]uint32, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]uint32, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNInt2uint32(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOInt2ᚕuint32ᚄ(ctx context.Context, sel ast.SelectionSet, v []uint32) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNInt2uint32(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOInt2ᚕuint64ᚄ(ctx context.Context, v interface{}) ([]uint64, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]uint64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNInt2uint64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOInt2ᚕuint64ᚄ(ctx context.Context, sel ast.SelectionSet, v []uint64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNInt2uint64(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) marshalOMaps2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx context.Context, sel ast.SelectionSet, v *pb.Maps) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Maps(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOMapsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps(ctx context.Context, v interface{}) (*pb.Maps, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputMapsInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOMaps_BoolBoolEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_BoolBoolEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_BoolBoolEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_BoolBoolEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_BoolBoolEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_BoolBoolEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_BoolBoolEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_BoolBoolEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Fixed32Fixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Fixed32Fixed32Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Fixed32Fixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Fixed32Fixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Fixed32Fixed32Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Fixed32Fixed32Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Fixed32Fixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed32Fixed32Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Fixed64Fixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Fixed64Fixed64Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Fixed64Fixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Fixed64Fixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Fixed64Fixed64Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Fixed64Fixed64Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Fixed64Fixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Fixed64Fixed64Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Int32Int32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Int32Int32Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Int32Int32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Int32Int32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Int32Int32Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Int32Int32Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Int32Int32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int32Int32Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Int64Int64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Int64Int64Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Int64Int64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Int64Int64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Int64Int64Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Int64Int64Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Int64Int64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Int64Int64Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Sfixed32Sfixed32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sfixed32Sfixed32Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Sfixed32Sfixed32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Sfixed32Sfixed32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sfixed32Sfixed32Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Sfixed32Sfixed32Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Sfixed32Sfixed32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed32Sfixed32Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Sfixed64Sfixed64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sfixed64Sfixed64Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Sfixed64Sfixed64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Sfixed64Sfixed64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sfixed64Sfixed64Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Sfixed64Sfixed64Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Sfixed64Sfixed64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sfixed64Sfixed64Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Sint32Sint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sint32Sint32Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Sint32Sint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Sint32Sint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sint32Sint32Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Sint32Sint32Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Sint32Sint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint32Sint32Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Sint64Sint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Sint64Sint64Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Sint64Sint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Sint64Sint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Sint64Sint64Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Sint64Sint64Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Sint64Sint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Sint64Sint64Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_StringBarEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringBarEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_StringBarEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_StringBarEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringBarEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_StringBarEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_StringBarEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBarEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_StringBytesEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringBytesEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_StringBytesEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_StringBytesEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringBytesEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_StringBytesEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_StringBytesEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringBytesEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_StringDoubleEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringDoubleEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_StringDoubleEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_StringDoubleEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringDoubleEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_StringDoubleEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_StringDoubleEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringDoubleEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_StringFloatEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringFloatEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_StringFloatEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_StringFloatEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringFloatEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_StringFloatEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_StringFloatEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFloatEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_StringFooEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringFooEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_StringFooEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_StringFooEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringFooEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_StringFooEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_StringFooEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringFooEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_StringStringEntry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_StringStringEntry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_StringStringEntry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_StringStringEntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_StringStringEntry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_StringStringEntry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_StringStringEntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_StringStringEntry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Uint32Uint32Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Uint32Uint32Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Uint32Uint32Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Uint32Uint32EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Uint32Uint32Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Uint32Uint32Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Uint32Uint32EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint32Uint32Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOMaps_Uint64Uint64Entry2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx context.Context, sel ast.SelectionSet, v []*pb.Maps_Uint64Uint64Entry) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNMaps_Uint64Uint64Entry2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalOMaps_Uint64Uint64EntryInput2ᚕᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entryᚄ(ctx context.Context, v interface{}) ([]*pb.Maps_Uint64Uint64Entry, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]*pb.Maps_Uint64Uint64Entry, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNMaps_Uint64Uint64EntryInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐMaps_Uint64Uint64Entry(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOOneof2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx context.Context, sel ast.SelectionSet, v *pb.Oneof) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Oneof(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOOneofInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof(ctx context.Context, v interface{}) (*pb.Oneof, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputOneofInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOOneof_Oneof12githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof1(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof1) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Oneof_Oneof1(ctx, sel, v) +} + +func (ec *executionContext) marshalOOneof_Oneof22githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof2(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof2) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Oneof_Oneof2(ctx, sel, v) +} + +func (ec *executionContext) marshalOOneof_Oneof32githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐOneof_Oneof3(ctx context.Context, sel ast.SelectionSet, v pb.Oneof_Oneof3) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Oneof_Oneof3(ctx, sel, v) +} + +func (ec *executionContext) marshalOPb_Any2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐAny(ctx context.Context, sel ast.SelectionSet, v *pb.Any) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Pb_Any(ctx, sel, v) +} + +func (ec *executionContext) marshalORef2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx context.Context, sel ast.SelectionSet, v *pb.Ref) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Ref(ctx, sel, v) +} + +func (ec *executionContext) unmarshalORefInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef(ctx context.Context, v interface{}) (*pb.Ref, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputRefInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalORef_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Bar) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Ref_Bar(ctx, sel, v) +} + +func (ec *executionContext) unmarshalORef_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Bar(ctx context.Context, v interface{}) (*pb.Ref_Bar, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputRef_BarInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalORef_Foo2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Ref_Foo(ctx, sel, v) +} + +func (ec *executionContext) unmarshalORef_FooInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo(ctx context.Context, v interface{}) (*pb.Ref_Foo, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputRef_FooInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalORef_Foo_Bar2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo_Bar) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Ref_Foo_Bar(ctx, sel, v) +} + +func (ec *executionContext) unmarshalORef_Foo_BarInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar(ctx context.Context, v interface{}) (*pb.Ref_Foo_Bar, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputRef_Foo_BarInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx context.Context, v interface{}) (pb.Ref_Foo_Bar_En, error) { + res, err := pb.UnmarshalRef_Foo_Bar_En(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalORef_Foo_Bar_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Bar_En(ctx context.Context, sel ast.SelectionSet, v pb.Ref_Foo_Bar_En) graphql.Marshaler { + return pb.MarshalRef_Foo_Bar_En(v) +} + +func (ec *executionContext) marshalORef_Foo_Baz_Gz2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx context.Context, sel ast.SelectionSet, v *pb.Ref_Foo_Baz_Gz) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Ref_Foo_Baz_Gz(ctx, sel, v) +} + +func (ec *executionContext) unmarshalORef_Foo_Baz_GzInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_Baz_Gz(ctx context.Context, v interface{}) (*pb.Ref_Foo_Baz_Gz, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputRef_Foo_Baz_GzInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx context.Context, v interface{}) (pb.Ref_Foo_En, error) { + res, err := pb.UnmarshalRef_Foo_En(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalORef_Foo_En2githubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRef_Foo_En(ctx context.Context, sel ast.SelectionSet, v pb.Ref_Foo_En) graphql.Marshaler { + return pb.MarshalRef_Foo_En(v) +} + +func (ec *executionContext) marshalORepeated2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx context.Context, sel ast.SelectionSet, v *pb.Repeated) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Repeated(ctx, sel, v) +} + +func (ec *executionContext) unmarshalORepeatedInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐRepeated(ctx context.Context, v interface{}) (*pb.Repeated, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputRepeatedInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOScalars2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx context.Context, sel ast.SelectionSet, v *pb.Scalars) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Scalars(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOScalarsInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐScalars(ctx context.Context, v interface{}) (*pb.Scalars, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputScalarsInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) +} + +func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNString2string(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.MarshalString(*v) +} + +func (ec *executionContext) marshalOTimestamp2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx context.Context, sel ast.SelectionSet, v *pb.Timestamp) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Timestamp(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOTimestampInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐTimestamp(ctx context.Context, v interface{}) (*pb.Timestamp, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputTimestampInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Schema(ctx, sel, v) +} + +func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +// endregion ***************************** type.gotpl ***************************** diff --git a/example/codegen/gql/options/generated.go b/example/codegen/gql/options/generated.go new file mode 100644 index 0000000..008865b --- /dev/null +++ b/example/codegen/gql/options/generated.go @@ -0,0 +1,4515 @@ +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. + +package options + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "strconv" + "sync" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/introspection" + "github.com/danielvladco/go-proto-gql/example/codegen/pb" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" +) + +// region ************************** generated!.gotpl ************************** + +// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. +func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { + return &executableSchema{ + resolvers: cfg.Resolvers, + directives: cfg.Directives, + complexity: cfg.Complexity, + } +} + +type Config struct { + Resolvers ResolverRoot + Directives DirectiveRoot + Complexity ComplexityRoot +} + +type ResolverRoot interface { + Mutation() MutationResolver + Query() QueryResolver + Subscription() SubscriptionResolver +} + +type DirectiveRoot struct { + Query func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + Service func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) +} + +type ComplexityRoot struct { + Data struct { + Double func(childComplexity int) int + Double2 func(childComplexity int) int + Foo func(childComplexity int) int + Foo2 func(childComplexity int) int + String2 func(childComplexity int) int + StringX func(childComplexity int) int + } + + Foo2 struct { + Param1 func(childComplexity int) int + } + + Mutation struct { + QueryMutate1 func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe3 func(childComplexity int, in *pb.Data) int + ServiceMutate1 func(childComplexity int, in *pb.Data) int + ServiceMutate2 func(childComplexity int, in *pb.Data) int + ServicePubSub1 func(childComplexity int, in *pb.Data) int + ServicePubSub2 func(childComplexity int, in *pb.Data) int + ServicePublish func(childComplexity int, in *pb.Data) int + } + + Query struct { + QueryQuery1 func(childComplexity int, in *pb.Data) int + QueryQuery2 func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe1 func(childComplexity int, in *pb.Data) int + ServiceQuery1 func(childComplexity int, in *pb.Data) int + } + + Subscription struct { + QuerySubscribe func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe2 func(childComplexity int, in *pb.Data) int + ServiceInvalidSubscribe3 func(childComplexity int, in *pb.Data) int + ServicePubSub1 func(childComplexity int, in *pb.Data) int + ServicePubSub2 func(childComplexity int, in *pb.Data) int + ServiceSubscribe func(childComplexity int, in *pb.Data) int + } +} + +type MutationResolver interface { + ServiceMutate1(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServiceMutate2(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServicePublish(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServicePubSub1(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServicePubSub2(ctx context.Context, in *pb.Data) (*pb.Data, error) + QueryMutate1(ctx context.Context, in *pb.Data) (*pb.Data, error) +} +type QueryResolver interface { + ServiceQuery1(ctx context.Context, in *pb.Data) (*pb.Data, error) + ServiceInvalidSubscribe1(ctx context.Context, in *pb.Data) (*pb.Data, error) + QueryQuery1(ctx context.Context, in *pb.Data) (*pb.Data, error) + QueryQuery2(ctx context.Context, in *pb.Data) (*pb.Data, error) +} +type SubscriptionResolver interface { + ServiceSubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServicePubSub1(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServiceInvalidSubscribe2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + ServicePubSub2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) + QuerySubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) +} + +type executableSchema struct { + resolvers ResolverRoot + directives DirectiveRoot + complexity ComplexityRoot +} + +func (e *executableSchema) Schema() *ast.Schema { + return parsedSchema +} + +func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { + ec := executionContext{nil, e} + _ = ec + switch typeName + "." + field { + + case "Data.double": + if e.complexity.Data.Double == nil { + break + } + + return e.complexity.Data.Double(childComplexity), true + + case "Data.double2": + if e.complexity.Data.Double2 == nil { + break + } + + return e.complexity.Data.Double2(childComplexity), true + + case "Data.foo": + if e.complexity.Data.Foo == nil { + break + } + + return e.complexity.Data.Foo(childComplexity), true + + case "Data.foo2": + if e.complexity.Data.Foo2 == nil { + break + } + + return e.complexity.Data.Foo2(childComplexity), true + + case "Data.string2": + if e.complexity.Data.String2 == nil { + break + } + + return e.complexity.Data.String2(childComplexity), true + + case "Data.stringX": + if e.complexity.Data.StringX == nil { + break + } + + return e.complexity.Data.StringX(childComplexity), true + + case "Foo2.param1": + if e.complexity.Foo2.Param1 == nil { + break + } + + return e.complexity.Foo2.Param1(childComplexity), true + + case "Mutation.queryMutate1": + if e.complexity.Mutation.QueryMutate1 == nil { + break + } + + args, err := ec.field_Mutation_queryMutate1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.QueryMutate1(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.serviceInvalidSubscribe3": + if e.complexity.Mutation.ServiceInvalidSubscribe3 == nil { + break + } + + args, err := ec.field_Mutation_serviceInvalidSubscribe3_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServiceInvalidSubscribe3(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.serviceMutate1": + if e.complexity.Mutation.ServiceMutate1 == nil { + break + } + + args, err := ec.field_Mutation_serviceMutate1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServiceMutate1(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.serviceMutate2": + if e.complexity.Mutation.ServiceMutate2 == nil { + break + } + + args, err := ec.field_Mutation_serviceMutate2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServiceMutate2(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.servicePubSub1": + if e.complexity.Mutation.ServicePubSub1 == nil { + break + } + + args, err := ec.field_Mutation_servicePubSub1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServicePubSub1(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.servicePubSub2": + if e.complexity.Mutation.ServicePubSub2 == nil { + break + } + + args, err := ec.field_Mutation_servicePubSub2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServicePubSub2(childComplexity, args["in"].(*pb.Data)), true + + case "Mutation.servicePublish": + if e.complexity.Mutation.ServicePublish == nil { + break + } + + args, err := ec.field_Mutation_servicePublish_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.ServicePublish(childComplexity, args["in"].(*pb.Data)), true + + case "Query.queryQuery1": + if e.complexity.Query.QueryQuery1 == nil { + break + } + + args, err := ec.field_Query_queryQuery1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.QueryQuery1(childComplexity, args["in"].(*pb.Data)), true + + case "Query.queryQuery2": + if e.complexity.Query.QueryQuery2 == nil { + break + } + + args, err := ec.field_Query_queryQuery2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.QueryQuery2(childComplexity, args["in"].(*pb.Data)), true + + case "Query.serviceInvalidSubscribe1": + if e.complexity.Query.ServiceInvalidSubscribe1 == nil { + break + } + + args, err := ec.field_Query_serviceInvalidSubscribe1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.ServiceInvalidSubscribe1(childComplexity, args["in"].(*pb.Data)), true + + case "Query.serviceQuery1": + if e.complexity.Query.ServiceQuery1 == nil { + break + } + + args, err := ec.field_Query_serviceQuery1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.ServiceQuery1(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.querySubscribe": + if e.complexity.Subscription.QuerySubscribe == nil { + break + } + + args, err := ec.field_Subscription_querySubscribe_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.QuerySubscribe(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.serviceInvalidSubscribe2": + if e.complexity.Subscription.ServiceInvalidSubscribe2 == nil { + break + } + + args, err := ec.field_Subscription_serviceInvalidSubscribe2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServiceInvalidSubscribe2(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.serviceInvalidSubscribe3": + if e.complexity.Subscription.ServiceInvalidSubscribe3 == nil { + break + } + + args, err := ec.field_Subscription_serviceInvalidSubscribe3_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServiceInvalidSubscribe3(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.servicePubSub1": + if e.complexity.Subscription.ServicePubSub1 == nil { + break + } + + args, err := ec.field_Subscription_servicePubSub1_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServicePubSub1(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.servicePubSub2": + if e.complexity.Subscription.ServicePubSub2 == nil { + break + } + + args, err := ec.field_Subscription_servicePubSub2_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServicePubSub2(childComplexity, args["in"].(*pb.Data)), true + + case "Subscription.serviceSubscribe": + if e.complexity.Subscription.ServiceSubscribe == nil { + break + } + + args, err := ec.field_Subscription_serviceSubscribe_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Subscription.ServiceSubscribe(childComplexity, args["in"].(*pb.Data)), true + + } + return 0, false +} + +func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { + rc := graphql.GetOperationContext(ctx) + ec := executionContext{rc, e} + first := true + + switch rc.Operation.Operation { + case ast.Query: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + data := ec._Query(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Mutation: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + data := ec._Mutation(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + case ast.Subscription: + next := ec._Subscription(ctx, rc.Operation.SelectionSet) + + var buf bytes.Buffer + return func(ctx context.Context) *graphql.Response { + buf.Reset() + data := next() + + if data == nil { + return nil + } + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + + default: + return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) + } +} + +type executionContext struct { + *graphql.OperationContext + *executableSchema +} + +func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapSchema(parsedSchema), nil +} + +func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil +} + +var sources = []*ast.Source{ + {Name: "pb/options.graphqls", Input: `directive @Query on FIELD_DEFINITION +directive @Service on FIELD_DEFINITION +type Data { + """ + must be required + + """ + stringX: String! + """ + must be required + + """ + foo: Foo2! + """ + must be required because its greater than 0 + + """ + double: [Float!]! + """ + simple + + """ + string2: String + """ + simple + + """ + foo2: Foo2 + """ + simple + + """ + double2: [Float!] +} +input DataInput { + """ + must be required + + """ + stringX: String! + """ + must be required + + """ + foo: Foo2Input! + """ + must be required because its greater than 0 + + """ + double: [Float!]! + """ + simple + + """ + string2: String + """ + simple + + """ + foo2: Foo2Input + """ + simple + + """ + double2: [Float!] +} +type Foo2 { + param1: String +} +input Foo2Input { + param1: String +} +type Mutation { + """ + must be a mutation + + """ + serviceMutate1(in: DataInput): Data @Service + """ + must be a mutation + + """ + serviceMutate2(in: DataInput): Data @Service + """ + must be a mutation + + """ + servicePublish(in: DataInput): Data @Service + """ + must be a mutation and a subscription + + """ + servicePubSub1(in: DataInput): Data @Service + serviceInvalidSubscribe3(in: DataInput): Data @Service + servicePubSub2(in: DataInput): Data @Service + queryMutate1(in: DataInput): Data @Query +} +type Query { + serviceQuery1(in: DataInput): Data @Service + serviceInvalidSubscribe1(in: DataInput): Data @Service + """ + must be a query + + """ + queryQuery1(in: DataInput): Data @Query + """ + must be a query + + """ + queryQuery2(in: DataInput): Data @Query +} +type Subscription { + """ + must be a subscription + + """ + serviceSubscribe(in: DataInput): Data @Service + """ + must be a mutation and a subscription + + """ + servicePubSub1(in: DataInput): Data @Service + serviceInvalidSubscribe2(in: DataInput): Data @Service + serviceInvalidSubscribe3(in: DataInput): Data @Service + servicePubSub2(in: DataInput): Data @Service + """ + must be a subscription + + """ + querySubscribe(in: DataInput): Data @Query +} +`, BuiltIn: false}, +} +var parsedSchema = gqlparser.MustLoadSchema(sources...) + +// endregion ************************** generated!.gotpl ************************** + +// region ***************************** args.gotpl ***************************** + +func (ec *executionContext) field_Mutation_queryMutate1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_serviceInvalidSubscribe3_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_serviceMutate1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_serviceMutate2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_servicePubSub1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_servicePubSub2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_servicePublish_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_queryQuery1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_queryQuery2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_serviceInvalidSubscribe1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_serviceQuery1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_querySubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_serviceInvalidSubscribe2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_serviceInvalidSubscribe3_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_servicePubSub1_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_servicePubSub2_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Subscription_serviceSubscribe_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *pb.Data + if tmp, ok := rawArgs["in"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("in")) + arg0, err = ec.unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, tmp) + if err != nil { + return nil, err + } + } + args["in"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +// endregion ***************************** args.gotpl ***************************** + +// region ************************** directives.gotpl ************************** + +// endregion ************************** directives.gotpl ************************** + +// region **************************** field.gotpl ***************************** + +func (ec *executionContext) _Data_stringX(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Data", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StringX, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Data_foo(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Data", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Foo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*pb.Foo2) + fc.Result = res + return ec.marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, field.Selections, res) +} + +func (ec *executionContext) _Data_double(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Data", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Double, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]float64) + fc.Result = res + return ec.marshalNFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Data_string2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Data", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.String2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Data_foo2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Data", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Foo2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Foo2) + fc.Result = res + return ec.marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, field.Selections, res) +} + +func (ec *executionContext) _Data_double2(ctx context.Context, field graphql.CollectedField, obj *pb.Data) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Data", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Double2, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]float64) + fc.Result = res + return ec.marshalOFloat2ᚕfloat64ᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) _Foo2_param1(ctx context.Context, field graphql.CollectedField, obj *pb.Foo2) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Foo2", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Param1, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_serviceMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_serviceMutate1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceMutate1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_serviceMutate2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_serviceMutate2_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceMutate2(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_servicePublish(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_servicePublish_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServicePublish(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_servicePubSub1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServicePubSub1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_serviceInvalidSubscribe3_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServiceInvalidSubscribe3(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_servicePubSub2_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().ServicePubSub2(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Mutation_queryMutate1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Mutation", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Mutation_queryMutate1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().QueryMutate1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query_serviceQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query_serviceQuery1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().ServiceQuery1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query_serviceInvalidSubscribe1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query_serviceInvalidSubscribe1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().ServiceInvalidSubscribe1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query_queryQuery1(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query_queryQuery1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().QueryQuery1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query_queryQuery2(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query_queryQuery2_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().QueryQuery2(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*pb.Data) + fc.Result = res + return ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Query___type_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(args["name"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "Query", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectSchema() + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Schema) + fc.Result = res + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) +} + +func (ec *executionContext) _Subscription_serviceSubscribe(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + fc := &graphql.FieldContext{ + Object: "Subscription", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Subscription_serviceSubscribe_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return nil + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServiceSubscribe(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func() graphql.Marshaler { + res, ok := <-resTmp.(<-chan *pb.Data) + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + } +} + +func (ec *executionContext) _Subscription_servicePubSub1(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + fc := &graphql.FieldContext{ + Object: "Subscription", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Subscription_servicePubSub1_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return nil + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServicePubSub1(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func() graphql.Marshaler { + res, ok := <-resTmp.(<-chan *pb.Data) + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + } +} + +func (ec *executionContext) _Subscription_serviceInvalidSubscribe2(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + fc := &graphql.FieldContext{ + Object: "Subscription", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Subscription_serviceInvalidSubscribe2_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return nil + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServiceInvalidSubscribe2(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func() graphql.Marshaler { + res, ok := <-resTmp.(<-chan *pb.Data) + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + } +} + +func (ec *executionContext) _Subscription_serviceInvalidSubscribe3(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + fc := &graphql.FieldContext{ + Object: "Subscription", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Subscription_serviceInvalidSubscribe3_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return nil + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServiceInvalidSubscribe3(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func() graphql.Marshaler { + res, ok := <-resTmp.(<-chan *pb.Data) + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + } +} + +func (ec *executionContext) _Subscription_servicePubSub2(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + fc := &graphql.FieldContext{ + Object: "Subscription", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Subscription_servicePubSub2_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return nil + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().ServicePubSub2(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Service == nil { + return nil, errors.New("directive Service is not implemented") + } + return ec.directives.Service(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func() graphql.Marshaler { + res, ok := <-resTmp.(<-chan *pb.Data) + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + } +} + +func (ec *executionContext) _Subscription_querySubscribe(ctx context.Context, field graphql.CollectedField) (ret func() graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + fc := &graphql.FieldContext{ + Object: "Subscription", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: true, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field_Subscription_querySubscribe_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return nil + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Subscription().QuerySubscribe(rctx, args["in"].(*pb.Data)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.Query == nil { + return nil, errors.New("directive Query is not implemented") + } + return ec.directives.Query(ctx, nil, directive0) + } + + tmp, err := directive1(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(<-chan *pb.Data); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be <-chan *github.com/danielvladco/go-proto-gql/example/codegen/pb.Data`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return nil + } + if resTmp == nil { + return nil + } + return func() graphql.Marshaler { + res, ok := <-resTmp.(<-chan *pb.Data) + if !ok { + return nil + } + return graphql.WriterFunc(func(w io.Writer) { + w.Write([]byte{'{'}) + graphql.MarshalString(field.Alias).MarshalGQL(w) + w.Write([]byte{':'}) + ec.marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx, field.Selections, res).MarshalGQL(w) + w.Write([]byte{'}'}) + }) + } +} + +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Locations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Directive", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Field", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + Args: nil, + IsMethod: false, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Schema", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field___Type_fields_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + rawArgs := field.ArgumentMap(ec.Variables) + args, err := ec.field___Type_enumValues_args(ctx, rawArgs) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + fc.Args = args + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + fc := &graphql.FieldContext{ + Object: "__Type", + Field: field, + Args: nil, + IsMethod: true, + IsResolver: false, + } + + ctx = graphql.WithFieldContext(ctx, fc) + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +func (ec *executionContext) unmarshalInputDataInput(ctx context.Context, obj interface{}) (pb.Data, error) { + var it pb.Data + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "stringX": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("stringX")) + it.StringX, err = ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + case "foo": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo")) + it.Foo, err = ec.unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, v) + if err != nil { + return it, err + } + case "double": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("double")) + it.Double, err = ec.unmarshalNFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + case "string2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("string2")) + it.String2, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + case "foo2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("foo2")) + it.Foo2, err = ec.unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx, v) + if err != nil { + return it, err + } + case "double2": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("double2")) + it.Double2, err = ec.unmarshalOFloat2ᚕfloat64ᚄ(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputFoo2Input(ctx context.Context, obj interface{}) (pb.Foo2, error) { + var it pb.Foo2 + var asMap = obj.(map[string]interface{}) + + for k, v := range asMap { + switch k { + case "param1": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("param1")) + it.Param1, err = ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + } + } + + return it, nil +} + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +// endregion ************************** interface.gotpl *************************** + +// region **************************** object.gotpl **************************** + +var dataImplementors = []string{"Data"} + +func (ec *executionContext) _Data(ctx context.Context, sel ast.SelectionSet, obj *pb.Data) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, dataImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Data") + case "stringX": + out.Values[i] = ec._Data_stringX(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "foo": + out.Values[i] = ec._Data_foo(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "double": + out.Values[i] = ec._Data_double(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "string2": + out.Values[i] = ec._Data_string2(ctx, field, obj) + case "foo2": + out.Values[i] = ec._Data_foo2(ctx, field, obj) + case "double2": + out.Values[i] = ec._Data_double2(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var foo2Implementors = []string{"Foo2"} + +func (ec *executionContext) _Foo2(ctx context.Context, sel ast.SelectionSet, obj *pb.Foo2) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, foo2Implementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Foo2") + case "param1": + out.Values[i] = ec._Foo2_param1(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var mutationImplementors = []string{"Mutation"} + +func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) + + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Mutation", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Mutation") + case "serviceMutate1": + out.Values[i] = ec._Mutation_serviceMutate1(ctx, field) + case "serviceMutate2": + out.Values[i] = ec._Mutation_serviceMutate2(ctx, field) + case "servicePublish": + out.Values[i] = ec._Mutation_servicePublish(ctx, field) + case "servicePubSub1": + out.Values[i] = ec._Mutation_servicePubSub1(ctx, field) + case "serviceInvalidSubscribe3": + out.Values[i] = ec._Mutation_serviceInvalidSubscribe3(ctx, field) + case "servicePubSub2": + out.Values[i] = ec._Mutation_servicePubSub2(ctx, field) + case "queryMutate1": + out.Values[i] = ec._Mutation_queryMutate1(ctx, field) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var queryImplementors = []string{"Query"} + +func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) + + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Query", + }) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Query") + case "serviceQuery1": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_serviceQuery1(ctx, field) + return res + }) + case "serviceInvalidSubscribe1": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_serviceInvalidSubscribe1(ctx, field) + return res + }) + case "queryQuery1": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_queryQuery1(ctx, field) + return res + }) + case "queryQuery2": + field := field + out.Concurrently(i, func() (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_queryQuery2(ctx, field) + return res + }) + case "__type": + out.Values[i] = ec._Query___type(ctx, field) + case "__schema": + out.Values[i] = ec._Query___schema(ctx, field) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var subscriptionImplementors = []string{"Subscription"} + +func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, subscriptionImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Subscription", + }) + if len(fields) != 1 { + ec.Errorf(ctx, "must subscribe to exactly one stream") + return nil + } + + switch fields[0].Name { + case "serviceSubscribe": + return ec._Subscription_serviceSubscribe(ctx, fields[0]) + case "servicePubSub1": + return ec._Subscription_servicePubSub1(ctx, fields[0]) + case "serviceInvalidSubscribe2": + return ec._Subscription_serviceInvalidSubscribe2(ctx, fields[0]) + case "serviceInvalidSubscribe3": + return ec._Subscription_serviceInvalidSubscribe3(ctx, fields[0]) + case "servicePubSub2": + return ec._Subscription_servicePubSub2(ctx, fields[0]) + case "querySubscribe": + return ec._Subscription_querySubscribe(ctx, fields[0]) + default: + panic("unknown field " + strconv.Quote(fields[0].Name)) + } +} + +var __DirectiveImplementors = []string{"__Directive"} + +func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Directive") + case "name": + out.Values[i] = ec.___Directive_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __EnumValueImplementors = []string{"__EnumValue"} + +func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__EnumValue") + case "name": + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __FieldImplementors = []string{"__Field"} + +func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Field") + case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __InputValueImplementors = []string{"__InputValue"} + +func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__InputValue") + case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "description": + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __SchemaImplementors = []string{"__Schema"} + +func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Schema") + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +var __TypeImplementors = []string{"__Type"} + +func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) + + out := graphql.NewFieldSet(fields) + var invalids uint32 + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Type") + case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + invalids++ + } + case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch() + if invalids > 0 { + return graphql.Null + } + return out +} + +// endregion **************************** object.gotpl **************************** + +// region ***************************** type.gotpl ***************************** + +func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) { + res, err := graphql.UnmarshalFloat(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler { + res := graphql.MarshalFloat(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalNFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]float64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) marshalNFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec._Foo2(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { + res, err := ec.unmarshalInputFoo2Input(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { + return ec.___Directive(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { + return ec.___EnumValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { + return ec.___Field(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { + return ec.___InputValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "must not be null") + } + } + return res +} + +func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + return graphql.MarshalBoolean(v) +} + +func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalBoolean(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.MarshalBoolean(*v) +} + +func (ec *executionContext) marshalOData2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx context.Context, sel ast.SelectionSet, v *pb.Data) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Data(ctx, sel, v) +} + +func (ec *executionContext) unmarshalODataInput2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐData(ctx context.Context, v interface{}) (*pb.Data, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputDataInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + if tmp1, ok := v.([]interface{}); ok { + vSlice = tmp1 + } else { + vSlice = []interface{}{v} + } + } + var err error + res := make([]float64, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i]) + } + + return ret +} + +func (ec *executionContext) marshalOFoo22ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, sel ast.SelectionSet, v *pb.Foo2) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Foo2(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOFoo2Input2ᚖgithubᚗcomᚋdanielvladcoᚋgoᚑprotoᚑgqlᚋexampleᚋcodegenᚋpbᚐFoo2(ctx context.Context, v interface{}) (*pb.Foo2, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputFoo2Input(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + return graphql.MarshalString(v) +} + +func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return graphql.MarshalString(*v) +} + +func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Schema(ctx, sel, v) +} + +func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + return ret +} + +func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +// endregion ***************************** type.gotpl ***************************** diff --git a/example/codegen/gqlgen-constructs.yaml b/example/codegen/gqlgen-constructs.yaml new file mode 100644 index 0000000..679354d --- /dev/null +++ b/example/codegen/gqlgen-constructs.yaml @@ -0,0 +1,43 @@ +schema: + - pb/constructs.graphqls + +exec: + filename: gql/constructs/generated.go + package: constructs + +autobind: + - "github.com/danielvladco/go-proto-gql/example/codegen/pb" + +models: + Pb_Any: + model: + - github.com/danielvladco/go-proto-gql/example/codegen/pb.Any + GoogleProtobuf_TimestampInput: + model: + - google.golang.org/protobuf/types/known/timestamppb.Timestamp + GoogleProtobuf_Timestamp: + model: + - google.golang.org/protobuf/types/known/timestamppb.Timestamp + ID: + model: + - github.com/99designs/gqlgen/graphql.ID + - github.com/99designs/gqlgen/graphql.Int + - github.com/99designs/gqlgen/graphql.Int64 + - github.com/99designs/gqlgen/graphql.Int32 + Int: + model: + - github.com/99designs/gqlgen/graphql.Int + - github.com/99designs/gqlgen/graphql.Int64 + - github.com/99designs/gqlgen/graphql.Int32 + - github.com/danielvladco/go-proto-gql/pkg/types.Uint32 + - github.com/danielvladco/go-proto-gql/pkg/types.Uint64 + Any: + model: + - github.com/danielvladco/go-proto-gql/pkg/types.Any + Bytes: + model: + - github.com/danielvladco/go-proto-gql/pkg/types.Bytes + Float: + model: + - github.com/99designs/gqlgen/graphql.Float + - github.com/danielvladco/go-proto-gql/pkg/types.Float32 diff --git a/example/codegen/gqlgen-options.yaml b/example/codegen/gqlgen-options.yaml new file mode 100644 index 0000000..0112405 --- /dev/null +++ b/example/codegen/gqlgen-options.yaml @@ -0,0 +1,9 @@ +schema: + - pb/options.graphqls + +exec: + filename: gql/options/generated.go + package: options + +autobind: + - "github.com/danielvladco/go-proto-gql/example/codegen/pb" diff --git a/example/codegen/main.go b/example/codegen/main.go new file mode 100644 index 0000000..426f6d4 --- /dev/null +++ b/example/codegen/main.go @@ -0,0 +1,131 @@ +package main + +import ( + "context" + "log" + "net/http" + "os" + + "github.com/99designs/gqlgen/graphql/handler" + "github.com/99designs/gqlgen/graphql/playground" + + "github.com/danielvladco/go-proto-gql/example/codegen/gql/constructs" + "github.com/danielvladco/go-proto-gql/example/codegen/gql/options" + "github.com/danielvladco/go-proto-gql/example/codegen/pb" +) + +const defaultPort = "8088" + +func main() { + port := os.Getenv("PORT") + if port == "" { + port = defaultPort + } + + constructsHandler := handler.NewDefaultServer(constructs.NewExecutableSchema(constructs.Config{ + Resolvers: constructsRoot{}, + })) + + optionsHandler := handler.NewDefaultServer(options.NewExecutableSchema(options.Config{ + Resolvers: optionsRoot{}, + })) + http.Handle("/", playground.Handler("GraphQL playground", "/constructs-query")) + http.Handle("/constructs-query", constructsHandler) + http.Handle("/options-query", optionsHandler) + + log.Printf("connect to http://localhost:%s/ for GraphQL playground", port) + log.Fatal(http.ListenAndServe(":"+port, nil)) +} + +// constructsRoot implements constructs.ResolverRoot showcasing that all resolvers were generated successfully +// we need a bit of binding like in example bellow and we are ready to go + +type constructsRoot struct{} + +func (r constructsRoot) Maps() constructs.MapsResolver { return pb.MapsResolvers{} } +func (r constructsRoot) MapsInput() constructs.MapsInputResolver { return pb.MapsInputResolvers{} } +func (r constructsRoot) OneofInput() constructs.OneofInputResolver { return pb.OneofInputResolvers{} } +func (r constructsRoot) Mutation() constructs.MutationResolver { + return &pb.ConstructsResolvers{Service: pb.ConstructsServer(nil)} +} +func (r constructsRoot) Oneof() constructs.OneofResolver { + return pb.OneofResolvers{} +} +func (r constructsRoot) Query() constructs.QueryResolver { + return dummy{} +} + +// dummy is generated when graphql schema doesn't have any query resolvers. +// In this case the dummy resolver will not be generated by the library and +// you should do it yourself like in example bellow +type dummy struct{} + +func (d dummy) Dummy(ctx context.Context) (*bool, error) { panic("implement me") } + +// optionsRoot implements options.ResolverRoot to showcase the generated resolvers +// as well as the missing ones. Some resolvers are missing because they use grpc streams +// which is too complex for graphql to deal with it by default. +// +// I might consider implementing it on the future. If you need this feature let me know by +// submitting an issue or if the issue already exists, show activity on it so I know there is real interest. +type optionsRoot struct{} + +func (r optionsRoot) Mutation() options.MutationResolver { + return &optionsMutationQueryResolver{ + ServiceResolvers: &pb.ServiceResolvers{Service: pb.ServiceServer(nil)}, + QueryResolvers: &pb.QueryResolvers{Service: pb.QueryServer(nil)}, + } +} + +func (r optionsRoot) Query() options.QueryResolver { + return &optionsMutationQueryResolver{ + ServiceResolvers: &pb.ServiceResolvers{Service: pb.ServiceServer(nil)}, + QueryResolvers: &pb.QueryResolvers{Service: pb.QueryServer(nil)}, + } +} + +func (r optionsRoot) Subscription() options.SubscriptionResolver { + return &optionsSubscriptionResolver{} +} + +type optionsMutationQueryResolver struct { + *pb.ServiceResolvers + *pb.QueryResolvers +} + +func (o optionsMutationQueryResolver) ServicePublish(ctx context.Context, in *pb.Data) (*pb.Data, error) { + panic("implement me") +} +func (o optionsMutationQueryResolver) ServicePubSub1(ctx context.Context, in *pb.Data) (*pb.Data, error) { + panic("implement me") +} +func (o optionsMutationQueryResolver) ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (*pb.Data, error) { + panic("implement me") +} +func (o optionsMutationQueryResolver) ServicePubSub2(ctx context.Context, in *pb.Data) (*pb.Data, error) { + panic("implement me") +} +func (o optionsMutationQueryResolver) ServiceInvalidSubscribe1(ctx context.Context, in *pb.Data) (*pb.Data, error) { + panic("implement me") +} + +type optionsSubscriptionResolver struct{} + +func (o optionsSubscriptionResolver) ServiceSubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { + panic("implement me") +} +func (o optionsSubscriptionResolver) ServicePubSub1(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { + panic("implement me") +} +func (o optionsSubscriptionResolver) ServiceInvalidSubscribe2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { + panic("implement me") +} +func (o optionsSubscriptionResolver) ServiceInvalidSubscribe3(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { + panic("implement me") +} +func (o optionsSubscriptionResolver) ServicePubSub2(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { + panic("implement me") +} +func (o optionsSubscriptionResolver) QuerySubscribe(ctx context.Context, in *pb.Data) (<-chan *pb.Data, error) { + panic("implement me") +} diff --git a/example/codegen/pb/constructs.gqlgen.pb.go b/example/codegen/pb/constructs.gqlgen.pb.go new file mode 100644 index 0000000..60e2146 --- /dev/null +++ b/example/codegen/pb/constructs.gqlgen.pb.go @@ -0,0 +1,553 @@ +package pb + +import ( + context "context" + fmt "fmt" + graphql "github.com/99designs/gqlgen/graphql" + any "github.com/golang/protobuf/ptypes/any" + empty "github.com/golang/protobuf/ptypes/empty" + io "io" +) + +type ConstructsResolvers struct{ Service ConstructsServer } + +func (s *ConstructsResolvers) ConstructsScalars(ctx context.Context, in *Scalars) (*Scalars, error) { + return s.Service.Scalars_(ctx, in) +} +func (s *ConstructsResolvers) ConstructsRepeated(ctx context.Context, in *Repeated) (*Repeated, error) { + return s.Service.Repeated_(ctx, in) +} +func (s *ConstructsResolvers) ConstructsMaps(ctx context.Context, in *Maps) (*Maps, error) { + return s.Service.Maps_(ctx, in) +} +func (s *ConstructsResolvers) ConstructsAny(ctx context.Context, in *any.Any) (*Any, error) { + return s.Service.Any_(ctx, in) +} +func (s *ConstructsResolvers) ConstructsEmpty(ctx context.Context) (*bool, error) { + _, err := s.Service.Empty_(ctx, &empty.Empty{}) + return nil, err +} +func (s *ConstructsResolvers) ConstructsEmpty2(ctx context.Context) (*bool, error) { + _, err := s.Service.Empty2_(ctx, &EmptyRecursive{}) + return nil, err +} +func (s *ConstructsResolvers) ConstructsEmpty3(ctx context.Context) (*bool, error) { + _, err := s.Service.Empty3_(ctx, &Empty3{}) + return nil, err +} +func (s *ConstructsResolvers) ConstructsRef(ctx context.Context, in *Ref) (*Ref, error) { + return s.Service.Ref_(ctx, in) +} +func (s *ConstructsResolvers) ConstructsOneof(ctx context.Context, in *Oneof) (*Oneof, error) { + return s.Service.Oneof_(ctx, in) +} +func (s *ConstructsResolvers) ConstructsCallWithID(ctx context.Context) (*bool, error) { + _, err := s.Service.CallWithId(ctx, &Empty{}) + return nil, err +} + +type Empty3Input = Empty3 +type Empty3_IntInput = Empty3_Int +type FooInput = Foo +type Foo_Foo2Input = Foo_Foo2 +type BazInput = Baz +type ScalarsInput = Scalars +type RepeatedInput = Repeated +type MapsInput = Maps +type MapsResolvers struct{} +type MapsInputResolvers struct{} + +func (r MapsResolvers) Int32Int32(_ context.Context, obj *Maps) (list []*Maps_Int32Int32Entry, _ error) { + for k, v := range obj.Int32Int32 { + list = append(list, &Maps_Int32Int32Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Int32Int32(_ context.Context, obj *Maps, data []*Maps_Int32Int32Entry) error { + for _, v := range data { + obj.Int32Int32[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Int64Int64(_ context.Context, obj *Maps) (list []*Maps_Int64Int64Entry, _ error) { + for k, v := range obj.Int64Int64 { + list = append(list, &Maps_Int64Int64Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Int64Int64(_ context.Context, obj *Maps, data []*Maps_Int64Int64Entry) error { + for _, v := range data { + obj.Int64Int64[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Uint32Uint32(_ context.Context, obj *Maps) (list []*Maps_Uint32Uint32Entry, _ error) { + for k, v := range obj.Uint32Uint32 { + list = append(list, &Maps_Uint32Uint32Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Uint32Uint32(_ context.Context, obj *Maps, data []*Maps_Uint32Uint32Entry) error { + for _, v := range data { + obj.Uint32Uint32[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Uint64Uint64(_ context.Context, obj *Maps) (list []*Maps_Uint64Uint64Entry, _ error) { + for k, v := range obj.Uint64Uint64 { + list = append(list, &Maps_Uint64Uint64Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Uint64Uint64(_ context.Context, obj *Maps, data []*Maps_Uint64Uint64Entry) error { + for _, v := range data { + obj.Uint64Uint64[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Sint32Sint32(_ context.Context, obj *Maps) (list []*Maps_Sint32Sint32Entry, _ error) { + for k, v := range obj.Sint32Sint32 { + list = append(list, &Maps_Sint32Sint32Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Sint32Sint32(_ context.Context, obj *Maps, data []*Maps_Sint32Sint32Entry) error { + for _, v := range data { + obj.Sint32Sint32[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Sint64Sint64(_ context.Context, obj *Maps) (list []*Maps_Sint64Sint64Entry, _ error) { + for k, v := range obj.Sint64Sint64 { + list = append(list, &Maps_Sint64Sint64Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Sint64Sint64(_ context.Context, obj *Maps, data []*Maps_Sint64Sint64Entry) error { + for _, v := range data { + obj.Sint64Sint64[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Fixed32Fixed32(_ context.Context, obj *Maps) (list []*Maps_Fixed32Fixed32Entry, _ error) { + for k, v := range obj.Fixed32Fixed32 { + list = append(list, &Maps_Fixed32Fixed32Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Fixed32Fixed32(_ context.Context, obj *Maps, data []*Maps_Fixed32Fixed32Entry) error { + for _, v := range data { + obj.Fixed32Fixed32[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Fixed64Fixed64(_ context.Context, obj *Maps) (list []*Maps_Fixed64Fixed64Entry, _ error) { + for k, v := range obj.Fixed64Fixed64 { + list = append(list, &Maps_Fixed64Fixed64Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Fixed64Fixed64(_ context.Context, obj *Maps, data []*Maps_Fixed64Fixed64Entry) error { + for _, v := range data { + obj.Fixed64Fixed64[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Sfixed32Sfixed32(_ context.Context, obj *Maps) (list []*Maps_Sfixed32Sfixed32Entry, _ error) { + for k, v := range obj.Sfixed32Sfixed32 { + list = append(list, &Maps_Sfixed32Sfixed32Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Sfixed32Sfixed32(_ context.Context, obj *Maps, data []*Maps_Sfixed32Sfixed32Entry) error { + for _, v := range data { + obj.Sfixed32Sfixed32[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) Sfixed64Sfixed64(_ context.Context, obj *Maps) (list []*Maps_Sfixed64Sfixed64Entry, _ error) { + for k, v := range obj.Sfixed64Sfixed64 { + list = append(list, &Maps_Sfixed64Sfixed64Entry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) Sfixed64Sfixed64(_ context.Context, obj *Maps, data []*Maps_Sfixed64Sfixed64Entry) error { + for _, v := range data { + obj.Sfixed64Sfixed64[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) BoolBool(_ context.Context, obj *Maps) (list []*Maps_BoolBoolEntry, _ error) { + for k, v := range obj.BoolBool { + list = append(list, &Maps_BoolBoolEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) BoolBool(_ context.Context, obj *Maps, data []*Maps_BoolBoolEntry) error { + for _, v := range data { + obj.BoolBool[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) StringString(_ context.Context, obj *Maps) (list []*Maps_StringStringEntry, _ error) { + for k, v := range obj.StringString { + list = append(list, &Maps_StringStringEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) StringString(_ context.Context, obj *Maps, data []*Maps_StringStringEntry) error { + for _, v := range data { + obj.StringString[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) StringBytes(_ context.Context, obj *Maps) (list []*Maps_StringBytesEntry, _ error) { + for k, v := range obj.StringBytes { + list = append(list, &Maps_StringBytesEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) StringBytes(_ context.Context, obj *Maps, data []*Maps_StringBytesEntry) error { + for _, v := range data { + obj.StringBytes[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) StringFloat(_ context.Context, obj *Maps) (list []*Maps_StringFloatEntry, _ error) { + for k, v := range obj.StringFloat { + list = append(list, &Maps_StringFloatEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) StringFloat(_ context.Context, obj *Maps, data []*Maps_StringFloatEntry) error { + for _, v := range data { + obj.StringFloat[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) StringDouble(_ context.Context, obj *Maps) (list []*Maps_StringDoubleEntry, _ error) { + for k, v := range obj.StringDouble { + list = append(list, &Maps_StringDoubleEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) StringDouble(_ context.Context, obj *Maps, data []*Maps_StringDoubleEntry) error { + for _, v := range data { + obj.StringDouble[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) StringFoo(_ context.Context, obj *Maps) (list []*Maps_StringFooEntry, _ error) { + for k, v := range obj.StringFoo { + list = append(list, &Maps_StringFooEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) StringFoo(_ context.Context, obj *Maps, data []*Maps_StringFooEntry) error { + for _, v := range data { + obj.StringFoo[v.Key] = v.Value + } + return nil +} + +func (r MapsResolvers) StringBar(_ context.Context, obj *Maps) (list []*Maps_StringBarEntry, _ error) { + for k, v := range obj.StringBar { + list = append(list, &Maps_StringBarEntry{ + Key: k, + Value: v, + }) + } + return +} + +func (m MapsInputResolvers) StringBar(_ context.Context, obj *Maps, data []*Maps_StringBarEntry) error { + for _, v := range data { + obj.StringBar[v.Key] = v.Value + } + return nil +} + +type Maps_Int32Int32EntryInput = Maps_Int32Int32Entry +type Maps_Int32Int32Entry struct { + Key int32 + Value int32 +} + +type Maps_Int64Int64EntryInput = Maps_Int64Int64Entry +type Maps_Int64Int64Entry struct { + Key int64 + Value int64 +} + +type Maps_Uint32Uint32EntryInput = Maps_Uint32Uint32Entry +type Maps_Uint32Uint32Entry struct { + Key uint32 + Value uint32 +} + +type Maps_Uint64Uint64EntryInput = Maps_Uint64Uint64Entry +type Maps_Uint64Uint64Entry struct { + Key uint64 + Value uint64 +} + +type Maps_Sint32Sint32EntryInput = Maps_Sint32Sint32Entry +type Maps_Sint32Sint32Entry struct { + Key int32 + Value int32 +} + +type Maps_Sint64Sint64EntryInput = Maps_Sint64Sint64Entry +type Maps_Sint64Sint64Entry struct { + Key int64 + Value int64 +} + +type Maps_Fixed32Fixed32EntryInput = Maps_Fixed32Fixed32Entry +type Maps_Fixed32Fixed32Entry struct { + Key uint32 + Value uint32 +} + +type Maps_Fixed64Fixed64EntryInput = Maps_Fixed64Fixed64Entry +type Maps_Fixed64Fixed64Entry struct { + Key uint64 + Value uint64 +} + +type Maps_Sfixed32Sfixed32EntryInput = Maps_Sfixed32Sfixed32Entry +type Maps_Sfixed32Sfixed32Entry struct { + Key int32 + Value int32 +} + +type Maps_Sfixed64Sfixed64EntryInput = Maps_Sfixed64Sfixed64Entry +type Maps_Sfixed64Sfixed64Entry struct { + Key int64 + Value int64 +} + +type Maps_BoolBoolEntryInput = Maps_BoolBoolEntry +type Maps_BoolBoolEntry struct { + Key bool + Value bool +} + +type Maps_StringStringEntryInput = Maps_StringStringEntry +type Maps_StringStringEntry struct { + Key string + Value string +} + +type Maps_StringBytesEntryInput = Maps_StringBytesEntry +type Maps_StringBytesEntry struct { + Key string + Value []byte +} + +type Maps_StringFloatEntryInput = Maps_StringFloatEntry +type Maps_StringFloatEntry struct { + Key string + Value float32 +} + +type Maps_StringDoubleEntryInput = Maps_StringDoubleEntry +type Maps_StringDoubleEntry struct { + Key string + Value float64 +} + +type Maps_StringFooEntryInput = Maps_StringFooEntry +type Maps_StringFooEntry struct { + Key string + Value *Foo +} + +type Maps_StringBarEntryInput = Maps_StringBarEntry +type Maps_StringBarEntry struct { + Key string + Value Bar +} + +type AnyInput = Any +type EmptyInput = Empty +type EmptyRecursiveInput = EmptyRecursive +type EmptyNestedInput = EmptyNested +type EmptyNested_EmptyNested1Input = EmptyNested_EmptyNested1 +type EmptyNested_EmptyNested1_EmptyNested2Input = EmptyNested_EmptyNested1_EmptyNested2 +type TimestampInput = Timestamp +type RefInput = Ref +type Ref_BarInput = Ref_Bar +type Ref_FooInput = Ref_Foo + +func MarshalRef_Foo_En(x Ref_Foo_En) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + _, _ = fmt.Fprintf(w, "%q", x.String()) + }) +} + +func UnmarshalRef_Foo_En(v interface{}) (Ref_Foo_En, error) { + code, ok := v.(string) + if ok { + return Ref_Foo_En(Ref_Foo_En_value[code]), nil + } + return 0, fmt.Errorf("cannot unmarshal Ref_Foo_En enum") +} + +type Ref_Foo_BazInput = Ref_Foo_Baz +type Ref_Foo_Baz_GzInput = Ref_Foo_Baz_Gz +type Ref_Foo_BarInput = Ref_Foo_Bar + +func MarshalRef_Foo_Bar_En(x Ref_Foo_Bar_En) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + _, _ = fmt.Fprintf(w, "%q", x.String()) + }) +} + +func UnmarshalRef_Foo_Bar_En(v interface{}) (Ref_Foo_Bar_En, error) { + code, ok := v.(string) + if ok { + return Ref_Foo_Bar_En(Ref_Foo_Bar_En_value[code]), nil + } + return 0, fmt.Errorf("cannot unmarshal Ref_Foo_Bar_En enum") +} + +type OneofInput = Oneof +type OneofResolvers struct{} +type OneofInputResolvers struct{} + +func (o OneofInputResolvers) Param2(_ context.Context, obj *Oneof, data *string) error { + obj.Oneof1 = &Oneof_Param2{Param2: *data} + return nil +} + +func (o OneofInputResolvers) Param3(_ context.Context, obj *Oneof, data *string) error { + obj.Oneof1 = &Oneof_Param3{Param3: *data} + return nil +} + +func (o OneofResolvers) Oneof1(_ context.Context, obj *Oneof) (Oneof_Oneof1, error) { + return obj.Oneof1, nil +} + +type Oneof_Oneof1 interface{} + +func (o OneofInputResolvers) Param4(_ context.Context, obj *Oneof, data *string) error { + obj.Oneof2 = &Oneof_Param4{Param4: *data} + return nil +} + +func (o OneofInputResolvers) Param5(_ context.Context, obj *Oneof, data *string) error { + obj.Oneof2 = &Oneof_Param5{Param5: *data} + return nil +} + +func (o OneofResolvers) Oneof2(_ context.Context, obj *Oneof) (Oneof_Oneof2, error) { + return obj.Oneof2, nil +} + +type Oneof_Oneof2 interface{} + +func (o OneofInputResolvers) Param6(_ context.Context, obj *Oneof, data *string) error { + obj.Oneof3 = &Oneof_Param6{Param6: *data} + return nil +} + +func (o OneofResolvers) Oneof3(_ context.Context, obj *Oneof) (Oneof_Oneof3, error) { + return obj.Oneof3, nil +} + +type Oneof_Oneof3 interface{} + +func MarshalBar(x Bar) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + _, _ = fmt.Fprintf(w, "%q", x.String()) + }) +} + +func UnmarshalBar(v interface{}) (Bar, error) { + code, ok := v.(string) + if ok { + return Bar(Bar_value[code]), nil + } + return 0, fmt.Errorf("cannot unmarshal Bar enum") +} diff --git a/example/codegen/pb/constructs.graphqls b/example/codegen/pb/constructs.graphqls new file mode 100644 index 0000000..a0b7c2c --- /dev/null +++ b/example/codegen/pb/constructs.graphqls @@ -0,0 +1,648 @@ +directive @Constructs on FIELD_DEFINITION +directive @Oneof_Oneof1 on INPUT_FIELD_DEFINITION +directive @Oneof_Oneof2 on INPUT_FIELD_DEFINITION +directive @Oneof_Oneof3 on INPUT_FIELD_DEFINITION +""" +Any is any json type +""" +scalar Any +enum Bar { + BAR1 + BAR2 + BAR3 +} +type Baz { + param1: String +} +input BazInput { + param1: String +} +scalar Bytes +type Foo { + param1: String + param2: String +} +input FooInput { + param1: String + param2: String +} +type Foo_Foo2 { + param1: String +} +input Foo_Foo2Input { + param1: String +} +""" + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + + Example 5: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted + to this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [`ISODateTimeFormat.dateTime()`]( + http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + ) to obtain a formatter capable of generating timestamps in this format. + + + +""" +type GoogleProtobuf_Timestamp { + """ + Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + 9999-12-31T23:59:59Z inclusive. + + """ + seconds: Int + """ + Non-negative fractions of a second at nanosecond resolution. Negative + second values with fractions must still have non-negative nanos values + that count forward in time. Must be from 0 to 999,999,999 + inclusive. + + """ + nanos: Int +} +""" + A Timestamp represents a point in time independent of any time zone or local + calendar, encoded as a count of seconds and fractions of seconds at + nanosecond resolution. The count is relative to an epoch at UTC midnight on + January 1, 1970, in the proleptic Gregorian calendar which extends the + Gregorian calendar backwards to year one. + + All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + second table is needed for interpretation, using a [24-hour linear + smear](https://developers.google.com/time/smear). + + The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + restricting to that range, we ensure that we can convert to and from [RFC + 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + + # Examples + + Example 1: Compute Timestamp from POSIX `time()`. + + Timestamp timestamp; + timestamp.set_seconds(time(NULL)); + timestamp.set_nanos(0); + + Example 2: Compute Timestamp from POSIX `gettimeofday()`. + + struct timeval tv; + gettimeofday(&tv, NULL); + + Timestamp timestamp; + timestamp.set_seconds(tv.tv_sec); + timestamp.set_nanos(tv.tv_usec * 1000); + + Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + + FILETIME ft; + GetSystemTimeAsFileTime(&ft); + UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + + // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + Timestamp timestamp; + timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + + Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + + long millis = System.currentTimeMillis(); + + Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + .setNanos((int) ((millis % 1000) * 1000000)).build(); + + + Example 5: Compute Timestamp from current time in Python. + + timestamp = Timestamp() + timestamp.GetCurrentTime() + + # JSON Mapping + + In JSON format, the Timestamp type is encoded as a string in the + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + where {year} is always expressed using four digits while {month}, {day}, + {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + is required. A proto3 JSON serializer should always use UTC (as indicated by + "Z") when printing the Timestamp type and a proto3 JSON parser should be + able to accept both UTC and other timezones (as indicated by an offset). + + For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + 01:30 UTC on January 15, 2017. + + In JavaScript, one can convert a Date object to this format using the + standard + [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + method. In Python, a standard `datetime.datetime` object can be converted + to this format using + [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + the Joda Time's [`ISODateTimeFormat.dateTime()`]( + http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + ) to obtain a formatter capable of generating timestamps in this format. + + + +""" +input GoogleProtobuf_TimestampInput { + """ + Represents seconds of UTC time since Unix epoch + 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + 9999-12-31T23:59:59Z inclusive. + + """ + seconds: Int + """ + Non-negative fractions of a second at nanosecond resolution. Negative + second values with fractions must still have non-negative nanos values + that count forward in time. Must be from 0 to 999,999,999 + inclusive. + + """ + nanos: Int +} +type Maps { + int32Int32: [Maps_Int32Int32Entry!] + int64Int64: [Maps_Int64Int64Entry!] + uint32Uint32: [Maps_Uint32Uint32Entry!] + uint64Uint64: [Maps_Uint64Uint64Entry!] + sint32Sint32: [Maps_Sint32Sint32Entry!] + sint64Sint64: [Maps_Sint64Sint64Entry!] + fixed32Fixed32: [Maps_Fixed32Fixed32Entry!] + fixed64Fixed64: [Maps_Fixed64Fixed64Entry!] + sfixed32Sfixed32: [Maps_Sfixed32Sfixed32Entry!] + sfixed64Sfixed64: [Maps_Sfixed64Sfixed64Entry!] + boolBool: [Maps_BoolBoolEntry!] + stringString: [Maps_StringStringEntry!] + stringBytes: [Maps_StringBytesEntry!] + stringFloat: [Maps_StringFloatEntry!] + stringDouble: [Maps_StringDoubleEntry!] + stringFoo: [Maps_StringFooEntry!] + stringBar: [Maps_StringBarEntry!] +} +input MapsInput { + int32Int32: [Maps_Int32Int32EntryInput!] + int64Int64: [Maps_Int64Int64EntryInput!] + uint32Uint32: [Maps_Uint32Uint32EntryInput!] + uint64Uint64: [Maps_Uint64Uint64EntryInput!] + sint32Sint32: [Maps_Sint32Sint32EntryInput!] + sint64Sint64: [Maps_Sint64Sint64EntryInput!] + fixed32Fixed32: [Maps_Fixed32Fixed32EntryInput!] + fixed64Fixed64: [Maps_Fixed64Fixed64EntryInput!] + sfixed32Sfixed32: [Maps_Sfixed32Sfixed32EntryInput!] + sfixed64Sfixed64: [Maps_Sfixed64Sfixed64EntryInput!] + boolBool: [Maps_BoolBoolEntryInput!] + stringString: [Maps_StringStringEntryInput!] + stringBytes: [Maps_StringBytesEntryInput!] + stringFloat: [Maps_StringFloatEntryInput!] + stringDouble: [Maps_StringDoubleEntryInput!] + stringFoo: [Maps_StringFooEntryInput!] + stringBar: [Maps_StringBarEntryInput!] +} +type Maps_BoolBoolEntry { + key: Boolean + value: Boolean +} +input Maps_BoolBoolEntryInput { + key: Boolean + value: Boolean +} +type Maps_Fixed32Fixed32Entry { + key: Int + value: Int +} +input Maps_Fixed32Fixed32EntryInput { + key: Int + value: Int +} +type Maps_Fixed64Fixed64Entry { + key: Int + value: Int +} +input Maps_Fixed64Fixed64EntryInput { + key: Int + value: Int +} +type Maps_Int32Int32Entry { + key: Int + value: Int +} +input Maps_Int32Int32EntryInput { + key: Int + value: Int +} +type Maps_Int64Int64Entry { + key: Int + value: Int +} +input Maps_Int64Int64EntryInput { + key: Int + value: Int +} +type Maps_Sfixed32Sfixed32Entry { + key: Int + value: Int +} +input Maps_Sfixed32Sfixed32EntryInput { + key: Int + value: Int +} +type Maps_Sfixed64Sfixed64Entry { + key: Int + value: Int +} +input Maps_Sfixed64Sfixed64EntryInput { + key: Int + value: Int +} +type Maps_Sint32Sint32Entry { + key: Int + value: Int +} +input Maps_Sint32Sint32EntryInput { + key: Int + value: Int +} +type Maps_Sint64Sint64Entry { + key: Int + value: Int +} +input Maps_Sint64Sint64EntryInput { + key: Int + value: Int +} +type Maps_StringBarEntry { + key: String + value: Bar +} +input Maps_StringBarEntryInput { + key: String + value: Bar +} +type Maps_StringBytesEntry { + key: String + value: Bytes +} +input Maps_StringBytesEntryInput { + key: String + value: Bytes +} +type Maps_StringDoubleEntry { + key: String + value: Float +} +input Maps_StringDoubleEntryInput { + key: String + value: Float +} +type Maps_StringFloatEntry { + key: String + value: Float +} +input Maps_StringFloatEntryInput { + key: String + value: Float +} +type Maps_StringFooEntry { + key: String + value: Foo +} +input Maps_StringFooEntryInput { + key: String + value: FooInput +} +type Maps_StringStringEntry { + key: String + value: String +} +input Maps_StringStringEntryInput { + key: String + value: String +} +type Maps_Uint32Uint32Entry { + key: Int + value: Int +} +input Maps_Uint32Uint32EntryInput { + key: Int + value: Int +} +type Maps_Uint64Uint64Entry { + key: Int + value: Int +} +input Maps_Uint64Uint64EntryInput { + key: Int + value: Int +} +type Mutation { + """ + all possible scalars and same message as input and output + + """ + constructsScalars_(in: ScalarsInput): Scalars @Constructs + """ + all scalars messages and enums as repeated + + """ + constructsRepeated_(in: RepeatedInput): Repeated @Constructs + """ + all possible maps and different messages as input and output + + """ + constructsMaps_(in: MapsInput): Maps @Constructs + """ + same name different types + + """ + constructsAny_(in: Any): Pb_Any @Constructs + """ + empty input and empty output + + """ + constructsEmpty_: Boolean @Constructs + """ + messages with all empty fields + + """ + constructsEmpty2_: Boolean @Constructs + """ + messages with all empty fields + + """ + constructsEmpty3_: Boolean @Constructs + constructsRef_(in: RefInput): Ref @Constructs + constructsOneof_(in: OneofInput): Oneof @Constructs + constructsCallWithId: Boolean @Constructs +} +type Oneof { + param1: String + oneof1: Oneof_Oneof1 + oneof2: Oneof_Oneof2 + oneof3: Oneof_Oneof3 +} +input OneofInput { + param1: String + param2: String @Oneof_Oneof1 + param3: String @Oneof_Oneof1 + param4: String @Oneof_Oneof2 + param5: String @Oneof_Oneof2 + param6: String @Oneof_Oneof3 +} +union Oneof_Oneof1 = Oneof_Param2 | Oneof_Param3 +union Oneof_Oneof2 = Oneof_Param4 | Oneof_Param5 +union Oneof_Oneof3 = Oneof_Param6 +type Oneof_Param2 { + param2: String +} +type Oneof_Param3 { + param3: String +} +type Oneof_Param4 { + param4: String +} +type Oneof_Param5 { + param5: String +} +type Oneof_Param6 { + param6: String +} +type Pb_Any { + param1: String +} +type Query { + dummy: Boolean +} +type Ref { + localTime2: Timestamp + external: GoogleProtobuf_Timestamp + localTime: Timestamp + file: Baz + fileMsg: Foo + fileEnum: Bar + local: Ref_Foo + foreign: Foo_Foo2 + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En + gz: Ref_Foo_Baz_Gz +} +input RefInput { + localTime2: TimestampInput + external: GoogleProtobuf_TimestampInput + localTime: TimestampInput + file: BazInput + fileMsg: FooInput + fileEnum: Bar + local: Ref_FooInput + foreign: Foo_Foo2Input + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En + gz: Ref_Foo_Baz_GzInput +} +type Ref_Bar { + param1: String +} +input Ref_BarInput { + param1: String +} +type Ref_Foo { + bar1: Ref_Foo_Bar + localTime2: Timestamp + externalTime1: GoogleProtobuf_Timestamp + bar2: Ref_Bar + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En +} +input Ref_FooInput { + bar1: Ref_Foo_BarInput + localTime2: TimestampInput + externalTime1: GoogleProtobuf_TimestampInput + bar2: Ref_BarInput + en1: Ref_Foo_En + en2: Ref_Foo_Bar_En +} +type Ref_Foo_Bar { + param1: String +} +input Ref_Foo_BarInput { + param1: String +} +enum Ref_Foo_Bar_En { + A0 + A1 +} +type Ref_Foo_Baz_Gz { + param1: String +} +input Ref_Foo_Baz_GzInput { + param1: String +} +enum Ref_Foo_En { + A0 + A1 +} +type Repeated { + double: [Float!] + float: [Float!] + int32: [Int!] + int64: [Int!] + uint32: [Int!] + uint64: [Int!] + sint32: [Int!] + sint64: [Int!] + fixed32: [Int!] + fixed64: [Int!] + sfixed32: [Int!] + sfixed64: [Int!] + bool: [Boolean!] + stringX: [String!] + bytes: [Bytes!] + foo: [Foo!] + bar: [Bar!] +} +input RepeatedInput { + double: [Float!] + float: [Float!] + int32: [Int!] + int64: [Int!] + uint32: [Int!] + uint64: [Int!] + sint32: [Int!] + sint64: [Int!] + fixed32: [Int!] + fixed64: [Int!] + sfixed32: [Int!] + sfixed64: [Int!] + bool: [Boolean!] + stringX: [String!] + bytes: [Bytes!] + foo: [FooInput!] + bar: [Bar!] +} +type Scalars { + double: Float + float: Float + int32: Int + int64: Int + uint32: Int + uint64: Int + sint32: Int + sint64: Int + fixed32: Int + fixed64: Int + sfixed32: Int + sfixed64: Int + bool: Boolean + """ + x for collisions with go method String + + """ + stringX: String + bytes: Bytes +} +input ScalarsInput { + double: Float + float: Float + int32: Int + int64: Int + uint32: Int + uint64: Int + sint32: Int + sint64: Int + fixed32: Int + fixed64: Int + sfixed32: Int + sfixed64: Int + bool: Boolean + """ + x for collisions with go method String + + """ + stringX: String + bytes: Bytes +} +type Timestamp { + time: String +} +input TimestampInput { + time: String +} diff --git a/example/constructs.pb.go b/example/codegen/pb/constructs.pb.go similarity index 52% rename from example/constructs.pb.go rename to example/codegen/pb/constructs.pb.go index 23e690a..af21813 100644 --- a/example/constructs.pb.go +++ b/example/codegen/pb/constructs.pb.go @@ -1,20 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.21.0 -// protoc v3.7.1 -// source: example/constructs.proto +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: pb/constructs.proto package pb import ( - context "context" proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" empty "github.com/golang/protobuf/ptypes/empty" timestamp "github.com/golang/protobuf/ptypes/timestamp" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -65,11 +61,11 @@ func (x Bar) String() string { } func (Bar) Descriptor() protoreflect.EnumDescriptor { - return file_example_constructs_proto_enumTypes[0].Descriptor() + return file_pb_constructs_proto_enumTypes[0].Descriptor() } func (Bar) Type() protoreflect.EnumType { - return &file_example_constructs_proto_enumTypes[0] + return &file_pb_constructs_proto_enumTypes[0] } func (x Bar) Number() protoreflect.EnumNumber { @@ -78,7 +74,7 @@ func (x Bar) Number() protoreflect.EnumNumber { // Deprecated: Use Bar.Descriptor instead. func (Bar) EnumDescriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{0} + return file_pb_constructs_proto_rawDescGZIP(), []int{0} } type Ref_Foo_En int32 @@ -111,11 +107,11 @@ func (x Ref_Foo_En) String() string { } func (Ref_Foo_En) Descriptor() protoreflect.EnumDescriptor { - return file_example_constructs_proto_enumTypes[1].Descriptor() + return file_pb_constructs_proto_enumTypes[1].Descriptor() } func (Ref_Foo_En) Type() protoreflect.EnumType { - return &file_example_constructs_proto_enumTypes[1] + return &file_pb_constructs_proto_enumTypes[1] } func (x Ref_Foo_En) Number() protoreflect.EnumNumber { @@ -124,7 +120,7 @@ func (x Ref_Foo_En) Number() protoreflect.EnumNumber { // Deprecated: Use Ref_Foo_En.Descriptor instead. func (Ref_Foo_En) EnumDescriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 1, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 1, 0} } type Ref_Foo_Bar_En int32 @@ -157,11 +153,11 @@ func (x Ref_Foo_Bar_En) String() string { } func (Ref_Foo_Bar_En) Descriptor() protoreflect.EnumDescriptor { - return file_example_constructs_proto_enumTypes[2].Descriptor() + return file_pb_constructs_proto_enumTypes[2].Descriptor() } func (Ref_Foo_Bar_En) Type() protoreflect.EnumType { - return &file_example_constructs_proto_enumTypes[2] + return &file_pb_constructs_proto_enumTypes[2] } func (x Ref_Foo_Bar_En) Number() protoreflect.EnumNumber { @@ -170,7 +166,7 @@ func (x Ref_Foo_Bar_En) Number() protoreflect.EnumNumber { // Deprecated: Use Ref_Foo_Bar_En.Descriptor instead. func (Ref_Foo_Bar_En) EnumDescriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 1, 1, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 1, 1, 0} } type Empty3 struct { @@ -184,7 +180,7 @@ type Empty3 struct { func (x *Empty3) Reset() { *x = Empty3{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[0] + mi := &file_pb_constructs_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -197,7 +193,7 @@ func (x *Empty3) String() string { func (*Empty3) ProtoMessage() {} func (x *Empty3) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[0] + mi := &file_pb_constructs_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -210,7 +206,7 @@ func (x *Empty3) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty3.ProtoReflect.Descriptor instead. func (*Empty3) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{0} + return file_pb_constructs_proto_rawDescGZIP(), []int{0} } func (x *Empty3) GetI() *Empty3_Int { @@ -232,7 +228,7 @@ type Foo struct { func (x *Foo) Reset() { *x = Foo{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[1] + mi := &file_pb_constructs_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -245,7 +241,7 @@ func (x *Foo) String() string { func (*Foo) ProtoMessage() {} func (x *Foo) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[1] + mi := &file_pb_constructs_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -258,7 +254,7 @@ func (x *Foo) ProtoReflect() protoreflect.Message { // Deprecated: Use Foo.ProtoReflect.Descriptor instead. func (*Foo) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{1} + return file_pb_constructs_proto_rawDescGZIP(), []int{1} } func (x *Foo) GetParam1() string { @@ -286,7 +282,7 @@ type Baz struct { func (x *Baz) Reset() { *x = Baz{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[2] + mi := &file_pb_constructs_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -299,7 +295,7 @@ func (x *Baz) String() string { func (*Baz) ProtoMessage() {} func (x *Baz) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[2] + mi := &file_pb_constructs_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -312,7 +308,7 @@ func (x *Baz) ProtoReflect() protoreflect.Message { // Deprecated: Use Baz.ProtoReflect.Descriptor instead. func (*Baz) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{2} + return file_pb_constructs_proto_rawDescGZIP(), []int{2} } func (x *Baz) GetParam1() string { @@ -340,14 +336,14 @@ type Scalars struct { Sfixed32 int32 `protobuf:"fixed32,11,opt,name=sfixed32,proto3" json:"sfixed32,omitempty"` Sfixed64 int64 `protobuf:"fixed64,12,opt,name=sfixed64,proto3" json:"sfixed64,omitempty"` Bool bool `protobuf:"varint,13,opt,name=bool,proto3" json:"bool,omitempty"` - String_ string `protobuf:"bytes,14,opt,name=string,proto3" json:"string,omitempty"` + StringX string `protobuf:"bytes,14,opt,name=string_x,json=stringX,proto3" json:"string_x,omitempty"` // x for collisions with go method String Bytes []byte `protobuf:"bytes,15,opt,name=bytes,proto3" json:"bytes,omitempty"` } func (x *Scalars) Reset() { *x = Scalars{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[3] + mi := &file_pb_constructs_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -360,7 +356,7 @@ func (x *Scalars) String() string { func (*Scalars) ProtoMessage() {} func (x *Scalars) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[3] + mi := &file_pb_constructs_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -373,7 +369,7 @@ func (x *Scalars) ProtoReflect() protoreflect.Message { // Deprecated: Use Scalars.ProtoReflect.Descriptor instead. func (*Scalars) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{3} + return file_pb_constructs_proto_rawDescGZIP(), []int{3} } func (x *Scalars) GetDouble() float64 { @@ -467,9 +463,9 @@ func (x *Scalars) GetBool() bool { return false } -func (x *Scalars) GetString_() string { +func (x *Scalars) GetStringX() string { if x != nil { - return x.String_ + return x.StringX } return "" } @@ -499,7 +495,7 @@ type Repeated struct { Sfixed32 []int32 `protobuf:"fixed32,11,rep,packed,name=sfixed32,proto3" json:"sfixed32,omitempty"` Sfixed64 []int64 `protobuf:"fixed64,12,rep,packed,name=sfixed64,proto3" json:"sfixed64,omitempty"` Bool []bool `protobuf:"varint,13,rep,packed,name=bool,proto3" json:"bool,omitempty"` - String_ []string `protobuf:"bytes,14,rep,name=string,proto3" json:"string,omitempty"` + StringX []string `protobuf:"bytes,14,rep,name=string_x,json=stringX,proto3" json:"string_x,omitempty"` Bytes [][]byte `protobuf:"bytes,15,rep,name=bytes,proto3" json:"bytes,omitempty"` Foo []*Foo `protobuf:"bytes,16,rep,name=foo,proto3" json:"foo,omitempty"` Bar []Bar `protobuf:"varint,17,rep,packed,name=bar,proto3,enum=pb.Bar" json:"bar,omitempty"` @@ -508,7 +504,7 @@ type Repeated struct { func (x *Repeated) Reset() { *x = Repeated{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[4] + mi := &file_pb_constructs_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -521,7 +517,7 @@ func (x *Repeated) String() string { func (*Repeated) ProtoMessage() {} func (x *Repeated) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[4] + mi := &file_pb_constructs_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -534,7 +530,7 @@ func (x *Repeated) ProtoReflect() protoreflect.Message { // Deprecated: Use Repeated.ProtoReflect.Descriptor instead. func (*Repeated) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{4} + return file_pb_constructs_proto_rawDescGZIP(), []int{4} } func (x *Repeated) GetDouble() []float64 { @@ -628,9 +624,9 @@ func (x *Repeated) GetBool() []bool { return nil } -func (x *Repeated) GetString_() []string { +func (x *Repeated) GetStringX() []string { if x != nil { - return x.String_ + return x.StringX } return nil } @@ -683,7 +679,7 @@ type Maps struct { func (x *Maps) Reset() { *x = Maps{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[5] + mi := &file_pb_constructs_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -696,7 +692,7 @@ func (x *Maps) String() string { func (*Maps) ProtoMessage() {} func (x *Maps) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[5] + mi := &file_pb_constructs_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -709,7 +705,7 @@ func (x *Maps) ProtoReflect() protoreflect.Message { // Deprecated: Use Maps.ProtoReflect.Descriptor instead. func (*Maps) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{5} + return file_pb_constructs_proto_rawDescGZIP(), []int{5} } func (x *Maps) GetInt32Int32() map[int32]int32 { @@ -842,7 +838,7 @@ type Any struct { func (x *Any) Reset() { *x = Any{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[6] + mi := &file_pb_constructs_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -855,7 +851,7 @@ func (x *Any) String() string { func (*Any) ProtoMessage() {} func (x *Any) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[6] + mi := &file_pb_constructs_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -868,7 +864,7 @@ func (x *Any) ProtoReflect() protoreflect.Message { // Deprecated: Use Any.ProtoReflect.Descriptor instead. func (*Any) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{6} + return file_pb_constructs_proto_rawDescGZIP(), []int{6} } func (x *Any) GetParam1() string { @@ -887,7 +883,7 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[7] + mi := &file_pb_constructs_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -900,7 +896,7 @@ func (x *Empty) String() string { func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[7] + mi := &file_pb_constructs_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -913,7 +909,7 @@ func (x *Empty) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{7} + return file_pb_constructs_proto_rawDescGZIP(), []int{7} } type EmptyRecursive struct { @@ -928,7 +924,7 @@ type EmptyRecursive struct { func (x *EmptyRecursive) Reset() { *x = EmptyRecursive{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[8] + mi := &file_pb_constructs_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -941,7 +937,7 @@ func (x *EmptyRecursive) String() string { func (*EmptyRecursive) ProtoMessage() {} func (x *EmptyRecursive) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[8] + mi := &file_pb_constructs_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -954,7 +950,7 @@ func (x *EmptyRecursive) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyRecursive.ProtoReflect.Descriptor instead. func (*EmptyRecursive) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{8} + return file_pb_constructs_proto_rawDescGZIP(), []int{8} } func (x *EmptyRecursive) GetNested1() *empty.Empty { @@ -982,7 +978,7 @@ type EmptyNested struct { func (x *EmptyNested) Reset() { *x = EmptyNested{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[9] + mi := &file_pb_constructs_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -995,7 +991,7 @@ func (x *EmptyNested) String() string { func (*EmptyNested) ProtoMessage() {} func (x *EmptyNested) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[9] + mi := &file_pb_constructs_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1008,7 +1004,7 @@ func (x *EmptyNested) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyNested.ProtoReflect.Descriptor instead. func (*EmptyNested) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{9} + return file_pb_constructs_proto_rawDescGZIP(), []int{9} } func (x *EmptyNested) GetNested1() *EmptyNested_EmptyNested1 { @@ -1029,7 +1025,7 @@ type Timestamp struct { func (x *Timestamp) Reset() { *x = Timestamp{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[10] + mi := &file_pb_constructs_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1042,7 +1038,7 @@ func (x *Timestamp) String() string { func (*Timestamp) ProtoMessage() {} func (x *Timestamp) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[10] + mi := &file_pb_constructs_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1055,7 +1051,7 @@ func (x *Timestamp) ProtoReflect() protoreflect.Message { // Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. func (*Timestamp) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{10} + return file_pb_constructs_proto_rawDescGZIP(), []int{10} } func (x *Timestamp) GetTime() string { @@ -1087,7 +1083,7 @@ type Ref struct { func (x *Ref) Reset() { *x = Ref{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[11] + mi := &file_pb_constructs_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1100,7 +1096,7 @@ func (x *Ref) String() string { func (*Ref) ProtoMessage() {} func (x *Ref) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[11] + mi := &file_pb_constructs_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1113,7 +1109,7 @@ func (x *Ref) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref.ProtoReflect.Descriptor instead. func (*Ref) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11} + return file_pb_constructs_proto_rawDescGZIP(), []int{11} } func (x *Ref) GetEmpty() *empty.Empty { @@ -1222,7 +1218,7 @@ type Oneof struct { func (x *Oneof) Reset() { *x = Oneof{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[12] + mi := &file_pb_constructs_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1235,7 +1231,7 @@ func (x *Oneof) String() string { func (*Oneof) ProtoMessage() {} func (x *Oneof) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[12] + mi := &file_pb_constructs_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1248,7 +1244,7 @@ func (x *Oneof) ProtoReflect() protoreflect.Message { // Deprecated: Use Oneof.ProtoReflect.Descriptor instead. func (*Oneof) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{12} + return file_pb_constructs_proto_rawDescGZIP(), []int{12} } func (x *Oneof) GetParam1() string { @@ -1367,7 +1363,7 @@ type Empty3_Int struct { func (x *Empty3_Int) Reset() { *x = Empty3_Int{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[13] + mi := &file_pb_constructs_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1380,7 +1376,7 @@ func (x *Empty3_Int) String() string { func (*Empty3_Int) ProtoMessage() {} func (x *Empty3_Int) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[13] + mi := &file_pb_constructs_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1393,7 +1389,7 @@ func (x *Empty3_Int) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty3_Int.ProtoReflect.Descriptor instead. func (*Empty3_Int) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{0, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{0, 0} } func (x *Empty3_Int) GetE() *Empty3 { @@ -1414,7 +1410,7 @@ type Foo_Foo2 struct { func (x *Foo_Foo2) Reset() { *x = Foo_Foo2{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[14] + mi := &file_pb_constructs_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1427,7 +1423,7 @@ func (x *Foo_Foo2) String() string { func (*Foo_Foo2) ProtoMessage() {} func (x *Foo_Foo2) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[14] + mi := &file_pb_constructs_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1440,7 +1436,7 @@ func (x *Foo_Foo2) ProtoReflect() protoreflect.Message { // Deprecated: Use Foo_Foo2.ProtoReflect.Descriptor instead. func (*Foo_Foo2) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{1, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{1, 0} } func (x *Foo_Foo2) GetParam1() string { @@ -1461,7 +1457,7 @@ type EmptyNested_EmptyNested1 struct { func (x *EmptyNested_EmptyNested1) Reset() { *x = EmptyNested_EmptyNested1{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[32] + mi := &file_pb_constructs_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1474,7 +1470,7 @@ func (x *EmptyNested_EmptyNested1) String() string { func (*EmptyNested_EmptyNested1) ProtoMessage() {} func (x *EmptyNested_EmptyNested1) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[32] + mi := &file_pb_constructs_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1487,7 +1483,7 @@ func (x *EmptyNested_EmptyNested1) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyNested_EmptyNested1.ProtoReflect.Descriptor instead. func (*EmptyNested_EmptyNested1) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{9, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{9, 0} } func (x *EmptyNested_EmptyNested1) GetNested2() *EmptyNested_EmptyNested1_EmptyNested2 { @@ -1506,7 +1502,7 @@ type EmptyNested_EmptyNested1_EmptyNested2 struct { func (x *EmptyNested_EmptyNested1_EmptyNested2) Reset() { *x = EmptyNested_EmptyNested1_EmptyNested2{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[33] + mi := &file_pb_constructs_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1519,7 +1515,7 @@ func (x *EmptyNested_EmptyNested1_EmptyNested2) String() string { func (*EmptyNested_EmptyNested1_EmptyNested2) ProtoMessage() {} func (x *EmptyNested_EmptyNested1_EmptyNested2) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[33] + mi := &file_pb_constructs_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1532,7 +1528,7 @@ func (x *EmptyNested_EmptyNested1_EmptyNested2) ProtoReflect() protoreflect.Mess // Deprecated: Use EmptyNested_EmptyNested1_EmptyNested2.ProtoReflect.Descriptor instead. func (*EmptyNested_EmptyNested1_EmptyNested2) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{9, 0, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{9, 0, 0} } type Ref_Bar struct { @@ -1546,7 +1542,7 @@ type Ref_Bar struct { func (x *Ref_Bar) Reset() { *x = Ref_Bar{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[34] + mi := &file_pb_constructs_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1559,7 +1555,7 @@ func (x *Ref_Bar) String() string { func (*Ref_Bar) ProtoMessage() {} func (x *Ref_Bar) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[34] + mi := &file_pb_constructs_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1572,7 +1568,7 @@ func (x *Ref_Bar) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Bar.ProtoReflect.Descriptor instead. func (*Ref_Bar) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 0} } func (x *Ref_Bar) GetParam1() string { @@ -1598,7 +1594,7 @@ type Ref_Foo struct { func (x *Ref_Foo) Reset() { *x = Ref_Foo{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[35] + mi := &file_pb_constructs_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1611,7 +1607,7 @@ func (x *Ref_Foo) String() string { func (*Ref_Foo) ProtoMessage() {} func (x *Ref_Foo) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[35] + mi := &file_pb_constructs_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1624,7 +1620,7 @@ func (x *Ref_Foo) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo.ProtoReflect.Descriptor instead. func (*Ref_Foo) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 1} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 1} } func (x *Ref_Foo) GetBar1() *Ref_Foo_Bar { @@ -1678,7 +1674,7 @@ type Ref_Foo_Baz struct { func (x *Ref_Foo_Baz) Reset() { *x = Ref_Foo_Baz{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[36] + mi := &file_pb_constructs_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1691,7 +1687,7 @@ func (x *Ref_Foo_Baz) String() string { func (*Ref_Foo_Baz) ProtoMessage() {} func (x *Ref_Foo_Baz) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[36] + mi := &file_pb_constructs_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1704,7 +1700,7 @@ func (x *Ref_Foo_Baz) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo_Baz.ProtoReflect.Descriptor instead. func (*Ref_Foo_Baz) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 1, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 1, 0} } type Ref_Foo_Bar struct { @@ -1718,7 +1714,7 @@ type Ref_Foo_Bar struct { func (x *Ref_Foo_Bar) Reset() { *x = Ref_Foo_Bar{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[37] + mi := &file_pb_constructs_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1731,7 +1727,7 @@ func (x *Ref_Foo_Bar) String() string { func (*Ref_Foo_Bar) ProtoMessage() {} func (x *Ref_Foo_Bar) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[37] + mi := &file_pb_constructs_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1744,7 +1740,7 @@ func (x *Ref_Foo_Bar) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo_Bar.ProtoReflect.Descriptor instead. func (*Ref_Foo_Bar) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 1, 1} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 1, 1} } func (x *Ref_Foo_Bar) GetParam1() string { @@ -1765,7 +1761,7 @@ type Ref_Foo_Baz_Gz struct { func (x *Ref_Foo_Baz_Gz) Reset() { *x = Ref_Foo_Baz_Gz{} if protoimpl.UnsafeEnabled { - mi := &file_example_constructs_proto_msgTypes[38] + mi := &file_pb_constructs_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1778,7 +1774,7 @@ func (x *Ref_Foo_Baz_Gz) String() string { func (*Ref_Foo_Baz_Gz) ProtoMessage() {} func (x *Ref_Foo_Baz_Gz) ProtoReflect() protoreflect.Message { - mi := &file_example_constructs_proto_msgTypes[38] + mi := &file_pb_constructs_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1791,7 +1787,7 @@ func (x *Ref_Foo_Baz_Gz) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo_Baz_Gz.ProtoReflect.Descriptor instead. func (*Ref_Foo_Baz_Gz) Descriptor() ([]byte, []int) { - return file_example_constructs_proto_rawDescGZIP(), []int{11, 1, 0, 0} + return file_pb_constructs_proto_rawDescGZIP(), []int{11, 1, 0, 0} } func (x *Ref_Foo_Baz_Gz) GetParam1() string { @@ -1801,355 +1797,355 @@ func (x *Ref_Foo_Baz_Gz) GetParam1() string { return "" } -var File_example_constructs_proto protoreflect.FileDescriptor - -var file_example_constructs_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 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, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x33, 0x12, 0x1c, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, - 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x69, 0x1a, - 0x1f, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x01, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x52, 0x01, 0x65, - 0x22, 0x55, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x1a, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0xf1, 0x02, 0x0a, 0x07, 0x53, 0x63, 0x61, 0x6c, 0x61, - 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x07, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0f, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x08, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xa8, 0x03, 0x0a, 0x08, 0x52, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, - 0x03, 0x28, 0x10, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, - 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, - 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, - 0x19, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x19, 0x0a, 0x03, 0x62, 0x61, - 0x72, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, - 0x52, 0x03, 0x62, 0x61, 0x72, 0x22, 0xaa, 0x11, 0x0a, 0x04, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x39, - 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x49, - 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x75, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, - 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, - 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, - 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, - 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, - 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x33, 0x32, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, - 0x12, 0x33, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0b, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x6f, 0x6f, - 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, - 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, - 0x61, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, - 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, - 0x6f, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, - 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x12, 0x36, 0x0a, 0x0a, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x72, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x42, 0x61, 0x72, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, - 0x32, 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, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, +var File_pb_constructs_proto protoreflect.FileDescriptor + +var file_pb_constructs_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 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, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x47, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x12, 0x1c, 0x0a, 0x01, + 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x69, 0x1a, 0x1f, 0x0a, 0x03, 0x49, 0x6e, + 0x74, 0x12, 0x18, 0x0a, 0x01, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, + 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x52, 0x01, 0x65, 0x22, 0x55, 0x0a, 0x03, 0x46, + 0x6f, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x32, 0x1a, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x31, 0x22, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x31, 0x22, 0xf4, 0x02, 0x0a, 0x07, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x64, + 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, + 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, + 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x08, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x78, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x58, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xab, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, + 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, 0x52, + 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, + 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, + 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, + 0x0b, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, 0x28, + 0x10, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, + 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, + 0x19, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x78, 0x18, 0x0e, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x58, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x19, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x19, 0x0a, 0x03, 0x62, + 0x61, 0x72, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, + 0x72, 0x52, 0x03, 0x62, 0x61, 0x72, 0x22, 0xaa, 0x11, 0x0a, 0x04, 0x4d, 0x61, 0x70, 0x73, 0x12, + 0x39, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, + 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, + 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, + 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, + 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x12, 0x33, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0b, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x6f, + 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, + 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, + 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, + 0x6f, 0x61, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, + 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, + 0x75, 0x62, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, + 0x6f, 0x6f, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, + 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x12, 0x36, 0x0a, 0x0a, + 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x72, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x42, 0x61, 0x72, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, + 0x33, 0x32, 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, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, + 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, + 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, + 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, + 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x06, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, + 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x53, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, - 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, - 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, - 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x28, 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, + 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, - 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, - 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x1d, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x31, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x6c, 0x0a, 0x0e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x30, 0x0a, 0x07, - 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x12, 0x28, - 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, - 0x65, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xaa, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, - 0x1a, 0x63, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, - 0x12, 0x43, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x52, 0x07, 0x6e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x32, 0x1a, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, - 0x73, 0x74, 0x65, 0x64, 0x32, 0x22, 0x1f, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xff, 0x06, 0x0a, 0x03, 0x52, 0x65, 0x66, 0x12, 0x2c, - 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x0b, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x36, 0x0a, 0x08, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, + 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, + 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, + 0x75, 0x62, 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, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, + 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, + 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x1d, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x31, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x6c, 0x0a, 0x0e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x30, 0x0a, + 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x12, + 0x28, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, + 0x76, 0x65, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xaa, 0x01, 0x0a, 0x0b, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x31, 0x1a, 0x63, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x31, 0x12, 0x43, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x52, 0x07, 0x6e, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x1a, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x22, 0x1f, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xff, 0x06, 0x0a, 0x03, 0x52, 0x65, 0x66, 0x12, + 0x2c, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x7a, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x22, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, - 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, - 0x08, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x05, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x07, - 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x07, 0x66, 0x6f, 0x72, - 0x65, 0x69, 0x67, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x45, - 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, - 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x32, 0x12, 0x22, 0x0a, 0x02, - 0x67, 0x7a, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x7a, 0x2e, 0x47, 0x7a, 0x52, 0x02, 0x67, 0x7a, - 0x1a, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, - 0xf6, 0x02, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, - 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, 0x31, 0x12, 0x2e, 0x0a, 0x0b, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x41, 0x0a, 0x0e, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x31, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x31, 0x12, - 0x1f, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, 0x32, - 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, - 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, - 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x32, 0x1a, 0x23, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x1a, - 0x1c, 0x0a, 0x02, 0x47, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, 0x33, 0x0a, - 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x14, 0x0a, 0x02, - 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, - 0x10, 0x01, 0x22, 0x14, 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, - 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x05, 0x4f, 0x6e, 0x65, - 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x32, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x12, 0x18, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x35, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x36, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x36, 0x42, 0x08, 0x0a, 0x06, - 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x31, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x32, - 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x33, 0x2a, 0x23, 0x0a, 0x03, 0x42, 0x61, - 0x72, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x31, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, - 0x41, 0x52, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x33, 0x10, 0x02, 0x32, - 0xfd, 0x02, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x12, 0x24, - 0x0a, 0x08, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x5f, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, - 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x1a, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, - 0x6c, 0x61, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x1a, - 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, - 0x05, 0x4d, 0x61, 0x70, 0x73, 0x5f, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, - 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x41, 0x6e, - 0x79, 0x5f, 0x12, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6e, - 0x79, 0x12, 0x2b, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, - 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5f, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x0f, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x21, - 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x5f, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x33, 0x1a, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x33, 0x12, 0x18, 0x0a, 0x04, 0x52, 0x65, 0x66, 0x5f, 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x65, 0x66, 0x1a, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x06, 0x4f, - 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, - 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x22, 0x0a, 0x0a, 0x43, - 0x61, 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, - 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, - 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x0a, + 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x36, 0x0a, + 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x7a, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, + 0x12, 0x22, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x07, 0x66, 0x69, 0x6c, + 0x65, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x75, + 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, + 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x05, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x26, 0x0a, + 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x07, 0x66, 0x6f, + 0x72, 0x65, 0x69, 0x67, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, + 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, + 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x32, 0x12, 0x22, 0x0a, + 0x02, 0x67, 0x7a, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x7a, 0x2e, 0x47, 0x7a, 0x52, 0x02, 0x67, + 0x7a, 0x1a, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, + 0x1a, 0xf6, 0x02, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x31, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, + 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, 0x31, 0x12, 0x2e, 0x0a, + 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x41, 0x0a, + 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x31, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x31, + 0x12, 0x1f, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, + 0x32, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, + 0x65, 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, + 0x72, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x32, 0x1a, 0x23, 0x0a, 0x03, 0x42, 0x61, 0x7a, + 0x1a, 0x1c, 0x0a, 0x02, 0x47, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, 0x33, + 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x14, 0x0a, + 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, + 0x31, 0x10, 0x01, 0x22, 0x14, 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, + 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x05, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x18, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x12, + 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x35, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x36, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x36, 0x42, 0x08, 0x0a, + 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x31, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, + 0x32, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x33, 0x2a, 0x23, 0x0a, 0x03, 0x42, + 0x61, 0x72, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x31, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, + 0x42, 0x41, 0x52, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x33, 0x10, 0x02, + 0x32, 0xfd, 0x02, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x12, + 0x24, 0x0a, 0x08, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x5f, 0x12, 0x0b, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x1a, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, + 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, + 0x0a, 0x05, 0x4d, 0x61, 0x70, 0x73, 0x5f, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, + 0x73, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x25, 0x0a, 0x04, 0x41, + 0x6e, 0x79, 0x5f, 0x12, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x41, + 0x6e, 0x79, 0x12, 0x2b, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x2e, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5f, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x0f, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, + 0x21, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x5f, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x1a, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x33, 0x12, 0x18, 0x0a, 0x04, 0x52, 0x65, 0x66, 0x5f, 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x66, 0x1a, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x06, + 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, + 0x66, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x22, 0x0a, 0x0a, + 0x43, 0x61, 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, + 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_example_constructs_proto_rawDescOnce sync.Once - file_example_constructs_proto_rawDescData = file_example_constructs_proto_rawDesc + file_pb_constructs_proto_rawDescOnce sync.Once + file_pb_constructs_proto_rawDescData = file_pb_constructs_proto_rawDesc ) -func file_example_constructs_proto_rawDescGZIP() []byte { - file_example_constructs_proto_rawDescOnce.Do(func() { - file_example_constructs_proto_rawDescData = protoimpl.X.CompressGZIP(file_example_constructs_proto_rawDescData) +func file_pb_constructs_proto_rawDescGZIP() []byte { + file_pb_constructs_proto_rawDescOnce.Do(func() { + file_pb_constructs_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_constructs_proto_rawDescData) }) - return file_example_constructs_proto_rawDescData + return file_pb_constructs_proto_rawDescData } -var file_example_constructs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_example_constructs_proto_msgTypes = make([]protoimpl.MessageInfo, 39) -var file_example_constructs_proto_goTypes = []interface{}{ +var file_pb_constructs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_pb_constructs_proto_msgTypes = make([]protoimpl.MessageInfo, 39) +var file_pb_constructs_proto_goTypes = []interface{}{ (Bar)(0), // 0: pb.Bar (Ref_Foo_En)(0), // 1: pb.Ref.Foo.En (Ref_Foo_Bar_En)(0), // 2: pb.Ref.Foo.Bar.En @@ -2196,7 +2192,7 @@ var file_example_constructs_proto_goTypes = []interface{}{ (*timestamp.Timestamp)(nil), // 43: google.protobuf.Timestamp (*any.Any)(nil), // 44: google.protobuf.Any } -var file_example_constructs_proto_depIdxs = []int32{ +var file_pb_constructs_proto_depIdxs = []int32{ 16, // 0: pb.Empty3.i:type_name -> pb.Empty3.Int 4, // 1: pb.Repeated.foo:type_name -> pb.Foo 0, // 2: pb.Repeated.bar:type_name -> pb.Bar @@ -2269,13 +2265,13 @@ var file_example_constructs_proto_depIdxs = []int32{ 0, // [0:45] is the sub-list for field type_name } -func init() { file_example_constructs_proto_init() } -func file_example_constructs_proto_init() { - if File_example_constructs_proto != nil { +func init() { file_pb_constructs_proto_init() } +func file_pb_constructs_proto_init() { + if File_pb_constructs_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_example_constructs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty3); i { case 0: return &v.state @@ -2287,7 +2283,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Foo); i { case 0: return &v.state @@ -2299,7 +2295,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Baz); i { case 0: return &v.state @@ -2311,7 +2307,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Scalars); i { case 0: return &v.state @@ -2323,7 +2319,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Repeated); i { case 0: return &v.state @@ -2335,7 +2331,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Maps); i { case 0: return &v.state @@ -2347,7 +2343,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Any); i { case 0: return &v.state @@ -2359,7 +2355,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty); i { case 0: return &v.state @@ -2371,7 +2367,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyRecursive); i { case 0: return &v.state @@ -2383,7 +2379,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyNested); i { case 0: return &v.state @@ -2395,7 +2391,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Timestamp); i { case 0: return &v.state @@ -2407,7 +2403,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref); i { case 0: return &v.state @@ -2419,7 +2415,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Oneof); i { case 0: return &v.state @@ -2431,7 +2427,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty3_Int); i { case 0: return &v.state @@ -2443,7 +2439,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Foo_Foo2); i { case 0: return &v.state @@ -2455,7 +2451,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyNested_EmptyNested1); i { case 0: return &v.state @@ -2467,7 +2463,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyNested_EmptyNested1_EmptyNested2); i { case 0: return &v.state @@ -2479,7 +2475,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Bar); i { case 0: return &v.state @@ -2491,7 +2487,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo); i { case 0: return &v.state @@ -2503,7 +2499,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo_Baz); i { case 0: return &v.state @@ -2515,7 +2511,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo_Bar); i { case 0: return &v.state @@ -2527,7 +2523,7 @@ func file_example_constructs_proto_init() { return nil } } - file_example_constructs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_pb_constructs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo_Baz_Gz); i { case 0: return &v.state @@ -2540,7 +2536,7 @@ func file_example_constructs_proto_init() { } } } - file_example_constructs_proto_msgTypes[12].OneofWrappers = []interface{}{ + file_pb_constructs_proto_msgTypes[12].OneofWrappers = []interface{}{ (*Oneof_Param2)(nil), (*Oneof_Param3)(nil), (*Oneof_Param4)(nil), @@ -2551,423 +2547,19 @@ func file_example_constructs_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_example_constructs_proto_rawDesc, + RawDescriptor: file_pb_constructs_proto_rawDesc, NumEnums: 3, NumMessages: 39, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_example_constructs_proto_goTypes, - DependencyIndexes: file_example_constructs_proto_depIdxs, - EnumInfos: file_example_constructs_proto_enumTypes, - MessageInfos: file_example_constructs_proto_msgTypes, + GoTypes: file_pb_constructs_proto_goTypes, + DependencyIndexes: file_pb_constructs_proto_depIdxs, + EnumInfos: file_pb_constructs_proto_enumTypes, + MessageInfos: file_pb_constructs_proto_msgTypes, }.Build() - File_example_constructs_proto = out.File - file_example_constructs_proto_rawDesc = nil - file_example_constructs_proto_goTypes = nil - file_example_constructs_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ConstructsClient is the client API for Constructs service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ConstructsClient interface { - Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) - Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) - Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) - Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*Any, error) - Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) - Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) - Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) - Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) - Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) - CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) -} - -type constructsClient struct { - cc grpc.ClientConnInterface -} - -func NewConstructsClient(cc grpc.ClientConnInterface) ConstructsClient { - return &constructsClient{cc} -} - -func (c *constructsClient) Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) { - out := new(Scalars) - err := c.cc.Invoke(ctx, "/pb.Constructs/Scalars_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) { - out := new(Repeated) - err := c.cc.Invoke(ctx, "/pb.Constructs/Repeated_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) { - out := new(Maps) - err := c.cc.Invoke(ctx, "/pb.Constructs/Maps_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*Any, error) { - out := new(Any) - err := c.cc.Invoke(ctx, "/pb.Constructs/Any_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/pb.Constructs/Empty_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) { - out := new(EmptyNested) - err := c.cc.Invoke(ctx, "/pb.Constructs/Empty2_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) { - out := new(Empty3) - err := c.cc.Invoke(ctx, "/pb.Constructs/Empty3_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) { - out := new(Ref) - err := c.cc.Invoke(ctx, "/pb.Constructs/Ref_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) { - out := new(Oneof) - err := c.cc.Invoke(ctx, "/pb.Constructs/Oneof_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/pb.Constructs/CallWithId", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConstructsServer is the server API for Constructs service. -type ConstructsServer interface { - Scalars_(context.Context, *Scalars) (*Scalars, error) - Repeated_(context.Context, *Repeated) (*Repeated, error) - Maps_(context.Context, *Maps) (*Maps, error) - Any_(context.Context, *any.Any) (*Any, error) - Empty_(context.Context, *empty.Empty) (*Empty, error) - Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) - Empty3_(context.Context, *Empty3) (*Empty3, error) - Ref_(context.Context, *Ref) (*Ref, error) - Oneof_(context.Context, *Oneof) (*Oneof, error) - CallWithId(context.Context, *Empty) (*Empty, error) -} - -// UnimplementedConstructsServer can be embedded to have forward compatible implementations. -type UnimplementedConstructsServer struct { -} - -func (*UnimplementedConstructsServer) Scalars_(context.Context, *Scalars) (*Scalars, error) { - return nil, status.Errorf(codes.Unimplemented, "method Scalars_ not implemented") -} -func (*UnimplementedConstructsServer) Repeated_(context.Context, *Repeated) (*Repeated, error) { - return nil, status.Errorf(codes.Unimplemented, "method Repeated_ not implemented") -} -func (*UnimplementedConstructsServer) Maps_(context.Context, *Maps) (*Maps, error) { - return nil, status.Errorf(codes.Unimplemented, "method Maps_ not implemented") -} -func (*UnimplementedConstructsServer) Any_(context.Context, *any.Any) (*Any, error) { - return nil, status.Errorf(codes.Unimplemented, "method Any_ not implemented") -} -func (*UnimplementedConstructsServer) Empty_(context.Context, *empty.Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty_ not implemented") -} -func (*UnimplementedConstructsServer) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty2_ not implemented") -} -func (*UnimplementedConstructsServer) Empty3_(context.Context, *Empty3) (*Empty3, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty3_ not implemented") -} -func (*UnimplementedConstructsServer) Ref_(context.Context, *Ref) (*Ref, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ref_ not implemented") -} -func (*UnimplementedConstructsServer) Oneof_(context.Context, *Oneof) (*Oneof, error) { - return nil, status.Errorf(codes.Unimplemented, "method Oneof_ not implemented") -} -func (*UnimplementedConstructsServer) CallWithId(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallWithId not implemented") -} - -func RegisterConstructsServer(s *grpc.Server, srv ConstructsServer) { - s.RegisterService(&_Constructs_serviceDesc, srv) -} - -func _Constructs_Scalars__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Scalars) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Scalars_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Scalars_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Scalars_(ctx, req.(*Scalars)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Repeated__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Repeated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Repeated_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Repeated_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Repeated_(ctx, req.(*Repeated)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Maps__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Maps) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Maps_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Maps_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Maps_(ctx, req.(*Maps)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(any.Any) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Any_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Any_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Any_(ctx, req.(*any.Any)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Empty__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Empty_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Empty_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty_(ctx, req.(*empty.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Empty2__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyRecursive) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Empty2_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Empty2_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty2_(ctx, req.(*EmptyRecursive)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Empty3__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty3) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Empty3_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Empty3_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty3_(ctx, req.(*Empty3)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Ref__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Ref) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Ref_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Ref_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Ref_(ctx, req.(*Ref)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Oneof__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Oneof) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Oneof_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Oneof_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Oneof_(ctx, req.(*Oneof)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_CallWithId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).CallWithId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/CallWithId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).CallWithId(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _Constructs_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pb.Constructs", - HandlerType: (*ConstructsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Scalars_", - Handler: _Constructs_Scalars__Handler, - }, - { - MethodName: "Repeated_", - Handler: _Constructs_Repeated__Handler, - }, - { - MethodName: "Maps_", - Handler: _Constructs_Maps__Handler, - }, - { - MethodName: "Any_", - Handler: _Constructs_Any__Handler, - }, - { - MethodName: "Empty_", - Handler: _Constructs_Empty__Handler, - }, - { - MethodName: "Empty2_", - Handler: _Constructs_Empty2__Handler, - }, - { - MethodName: "Empty3_", - Handler: _Constructs_Empty3__Handler, - }, - { - MethodName: "Ref_", - Handler: _Constructs_Ref__Handler, - }, - { - MethodName: "Oneof_", - Handler: _Constructs_Oneof__Handler, - }, - { - MethodName: "CallWithId", - Handler: _Constructs_CallWithId_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "example/constructs.proto", + File_pb_constructs_proto = out.File + file_pb_constructs_proto_rawDesc = nil + file_pb_constructs_proto_goTypes = nil + file_pb_constructs_proto_depIdxs = nil } diff --git a/example/constructs.proto b/example/codegen/pb/constructs.proto similarity index 97% rename from example/constructs.proto rename to example/codegen/pb/constructs.proto index b9c2cee..160e76f 100644 --- a/example/constructs.proto +++ b/example/codegen/pb/constructs.proto @@ -58,7 +58,7 @@ message Scalars { sfixed32 sfixed32 = 11; sfixed64 sfixed64 = 12; bool bool = 13; - string string = 14; + string string_x = 14; // x for collisions with go method String bytes bytes = 15; } @@ -76,7 +76,7 @@ message Repeated { repeated sfixed32 sfixed32 = 11; repeated sfixed64 sfixed64 = 12; repeated bool bool = 13; - repeated string string = 14; + repeated string string_x = 14; repeated bytes bytes = 15; repeated Foo foo = 16; repeated Bar bar = 17; diff --git a/example/codegen/pb/constructs_grpc.pb.go b/example/codegen/pb/constructs_grpc.pb.go new file mode 100644 index 0000000..6e48b18 --- /dev/null +++ b/example/codegen/pb/constructs_grpc.pb.go @@ -0,0 +1,423 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package pb + +import ( + context "context" + any "github.com/golang/protobuf/ptypes/any" + empty "github.com/golang/protobuf/ptypes/empty" + 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. +const _ = grpc.SupportPackageIsVersion7 + +// ConstructsClient is the client API for Constructs 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 ConstructsClient interface { + Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) + Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) + Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) + Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*Any, error) + Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) + Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) + Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) + Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) + Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) + CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) +} + +type constructsClient struct { + cc grpc.ClientConnInterface +} + +func NewConstructsClient(cc grpc.ClientConnInterface) ConstructsClient { + return &constructsClient{cc} +} + +func (c *constructsClient) Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) { + out := new(Scalars) + err := c.cc.Invoke(ctx, "/pb.Constructs/Scalars_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) { + out := new(Repeated) + err := c.cc.Invoke(ctx, "/pb.Constructs/Repeated_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) { + out := new(Maps) + err := c.cc.Invoke(ctx, "/pb.Constructs/Maps_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*Any, error) { + out := new(Any) + err := c.cc.Invoke(ctx, "/pb.Constructs/Any_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/pb.Constructs/Empty_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) { + out := new(EmptyNested) + err := c.cc.Invoke(ctx, "/pb.Constructs/Empty2_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) { + out := new(Empty3) + err := c.cc.Invoke(ctx, "/pb.Constructs/Empty3_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) { + out := new(Ref) + err := c.cc.Invoke(ctx, "/pb.Constructs/Ref_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) { + out := new(Oneof) + err := c.cc.Invoke(ctx, "/pb.Constructs/Oneof_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/pb.Constructs/CallWithId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ConstructsServer is the server API for Constructs service. +// All implementations must embed UnimplementedConstructsServer +// for forward compatibility +type ConstructsServer interface { + Scalars_(context.Context, *Scalars) (*Scalars, error) + Repeated_(context.Context, *Repeated) (*Repeated, error) + Maps_(context.Context, *Maps) (*Maps, error) + Any_(context.Context, *any.Any) (*Any, error) + Empty_(context.Context, *empty.Empty) (*Empty, error) + Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) + Empty3_(context.Context, *Empty3) (*Empty3, error) + Ref_(context.Context, *Ref) (*Ref, error) + Oneof_(context.Context, *Oneof) (*Oneof, error) + CallWithId(context.Context, *Empty) (*Empty, error) + mustEmbedUnimplementedConstructsServer() +} + +// UnimplementedConstructsServer must be embedded to have forward compatible implementations. +type UnimplementedConstructsServer struct { +} + +func (UnimplementedConstructsServer) Scalars_(context.Context, *Scalars) (*Scalars, error) { + return nil, status.Errorf(codes.Unimplemented, "method Scalars_ not implemented") +} +func (UnimplementedConstructsServer) Repeated_(context.Context, *Repeated) (*Repeated, error) { + return nil, status.Errorf(codes.Unimplemented, "method Repeated_ not implemented") +} +func (UnimplementedConstructsServer) Maps_(context.Context, *Maps) (*Maps, error) { + return nil, status.Errorf(codes.Unimplemented, "method Maps_ not implemented") +} +func (UnimplementedConstructsServer) Any_(context.Context, *any.Any) (*Any, error) { + return nil, status.Errorf(codes.Unimplemented, "method Any_ not implemented") +} +func (UnimplementedConstructsServer) Empty_(context.Context, *empty.Empty) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Empty_ not implemented") +} +func (UnimplementedConstructsServer) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) { + return nil, status.Errorf(codes.Unimplemented, "method Empty2_ not implemented") +} +func (UnimplementedConstructsServer) Empty3_(context.Context, *Empty3) (*Empty3, error) { + return nil, status.Errorf(codes.Unimplemented, "method Empty3_ not implemented") +} +func (UnimplementedConstructsServer) Ref_(context.Context, *Ref) (*Ref, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ref_ not implemented") +} +func (UnimplementedConstructsServer) Oneof_(context.Context, *Oneof) (*Oneof, error) { + return nil, status.Errorf(codes.Unimplemented, "method Oneof_ not implemented") +} +func (UnimplementedConstructsServer) CallWithId(context.Context, *Empty) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallWithId not implemented") +} +func (UnimplementedConstructsServer) mustEmbedUnimplementedConstructsServer() {} + +// UnsafeConstructsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ConstructsServer will +// result in compilation errors. +type UnsafeConstructsServer interface { + mustEmbedUnimplementedConstructsServer() +} + +func RegisterConstructsServer(s grpc.ServiceRegistrar, srv ConstructsServer) { + s.RegisterService(&_Constructs_serviceDesc, srv) +} + +func _Constructs_Scalars__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Scalars) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Scalars_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Scalars_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Scalars_(ctx, req.(*Scalars)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Repeated__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Repeated) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Repeated_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Repeated_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Repeated_(ctx, req.(*Repeated)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Maps__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Maps) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Maps_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Maps_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Maps_(ctx, req.(*Maps)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(any.Any) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Any_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Any_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Any_(ctx, req.(*any.Any)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Empty__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Empty_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Empty_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Empty_(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Empty2__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRecursive) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Empty2_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Empty2_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Empty2_(ctx, req.(*EmptyRecursive)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Empty3__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty3) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Empty3_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Empty3_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Empty3_(ctx, req.(*Empty3)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Ref__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Ref) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Ref_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Ref_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Ref_(ctx, req.(*Ref)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Oneof__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Oneof) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Oneof_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Oneof_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Oneof_(ctx, req.(*Oneof)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_CallWithId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).CallWithId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/CallWithId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).CallWithId(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Constructs_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.Constructs", + HandlerType: (*ConstructsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Scalars_", + Handler: _Constructs_Scalars__Handler, + }, + { + MethodName: "Repeated_", + Handler: _Constructs_Repeated__Handler, + }, + { + MethodName: "Maps_", + Handler: _Constructs_Maps__Handler, + }, + { + MethodName: "Any_", + Handler: _Constructs_Any__Handler, + }, + { + MethodName: "Empty_", + Handler: _Constructs_Empty__Handler, + }, + { + MethodName: "Empty2_", + Handler: _Constructs_Empty2__Handler, + }, + { + MethodName: "Empty3_", + Handler: _Constructs_Empty3__Handler, + }, + { + MethodName: "Ref_", + Handler: _Constructs_Ref__Handler, + }, + { + MethodName: "Oneof_", + Handler: _Constructs_Oneof__Handler, + }, + { + MethodName: "CallWithId", + Handler: _Constructs_CallWithId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "pb/constructs.proto", +} diff --git a/example/codegen/pb/options.gqlgen.pb.go b/example/codegen/pb/options.gqlgen.pb.go new file mode 100644 index 0000000..f7e14f1 --- /dev/null +++ b/example/codegen/pb/options.gqlgen.pb.go @@ -0,0 +1,32 @@ +package pb + +import ( + context "context" +) + +type ServiceResolvers struct{ Service ServiceServer } + +func (s *ServiceResolvers) ServiceMutate1(ctx context.Context, in *Data) (*Data, error) { + return s.Service.Mutate1(ctx, in) +} +func (s *ServiceResolvers) ServiceMutate2(ctx context.Context, in *Data) (*Data, error) { + return s.Service.Mutate2(ctx, in) +} +func (s *ServiceResolvers) ServiceQuery1(ctx context.Context, in *Data) (*Data, error) { + return s.Service.Query1(ctx, in) +} + +type QueryResolvers struct{ Service QueryServer } + +func (s *QueryResolvers) QueryQuery1(ctx context.Context, in *Data) (*Data, error) { + return s.Service.Query1(ctx, in) +} +func (s *QueryResolvers) QueryQuery2(ctx context.Context, in *Data) (*Data, error) { + return s.Service.Query2(ctx, in) +} +func (s *QueryResolvers) QueryMutate1(ctx context.Context, in *Data) (*Data, error) { + return s.Service.Mutate1(ctx, in) +} + +type DataInput = Data +type Foo2Input = Foo2 diff --git a/example/codegen/pb/options.graphqls b/example/codegen/pb/options.graphqls new file mode 100644 index 0000000..2cc941f --- /dev/null +++ b/example/codegen/pb/options.graphqls @@ -0,0 +1,131 @@ +directive @Query on FIELD_DEFINITION +directive @Service on FIELD_DEFINITION +type Data { + """ + must be required + + """ + stringX: String! + """ + must be required + + """ + foo: Foo2! + """ + must be required because its greater than 0 + + """ + double: [Float!]! + """ + simple + + """ + string2: String + """ + simple + + """ + foo2: Foo2 + """ + simple + + """ + double2: [Float!] +} +input DataInput { + """ + must be required + + """ + stringX: String! + """ + must be required + + """ + foo: Foo2Input! + """ + must be required because its greater than 0 + + """ + double: [Float!]! + """ + simple + + """ + string2: String + """ + simple + + """ + foo2: Foo2Input + """ + simple + + """ + double2: [Float!] +} +type Foo2 { + param1: String +} +input Foo2Input { + param1: String +} +type Mutation { + """ + must be a mutation + + """ + serviceMutate1(in: DataInput): Data @Service + """ + must be a mutation + + """ + serviceMutate2(in: DataInput): Data @Service + """ + must be a mutation + + """ + servicePublish(in: DataInput): Data @Service + """ + must be a mutation and a subscription + + """ + servicePubSub1(in: DataInput): Data @Service + serviceInvalidSubscribe3(in: DataInput): Data @Service + servicePubSub2(in: DataInput): Data @Service + queryMutate1(in: DataInput): Data @Query +} +type Query { + serviceQuery1(in: DataInput): Data @Service + serviceInvalidSubscribe1(in: DataInput): Data @Service + """ + must be a query + + """ + queryQuery1(in: DataInput): Data @Query + """ + must be a query + + """ + queryQuery2(in: DataInput): Data @Query +} +type Subscription { + """ + must be a subscription + + """ + serviceSubscribe(in: DataInput): Data @Service + """ + must be a mutation and a subscription + + """ + servicePubSub1(in: DataInput): Data @Service + serviceInvalidSubscribe2(in: DataInput): Data @Service + serviceInvalidSubscribe3(in: DataInput): Data @Service + servicePubSub2(in: DataInput): Data @Service + """ + must be a subscription + + """ + querySubscribe(in: DataInput): Data @Query +} diff --git a/example/codegen/pb/options.pb.go b/example/codegen/pb/options.pb.go new file mode 100644 index 0000000..0be2c6b --- /dev/null +++ b/example/codegen/pb/options.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: pb/options.proto + +package pb + +import ( + _ "github.com/danielvladco/go-proto-gql/pb" + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Data struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StringX string `protobuf:"bytes,1,opt,name=string_x,json=stringX,proto3" json:"string_x,omitempty"` // must be required + Foo *Foo2 `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"` // must be required + Double []float64 `protobuf:"fixed64,3,rep,packed,name=double,proto3" json:"double,omitempty"` // must be required because its greater than 0 + String2 string `protobuf:"bytes,4,opt,name=string2,proto3" json:"string2,omitempty"` // simple + Foo2 *Foo2 `protobuf:"bytes,5,opt,name=foo2,proto3" json:"foo2,omitempty"` // simple + Double2 []float64 `protobuf:"fixed64,6,rep,packed,name=double2,proto3" json:"double2,omitempty"` // simple +} + +func (x *Data) Reset() { + *x = Data{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_pb_options_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 Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_pb_options_proto_rawDescGZIP(), []int{0} +} + +func (x *Data) GetStringX() string { + if x != nil { + return x.StringX + } + return "" +} + +func (x *Data) GetFoo() *Foo2 { + if x != nil { + return x.Foo + } + return nil +} + +func (x *Data) GetDouble() []float64 { + if x != nil { + return x.Double + } + return nil +} + +func (x *Data) GetString2() string { + if x != nil { + return x.String2 + } + return "" +} + +func (x *Data) GetFoo2() *Foo2 { + if x != nil { + return x.Foo2 + } + return nil +} + +func (x *Data) GetDouble2() []float64 { + if x != nil { + return x.Double2 + } + return nil +} + +type Foo2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Param1 string `protobuf:"bytes,1,opt,name=param1,proto3" json:"param1,omitempty"` +} + +func (x *Foo2) Reset() { + *x = Foo2{} + if protoimpl.UnsafeEnabled { + mi := &file_pb_options_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Foo2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Foo2) ProtoMessage() {} + +func (x *Foo2) ProtoReflect() protoreflect.Message { + mi := &file_pb_options_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 Foo2.ProtoReflect.Descriptor instead. +func (*Foo2) Descriptor() ([]byte, []int) { + return file_pb_options_proto_rawDescGZIP(), []int{1} +} + +func (x *Foo2) GetParam1() string { + if x != nil { + return x.Param1 + } + return "" +} + +var File_pb_options_proto protoreflect.FileDescriptor + +var file_pb_options_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x70, 0x62, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, + 0x61, 0x12, 0x21, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x07, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x58, 0x12, 0x22, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, 0x06, 0xb2, 0xe0, 0x1f, + 0x02, 0x08, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1e, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, + 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x01, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, + 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x32, 0x12, 0x1c, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, + 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x01, 0x52, 0x07, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x32, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, + 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x32, 0x90, 0x03, 0x0a, 0x07, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, + 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x32, + 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x12, 0x1f, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x21, 0x0a, 0x07, + 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x28, 0x01, + 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x01, 0x30, + 0x01, 0x12, 0x31, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x33, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, + 0x28, 0x01, 0x30, 0x01, 0x12, 0x27, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x32, 0x12, + 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x00, 0x28, 0x01, 0x30, 0x01, 0x32, 0x91, 0x01, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, + 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x1a, 0x04, 0xb0, 0xe0, 0x1f, + 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_pb_options_proto_rawDescOnce sync.Once + file_pb_options_proto_rawDescData = file_pb_options_proto_rawDesc +) + +func file_pb_options_proto_rawDescGZIP() []byte { + file_pb_options_proto_rawDescOnce.Do(func() { + file_pb_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_options_proto_rawDescData) + }) + return file_pb_options_proto_rawDescData +} + +var file_pb_options_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_pb_options_proto_goTypes = []interface{}{ + (*Data)(nil), // 0: pb.Data + (*Foo2)(nil), // 1: pb.Foo2 +} +var file_pb_options_proto_depIdxs = []int32{ + 1, // 0: pb.Data.foo:type_name -> pb.Foo2 + 1, // 1: pb.Data.foo2:type_name -> pb.Foo2 + 0, // 2: pb.Service.Mutate1:input_type -> pb.Data + 0, // 3: pb.Service.Mutate2:input_type -> pb.Data + 0, // 4: pb.Service.Query1:input_type -> pb.Data + 0, // 5: pb.Service.Publish:input_type -> pb.Data + 0, // 6: pb.Service.Subscribe:input_type -> pb.Data + 0, // 7: pb.Service.PubSub1:input_type -> pb.Data + 0, // 8: pb.Service.InvalidSubscribe1:input_type -> pb.Data + 0, // 9: pb.Service.InvalidSubscribe2:input_type -> pb.Data + 0, // 10: pb.Service.InvalidSubscribe3:input_type -> pb.Data + 0, // 11: pb.Service.PubSub2:input_type -> pb.Data + 0, // 12: pb.Query.Query1:input_type -> pb.Data + 0, // 13: pb.Query.Query2:input_type -> pb.Data + 0, // 14: pb.Query.Mutate1:input_type -> pb.Data + 0, // 15: pb.Query.Subscribe:input_type -> pb.Data + 0, // 16: pb.Service.Mutate1:output_type -> pb.Data + 0, // 17: pb.Service.Mutate2:output_type -> pb.Data + 0, // 18: pb.Service.Query1:output_type -> pb.Data + 0, // 19: pb.Service.Publish:output_type -> pb.Data + 0, // 20: pb.Service.Subscribe:output_type -> pb.Data + 0, // 21: pb.Service.PubSub1:output_type -> pb.Data + 0, // 22: pb.Service.InvalidSubscribe1:output_type -> pb.Data + 0, // 23: pb.Service.InvalidSubscribe2:output_type -> pb.Data + 0, // 24: pb.Service.InvalidSubscribe3:output_type -> pb.Data + 0, // 25: pb.Service.PubSub2:output_type -> pb.Data + 0, // 26: pb.Query.Query1:output_type -> pb.Data + 0, // 27: pb.Query.Query2:output_type -> pb.Data + 0, // 28: pb.Query.Mutate1:output_type -> pb.Data + 0, // 29: pb.Query.Subscribe:output_type -> pb.Data + 16, // [16:30] is the sub-list for method output_type + 2, // [2:16] 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_pb_options_proto_init() } +func file_pb_options_proto_init() { + if File_pb_options_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_pb_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Data); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pb_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Foo2); 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_pb_options_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_pb_options_proto_goTypes, + DependencyIndexes: file_pb_options_proto_depIdxs, + MessageInfos: file_pb_options_proto_msgTypes, + }.Build() + File_pb_options_proto = out.File + file_pb_options_proto_rawDesc = nil + file_pb_options_proto_goTypes = nil + file_pb_options_proto_depIdxs = nil +} diff --git a/example/options.proto b/example/codegen/pb/options.proto similarity index 60% rename from example/options.proto rename to example/codegen/pb/options.proto index 8e729f6..01d7d3a 100644 --- a/example/options.proto +++ b/example/codegen/pb/options.proto @@ -8,7 +8,7 @@ service Service { rpc Mutate1 (Data) returns (Data); // must be a mutation rpc Mutate2 (Data) returns (Data); // must be a mutation rpc Query1 (Data) returns (Data) { - option (gql.rpc_type) = QUERY; + option (danielvladco.protobuf.graphql.rpc_type) = QUERY; } // must be a query rpc Publish (stream Data) returns (Data); // must be a mutation @@ -16,36 +16,36 @@ service Service { rpc PubSub1 (stream Data) returns (stream Data); // must be a mutation and a subscription rpc InvalidSubscribe1 (stream Data) returns (Data) { - option (gql.rpc_type) = QUERY; + option (danielvladco.protobuf.graphql.rpc_type) = QUERY; }; // must ignore rpc InvalidSubscribe2 (Data) returns (stream Data) { - option (gql.rpc_type) = MUTATION; + option (danielvladco.protobuf.graphql.rpc_type) = MUTATION; }; // must ignore rpc InvalidSubscribe3 (stream Data) returns (stream Data) { - option (gql.rpc_type) = QUERY; + option (danielvladco.protobuf.graphql.rpc_type) = QUERY; }; // must ignore rpc PubSub2 (stream Data) returns (stream Data) { - option (gql.rpc_type) = DEFAULT; + option (danielvladco.protobuf.graphql.rpc_type) = DEFAULT; }; // must ignore } service Query { - option (gql.svc_type) = QUERY; + option (danielvladco.protobuf.graphql.svc_type) = QUERY; rpc Query1 (Data) returns (Data); // must be a query rpc Query2 (Data) returns (Data); // must be a query rpc Mutate1 (Data) returns (Data) { - option (gql.rpc_type) = MUTATION; + option (danielvladco.protobuf.graphql.rpc_type) = MUTATION; } // must be a mutation rpc Subscribe (Data) returns (stream Data); // must be a subscription } message Data { - string string = 1 [(gql.field) = {required: true}]; // must be required - Foo2 foo = 2 [(gql.field) = {required: true}]; // must be required - repeated float float = 3 [(gql.field) = {required: true}]; // must be required because its greater than 0 + string string_x = 1 [(danielvladco.protobuf.graphql.field) = {required: true}]; // must be required + Foo2 foo = 2 [(danielvladco.protobuf.graphql.field) = {required: true}]; // must be required + repeated double double = 3 [(danielvladco.protobuf.graphql.field) = {required: true}]; // must be required because its greater than 0 string string2 = 4; // simple Foo2 foo2 = 5; // simple - repeated float float2 = 6; // simple + repeated double double2 = 6; // simple } message Foo2 { diff --git a/example/options.pb.go b/example/codegen/pb/options_grpc.pb.go similarity index 59% rename from example/options.pb.go rename to example/codegen/pb/options_grpc.pb.go index 4550f52..4b9cfd9 100644 --- a/example/options.pb.go +++ b/example/codegen/pb/options_grpc.pb.go @@ -1,346 +1,21 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.21.0 -// protoc v3.7.1 -// source: example/options.proto +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package pb import ( context "context" - _ "github.com/danielvladco/go-proto-gql/pb" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - String_ string `protobuf:"bytes,1,opt,name=string,proto3" json:"string,omitempty"` // must be required - Foo *Foo2 `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"` // must be required - Float []float32 `protobuf:"fixed32,3,rep,packed,name=float,proto3" json:"float,omitempty"` // must be required because its greater than 0 - String2 string `protobuf:"bytes,4,opt,name=string2,proto3" json:"string2,omitempty"` // simple - Foo2 *Foo2 `protobuf:"bytes,5,opt,name=foo2,proto3" json:"foo2,omitempty"` // simple - Float2 []float32 `protobuf:"fixed32,6,rep,packed,name=float2,proto3" json:"float2,omitempty"` // simple -} - -func (x *Data) Reset() { - *x = Data{} - if protoimpl.UnsafeEnabled { - mi := &file_example_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Data) ProtoMessage() {} - -func (x *Data) ProtoReflect() protoreflect.Message { - mi := &file_example_options_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 Data.ProtoReflect.Descriptor instead. -func (*Data) Descriptor() ([]byte, []int) { - return file_example_options_proto_rawDescGZIP(), []int{0} -} - -func (x *Data) GetString_() string { - if x != nil { - return x.String_ - } - return "" -} - -func (x *Data) GetFoo() *Foo2 { - if x != nil { - return x.Foo - } - return nil -} - -func (x *Data) GetFloat() []float32 { - if x != nil { - return x.Float - } - return nil -} - -func (x *Data) GetString2() string { - if x != nil { - return x.String2 - } - return "" -} - -func (x *Data) GetFoo2() *Foo2 { - if x != nil { - return x.Foo2 - } - return nil -} - -func (x *Data) GetFloat2() []float32 { - if x != nil { - return x.Float2 - } - return nil -} - -type Foo2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Param1 string `protobuf:"bytes,1,opt,name=param1,proto3" json:"param1,omitempty"` -} - -func (x *Foo2) Reset() { - *x = Foo2{} - if protoimpl.UnsafeEnabled { - mi := &file_example_options_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Foo2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Foo2) ProtoMessage() {} - -func (x *Foo2) ProtoReflect() protoreflect.Message { - mi := &file_example_options_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 Foo2.ProtoReflect.Descriptor instead. -func (*Foo2) Descriptor() ([]byte, []int) { - return file_example_options_proto_rawDescGZIP(), []int{1} -} - -func (x *Foo2) GetParam1() string { - if x != nil { - return x.Param1 - } - return "" -} - -var File_example_options_proto protoreflect.FileDescriptor - -var file_example_options_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x70, 0x62, 0x2f, - 0x67, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x04, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, - 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x1c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x02, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x12, 0x1c, - 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, - 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x66, 0x6c, - 0x6f, 0x61, 0x74, 0x32, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x32, 0x90, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, - 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, - 0x1f, 0x02, 0x12, 0x1f, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, - 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x28, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x12, 0x21, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, - 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x31, 0x12, 0x08, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x28, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x32, 0x12, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x01, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x11, 0x49, - 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x33, - 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x27, - 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, - 0xe0, 0x1f, 0x00, 0x28, 0x01, 0x30, 0x01, 0x32, 0x91, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, - 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, - 0x1f, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x30, 0x01, 0x1a, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, - 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, - 0x67, 0x71, 0x6c, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_example_options_proto_rawDescOnce sync.Once - file_example_options_proto_rawDescData = file_example_options_proto_rawDesc -) - -func file_example_options_proto_rawDescGZIP() []byte { - file_example_options_proto_rawDescOnce.Do(func() { - file_example_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_example_options_proto_rawDescData) - }) - return file_example_options_proto_rawDescData -} - -var file_example_options_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_example_options_proto_goTypes = []interface{}{ - (*Data)(nil), // 0: pb.Data - (*Foo2)(nil), // 1: pb.Foo2 -} -var file_example_options_proto_depIdxs = []int32{ - 1, // 0: pb.Data.foo:type_name -> pb.Foo2 - 1, // 1: pb.Data.foo2:type_name -> pb.Foo2 - 0, // 2: pb.Service.Mutate1:input_type -> pb.Data - 0, // 3: pb.Service.Mutate2:input_type -> pb.Data - 0, // 4: pb.Service.Query1:input_type -> pb.Data - 0, // 5: pb.Service.Publish:input_type -> pb.Data - 0, // 6: pb.Service.Subscribe:input_type -> pb.Data - 0, // 7: pb.Service.PubSub1:input_type -> pb.Data - 0, // 8: pb.Service.InvalidSubscribe1:input_type -> pb.Data - 0, // 9: pb.Service.InvalidSubscribe2:input_type -> pb.Data - 0, // 10: pb.Service.InvalidSubscribe3:input_type -> pb.Data - 0, // 11: pb.Service.PubSub2:input_type -> pb.Data - 0, // 12: pb.Query.Query1:input_type -> pb.Data - 0, // 13: pb.Query.Query2:input_type -> pb.Data - 0, // 14: pb.Query.Mutate1:input_type -> pb.Data - 0, // 15: pb.Query.Subscribe:input_type -> pb.Data - 0, // 16: pb.Service.Mutate1:output_type -> pb.Data - 0, // 17: pb.Service.Mutate2:output_type -> pb.Data - 0, // 18: pb.Service.Query1:output_type -> pb.Data - 0, // 19: pb.Service.Publish:output_type -> pb.Data - 0, // 20: pb.Service.Subscribe:output_type -> pb.Data - 0, // 21: pb.Service.PubSub1:output_type -> pb.Data - 0, // 22: pb.Service.InvalidSubscribe1:output_type -> pb.Data - 0, // 23: pb.Service.InvalidSubscribe2:output_type -> pb.Data - 0, // 24: pb.Service.InvalidSubscribe3:output_type -> pb.Data - 0, // 25: pb.Service.PubSub2:output_type -> pb.Data - 0, // 26: pb.Query.Query1:output_type -> pb.Data - 0, // 27: pb.Query.Query2:output_type -> pb.Data - 0, // 28: pb.Query.Mutate1:output_type -> pb.Data - 0, // 29: pb.Query.Subscribe:output_type -> pb.Data - 16, // [16:30] is the sub-list for method output_type - 2, // [2:16] 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_example_options_proto_init() } -func file_example_options_proto_init() { - if File_example_options_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_example_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_example_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Foo2); 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_example_options_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_example_options_proto_goTypes, - DependencyIndexes: file_example_options_proto_depIdxs, - MessageInfos: file_example_options_proto_msgTypes, - }.Build() - File_example_options_proto = out.File - file_example_options_proto_rawDesc = nil - file_example_options_proto_goTypes = nil - file_example_options_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion7 // ServiceClient is the client API for Service service. // -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// 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 ServiceClient interface { Mutate1(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) Mutate2(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) @@ -615,6 +290,8 @@ func (x *servicePubSub2Client) Recv() (*Data, error) { } // ServiceServer is the server API for Service service. +// All implementations must embed UnimplementedServiceServer +// for forward compatibility type ServiceServer interface { Mutate1(context.Context, *Data) (*Data, error) Mutate2(context.Context, *Data) (*Data, error) @@ -626,44 +303,53 @@ type ServiceServer interface { InvalidSubscribe2(*Data, Service_InvalidSubscribe2Server) error InvalidSubscribe3(Service_InvalidSubscribe3Server) error PubSub2(Service_PubSub2Server) error + mustEmbedUnimplementedServiceServer() } -// UnimplementedServiceServer can be embedded to have forward compatible implementations. +// UnimplementedServiceServer must be embedded to have forward compatible implementations. type UnimplementedServiceServer struct { } -func (*UnimplementedServiceServer) Mutate1(context.Context, *Data) (*Data, error) { +func (UnimplementedServiceServer) Mutate1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Mutate1 not implemented") } -func (*UnimplementedServiceServer) Mutate2(context.Context, *Data) (*Data, error) { +func (UnimplementedServiceServer) Mutate2(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Mutate2 not implemented") } -func (*UnimplementedServiceServer) Query1(context.Context, *Data) (*Data, error) { +func (UnimplementedServiceServer) Query1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Query1 not implemented") } -func (*UnimplementedServiceServer) Publish(Service_PublishServer) error { +func (UnimplementedServiceServer) Publish(Service_PublishServer) error { return status.Errorf(codes.Unimplemented, "method Publish not implemented") } -func (*UnimplementedServiceServer) Subscribe(*Data, Service_SubscribeServer) error { +func (UnimplementedServiceServer) Subscribe(*Data, Service_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } -func (*UnimplementedServiceServer) PubSub1(Service_PubSub1Server) error { +func (UnimplementedServiceServer) PubSub1(Service_PubSub1Server) error { return status.Errorf(codes.Unimplemented, "method PubSub1 not implemented") } -func (*UnimplementedServiceServer) InvalidSubscribe1(Service_InvalidSubscribe1Server) error { +func (UnimplementedServiceServer) InvalidSubscribe1(Service_InvalidSubscribe1Server) error { return status.Errorf(codes.Unimplemented, "method InvalidSubscribe1 not implemented") } -func (*UnimplementedServiceServer) InvalidSubscribe2(*Data, Service_InvalidSubscribe2Server) error { +func (UnimplementedServiceServer) InvalidSubscribe2(*Data, Service_InvalidSubscribe2Server) error { return status.Errorf(codes.Unimplemented, "method InvalidSubscribe2 not implemented") } -func (*UnimplementedServiceServer) InvalidSubscribe3(Service_InvalidSubscribe3Server) error { +func (UnimplementedServiceServer) InvalidSubscribe3(Service_InvalidSubscribe3Server) error { return status.Errorf(codes.Unimplemented, "method InvalidSubscribe3 not implemented") } -func (*UnimplementedServiceServer) PubSub2(Service_PubSub2Server) error { +func (UnimplementedServiceServer) PubSub2(Service_PubSub2Server) error { return status.Errorf(codes.Unimplemented, "method PubSub2 not implemented") } +func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} -func RegisterServiceServer(s *grpc.Server, srv ServiceServer) { +// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceServer will +// result in compilation errors. +type UnsafeServiceServer interface { + mustEmbedUnimplementedServiceServer() +} + +func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { s.RegisterService(&_Service_serviceDesc, srv) } @@ -950,12 +636,12 @@ var _Service_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "example/options.proto", + Metadata: "pb/options.proto", } // QueryClient is the client API for Query service. // -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// 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 QueryClient interface { Query1(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) Query2(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) @@ -1031,31 +717,42 @@ func (x *querySubscribeClient) Recv() (*Data, error) { } // QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility type QueryServer interface { Query1(context.Context, *Data) (*Data, error) Query2(context.Context, *Data) (*Data, error) Mutate1(context.Context, *Data) (*Data, error) Subscribe(*Data, Query_SubscribeServer) error + mustEmbedUnimplementedQueryServer() } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. +// UnimplementedQueryServer must be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Query1(context.Context, *Data) (*Data, error) { +func (UnimplementedQueryServer) Query1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Query1 not implemented") } -func (*UnimplementedQueryServer) Query2(context.Context, *Data) (*Data, error) { +func (UnimplementedQueryServer) Query2(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Query2 not implemented") } -func (*UnimplementedQueryServer) Mutate1(context.Context, *Data) (*Data, error) { +func (UnimplementedQueryServer) Mutate1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Mutate1 not implemented") } -func (*UnimplementedQueryServer) Subscribe(*Data, Query_SubscribeServer) error { +func (UnimplementedQueryServer) Subscribe(*Data, Query_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} -func RegisterQueryServer(s *grpc.Server, srv QueryServer) { +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } @@ -1158,5 +855,5 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "example/options.proto", + Metadata: "pb/options.proto", } diff --git a/example/constructs.gqlgen.pb.go b/example/constructs.gqlgen.pb.go deleted file mode 100644 index 3d26062..0000000 --- a/example/constructs.gqlgen.pb.go +++ /dev/null @@ -1,484 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: example/constructs.proto - -package pb - -import ( - context "context" - encoding_json "encoding/json" - fmt "fmt" - github_com_danielvladco_go_proto_gql_pb "github.com/danielvladco/go-proto-gql/pb" - proto "github.com/golang/protobuf/proto" - _ "github.com/golang/protobuf/ptypes/any" - github_com_golang_protobuf_ptypes_any "github.com/golang/protobuf/ptypes/any" - _ "github.com/golang/protobuf/ptypes/empty" - github_com_golang_protobuf_ptypes_empty "github.com/golang/protobuf/ptypes/empty" - _ "github.com/golang/protobuf/ptypes/timestamp" - io "io" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type ConstructsGQLServer struct{ Service ConstructsServer } - -func (s *ConstructsGQLServer) ConstructsScalars(ctx context.Context, in *Scalars) (*Scalars, error) { - return s.Service.Scalars_(ctx, in) -} -func (s *ConstructsGQLServer) ConstructsRepeated(ctx context.Context, in *Repeated) (*Repeated, error) { - return s.Service.Repeated_(ctx, in) -} -func (s *ConstructsGQLServer) ConstructsMaps(ctx context.Context, in *Maps) (*Maps, error) { - return s.Service.Maps_(ctx, in) -} -func (s *ConstructsGQLServer) ConstructsAny(ctx context.Context, in *github_com_golang_protobuf_ptypes_any.Any) (*Any, error) { - return s.Service.Any_(ctx, in) -} -func (s *ConstructsGQLServer) ConstructsEmpty(ctx context.Context) (*bool, error) { - _, err := s.Service.Empty_(ctx, &github_com_golang_protobuf_ptypes_empty.Empty{}) - return nil, err -} -func (s *ConstructsGQLServer) ConstructsEmpty2(ctx context.Context) (*bool, error) { - _, err := s.Service.Empty2_(ctx, &EmptyRecursive{}) - return nil, err -} -func (s *ConstructsGQLServer) ConstructsEmpty3(ctx context.Context) (*bool, error) { - _, err := s.Service.Empty3_(ctx, &Empty3{}) - return nil, err -} -func (s *ConstructsGQLServer) ConstructsRef(ctx context.Context, in *Ref) (*Ref, error) { - return s.Service.Ref_(ctx, in) -} -func (s *ConstructsGQLServer) ConstructsOneof(ctx context.Context, in *Oneof) (*Oneof, error) { - return s.Service.Oneof_(ctx, in) -} -func (s *ConstructsGQLServer) ConstructsCallWithID(ctx context.Context) (*bool, error) { - _, err := s.Service.CallWithId(ctx, &Empty{}) - return nil, err -} - -func MarshalMaps_Int32Int32Entry(mp map[int32]int32) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Int32Int32Entry(v interface{}) (mp map[int32]int32, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[int32]int32", v) - } -} - -func MarshalMaps_Int64Int64Entry(mp map[int64]int64) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Int64Int64Entry(v interface{}) (mp map[int64]int64, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[int64]int64", v) - } -} - -func MarshalMaps_Uint32Uint32Entry(mp map[uint32]uint32) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Uint32Uint32Entry(v interface{}) (mp map[uint32]uint32, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[uint32]uint32", v) - } -} - -func MarshalMaps_Uint64Uint64Entry(mp map[uint64]uint64) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Uint64Uint64Entry(v interface{}) (mp map[uint64]uint64, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[uint64]uint64", v) - } -} - -func MarshalMaps_Sint32Sint32Entry(mp map[int32]int32) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Sint32Sint32Entry(v interface{}) (mp map[int32]int32, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[int32]int32", v) - } -} - -func MarshalMaps_Sint64Sint64Entry(mp map[int64]int64) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Sint64Sint64Entry(v interface{}) (mp map[int64]int64, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[int64]int64", v) - } -} - -func MarshalMaps_Fixed32Fixed32Entry(mp map[uint32]uint32) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Fixed32Fixed32Entry(v interface{}) (mp map[uint32]uint32, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[uint32]uint32", v) - } -} - -func MarshalMaps_Fixed64Fixed64Entry(mp map[uint64]uint64) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Fixed64Fixed64Entry(v interface{}) (mp map[uint64]uint64, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[uint64]uint64", v) - } -} - -func MarshalMaps_Sfixed32Sfixed32Entry(mp map[int32]int32) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Sfixed32Sfixed32Entry(v interface{}) (mp map[int32]int32, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[int32]int32", v) - } -} - -func MarshalMaps_Sfixed64Sfixed64Entry(mp map[int64]int64) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_Sfixed64Sfixed64Entry(v interface{}) (mp map[int64]int64, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[int64]int64", v) - } -} - -func MarshalMaps_BoolBoolEntry(mp map[bool]bool) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_BoolBoolEntry(v interface{}) (mp map[bool]bool, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[bool]bool", v) - } -} - -func MarshalMaps_StringStringEntry(mp map[string]string) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_StringStringEntry(v interface{}) (mp map[string]string, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[string]string", v) - } -} - -func MarshalMaps_StringBytesEntry(mp map[string][]byte) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_StringBytesEntry(v interface{}) (mp map[string][]byte, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[string][]byte", v) - } -} - -func MarshalMaps_StringFloatEntry(mp map[string]float32) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_StringFloatEntry(v interface{}) (mp map[string]float32, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[string]float32", v) - } -} - -func MarshalMaps_StringDoubleEntry(mp map[string]float64) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_StringDoubleEntry(v interface{}) (mp map[string]float64, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[string]float64", v) - } -} - -func MarshalMaps_StringFooEntry(mp map[string]*Foo) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_StringFooEntry(v interface{}) (mp map[string]*Foo, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[string]*Foo", v) - } -} - -func MarshalMaps_StringBarEntry(mp map[string]Bar) github_com_danielvladco_go_proto_gql_pb.Marshaler { - return github_com_danielvladco_go_proto_gql_pb.WriterFunc(func(w io.Writer) { - err := encoding_json.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func UnmarshalMaps_StringBarEntry(v interface{}) (mp map[string]Bar, err error) { - switch vv := v.(type) { - case []byte: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - case encoding_json.RawMessage: - err = encoding_json.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not map[string]Bar", v) - } -} - -type IsOneof_Oneof1 interface { - isOneof_Oneof1() -} -type IsOneof_Oneof2 interface { - isOneof_Oneof2() -} -type IsOneof_Oneof3 interface { - isOneof_Oneof3() -} - -func (c *Bar) UnmarshalGQL(v interface{}) error { - code, ok := v.(string) - if ok { - *c = Bar(Bar_value[code]) - return nil - } - return fmt.Errorf("cannot unmarshal Bar enum") -} - -func (c Bar) MarshalGQL(w io.Writer) { - fmt.Fprintf(w, "%q", c.String()) -} - -func (c *Ref_Foo_En) UnmarshalGQL(v interface{}) error { - code, ok := v.(string) - if ok { - *c = Ref_Foo_En(Ref_Foo_En_value[code]) - return nil - } - return fmt.Errorf("cannot unmarshal Ref_Foo_En enum") -} - -func (c Ref_Foo_En) MarshalGQL(w io.Writer) { - fmt.Fprintf(w, "%q", c.String()) -} - -func (c *Ref_Foo_Bar_En) UnmarshalGQL(v interface{}) error { - code, ok := v.(string) - if ok { - *c = Ref_Foo_Bar_En(Ref_Foo_Bar_En_value[code]) - return nil - } - return fmt.Errorf("cannot unmarshal Ref_Foo_Bar_En enum") -} - -func (c Ref_Foo_Bar_En) MarshalGQL(w io.Writer) { - fmt.Fprintf(w, "%q", c.String()) -} diff --git a/example/constructs.gqlgen.pb.yml b/example/constructs.gqlgen.pb.yml deleted file mode 100644 index a33a902..0000000 --- a/example/constructs.gqlgen.pb.yml +++ /dev/null @@ -1,202 +0,0 @@ -schema: -- constructs.pb.graphqls -exec: - filename: generated.gen.go -model: - filename: models.gen.go -resolver: - filename: resolver.go - type: resolver -models: - Any: - model: - - github.com/danielvladco/go-proto-gql/pb.Any - Bar: - model: - - github.com/danielvladco/go-proto-gql/example.Bar - Baz: - model: - - github.com/danielvladco/go-proto-gql/example.Baz - BazInput: - model: - - github.com/danielvladco/go-proto-gql/example.Baz - Bytes: - model: - - github.com/danielvladco/go-proto-gql/pb.Bytes - Float32: - model: - - github.com/danielvladco/go-proto-gql/pb.Float32 - Foo: - model: - - github.com/danielvladco/go-proto-gql/example.Foo - Foo_Foo2: - model: - - github.com/danielvladco/go-proto-gql/example.Foo_Foo2 - Foo_Foo2Input: - model: - - github.com/danielvladco/go-proto-gql/example.Foo_Foo2 - FooInput: - model: - - github.com/danielvladco/go-proto-gql/example.Foo - Int32: - model: - - github.com/danielvladco/go-proto-gql/pb.Int32 - Int64: - model: - - github.com/danielvladco/go-proto-gql/pb.Int64 - IsOneof_Oneof1: - model: - - github.com/danielvladco/go-proto-gql/example.IsOneof_Oneof1 - IsOneof_Oneof2: - model: - - github.com/danielvladco/go-proto-gql/example.IsOneof_Oneof2 - IsOneof_Oneof3: - model: - - github.com/danielvladco/go-proto-gql/example.IsOneof_Oneof3 - Maps: - model: - - github.com/danielvladco/go-proto-gql/example.Maps - Maps_BoolBoolEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_BoolBoolEntry - Maps_Fixed32Fixed32Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Fixed32Fixed32Entry - Maps_Fixed64Fixed64Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Fixed64Fixed64Entry - Maps_Int32Int32Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Int32Int32Entry - Maps_Int64Int64Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Int64Int64Entry - Maps_Sfixed32Sfixed32Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Sfixed32Sfixed32Entry - Maps_Sfixed64Sfixed64Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Sfixed64Sfixed64Entry - Maps_Sint32Sint32Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Sint32Sint32Entry - Maps_Sint64Sint64Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Sint64Sint64Entry - Maps_StringBarEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_StringBarEntry - Maps_StringBytesEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_StringBytesEntry - Maps_StringDoubleEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_StringDoubleEntry - Maps_StringFloatEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_StringFloatEntry - Maps_StringFooEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_StringFooEntry - Maps_StringStringEntry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_StringStringEntry - Maps_Uint32Uint32Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Uint32Uint32Entry - Maps_Uint64Uint64Entry: - model: - - github.com/danielvladco/go-proto-gql/example.Maps_Uint64Uint64Entry - MapsInput: - model: - - github.com/danielvladco/go-proto-gql/example.Maps - Oneof: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof - Oneof_Param2: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof_Param2 - Oneof_Param3: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof_Param3 - Oneof_Param4: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof_Param4 - Oneof_Param5: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof_Param5 - Oneof_Param6: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof_Param6 - OneofInput: - model: - - github.com/danielvladco/go-proto-gql/example.Oneof - Ref: - model: - - github.com/danielvladco/go-proto-gql/example.Ref - Ref_Bar: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Bar - Ref_BarInput: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Bar - Ref_Foo: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo - Ref_Foo_Bar: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo_Bar - Ref_Foo_Bar_En: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo_Bar_En - Ref_Foo_BarInput: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo_Bar - Ref_Foo_Baz_Gz: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo_Baz_Gz - Ref_Foo_Baz_GzInput: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo_Baz_Gz - Ref_Foo_En: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo_En - Ref_FooInput: - model: - - github.com/danielvladco/go-proto-gql/example.Ref_Foo - RefInput: - model: - - github.com/danielvladco/go-proto-gql/example.Ref - Repeated: - model: - - github.com/danielvladco/go-proto-gql/example.Repeated - RepeatedInput: - model: - - github.com/danielvladco/go-proto-gql/example.Repeated - Scalars: - model: - - github.com/danielvladco/go-proto-gql/example.Scalars - ScalarsInput: - model: - - github.com/danielvladco/go-proto-gql/example.Scalars - Uint32: - model: - - github.com/danielvladco/go-proto-gql/pb.Uint32 - Uint64: - model: - - github.com/danielvladco/go-proto-gql/pb.Uint64 - google_protobuf_Timestamp: - model: - - github.com/golang/protobuf/ptypes/timestamp.Timestamp - google_protobuf_TimestampInput: - model: - - github.com/golang/protobuf/ptypes/timestamp.Timestamp - pb_Any: - model: - - github.com/danielvladco/go-proto-gql/example.Any - pb_Timestamp: - model: - - github.com/danielvladco/go-proto-gql/example.Timestamp - pb_TimestampInput: - model: - - github.com/danielvladco/go-proto-gql/example.Timestamp diff --git a/example/constructs.pb.graphqls b/example/constructs.pb.graphqls deleted file mode 100644 index eca6924..0000000 --- a/example/constructs.pb.graphqls +++ /dev/null @@ -1,379 +0,0 @@ -# Code generated by protoc-gen-gogql. DO NOT EDIT -# source: example/constructs.proto - -directive @oneof(name: String) on INPUT_FIELD_DEFINITION - -directive @Constructs(name: String) on FIELD_DEFINITION - -scalar Any - -scalar Bytes - -scalar Float32 - -scalar Int32 - -scalar Int64 - -scalar Uint32 - -scalar Uint64 - -# map with key: 'Boolean' and value: 'Boolean' -scalar Maps_BoolBoolEntry - -# map with key: 'Uint32' and value: 'Uint32' -scalar Maps_Fixed32Fixed32Entry - -# map with key: 'Uint64' and value: 'Uint64' -scalar Maps_Fixed64Fixed64Entry - -# map with key: 'Int32' and value: 'Int32' -scalar Maps_Int32Int32Entry - -# map with key: 'Int64' and value: 'Int64' -scalar Maps_Int64Int64Entry - -# map with key: 'Int32' and value: 'Int32' -scalar Maps_Sfixed32Sfixed32Entry - -# map with key: 'Int64' and value: 'Int64' -scalar Maps_Sfixed64Sfixed64Entry - -# map with key: 'Int32' and value: 'Int32' -scalar Maps_Sint32Sint32Entry - -# map with key: 'Int64' and value: 'Int64' -scalar Maps_Sint64Sint64Entry - -# map with key: 'String' and value: 'Bar' -scalar Maps_StringBarEntry - -# map with key: 'String' and value: 'Bytes' -scalar Maps_StringBytesEntry - -# map with key: 'String' and value: 'Float' -scalar Maps_StringDoubleEntry - -# map with key: 'String' and value: 'Float32' -scalar Maps_StringFloatEntry - -# map with key: 'String' and value: 'Foo' -scalar Maps_StringFooEntry - -# map with key: 'String' and value: 'String' -scalar Maps_StringStringEntry - -# map with key: 'Uint32' and value: 'Uint32' -scalar Maps_Uint32Uint32Entry - -# map with key: 'Uint64' and value: 'Uint64' -scalar Maps_Uint64Uint64Entry - -input google_protobuf_TimestampInput { - seconds: Int64 - nanos: Int32 -} - -input BazInput { - param1: String -} - -input FooInput { - param1: String - param2: String -} - -input Foo_Foo2Input { - param1: String -} - -input MapsInput { - int32Int32: Maps_Int32Int32Entry - int64Int64: Maps_Int64Int64Entry - uint32Uint32: Maps_Uint32Uint32Entry - uint64Uint64: Maps_Uint64Uint64Entry - sint32Sint32: Maps_Sint32Sint32Entry - sint64Sint64: Maps_Sint64Sint64Entry - fixed32Fixed32: Maps_Fixed32Fixed32Entry - fixed64Fixed64: Maps_Fixed64Fixed64Entry - sfixed32Sfixed32: Maps_Sfixed32Sfixed32Entry - sfixed64Sfixed64: Maps_Sfixed64Sfixed64Entry - boolBool: Maps_BoolBoolEntry - stringString: Maps_StringStringEntry - stringBytes: Maps_StringBytesEntry - stringFloat: Maps_StringFloatEntry - stringDouble: Maps_StringDoubleEntry - stringFoo: Maps_StringFooEntry - stringBar: Maps_StringBarEntry -} - -input OneofInput { - param1: String - param2: String @oneof(name: "IsOneof_Oneof1") - param3: String @oneof(name: "IsOneof_Oneof1") - param4: String @oneof(name: "IsOneof_Oneof2") - param5: String @oneof(name: "IsOneof_Oneof2") - param6: String @oneof(name: "IsOneof_Oneof3") -} - -input RefInput { - localTime2: pb_TimestampInput - external: google_protobuf_TimestampInput - localTime: pb_TimestampInput - file: BazInput - fileMsg: FooInput - fileEnum: Bar - local: Ref_FooInput - foreign: Foo_Foo2Input - en1: Ref_Foo_En - en2: Ref_Foo_Bar_En - gz: Ref_Foo_Baz_GzInput -} - -input Ref_BarInput { - param1: String -} - -input Ref_FooInput { - bar1: Ref_Foo_BarInput - localTime2: pb_TimestampInput - externalTime1: google_protobuf_TimestampInput - bar2: Ref_BarInput - en1: Ref_Foo_En - en2: Ref_Foo_Bar_En -} - -input Ref_Foo_BarInput { - param1: String -} - -input Ref_Foo_Baz_GzInput { - param1: String -} - -input RepeatedInput { - double: [Float!] - float: [Float32!] - int32: [Int32!] - int64: [Int64!] - uint32: [Uint32!] - uint64: [Uint64!] - sint32: [Int32!] - sint64: [Int64!] - fixed32: [Uint32!] - fixed64: [Uint64!] - sfixed32: [Int32!] - sfixed64: [Int64!] - bool: [Boolean!] - string: [String!] - bytes: [Bytes!] - foo: [FooInput!] - bar: [Bar!] -} - -input ScalarsInput { - double: Float - float: Float32 - int32: Int32 - int64: Int64 - uint32: Uint32 - uint64: Uint64 - sint32: Int32 - sint64: Int64 - fixed32: Uint32 - fixed64: Uint64 - sfixed32: Int32 - sfixed64: Int64 - bool: Boolean - string: String - bytes: Bytes -} - -input pb_TimestampInput { - time: String -} - -type google_protobuf_Timestamp { - seconds: Int64 - nanos: Int32 -} - -type pb_Any { - param1: String -} - -type Baz { - param1: String -} - -type Foo { - param1: String - param2: String -} - -type Foo_Foo2 { - param1: String -} - -type Maps { - int32Int32: Maps_Int32Int32Entry - int64Int64: Maps_Int64Int64Entry - uint32Uint32: Maps_Uint32Uint32Entry - uint64Uint64: Maps_Uint64Uint64Entry - sint32Sint32: Maps_Sint32Sint32Entry - sint64Sint64: Maps_Sint64Sint64Entry - fixed32Fixed32: Maps_Fixed32Fixed32Entry - fixed64Fixed64: Maps_Fixed64Fixed64Entry - sfixed32Sfixed32: Maps_Sfixed32Sfixed32Entry - sfixed64Sfixed64: Maps_Sfixed64Sfixed64Entry - boolBool: Maps_BoolBoolEntry - stringString: Maps_StringStringEntry - stringBytes: Maps_StringBytesEntry - stringFloat: Maps_StringFloatEntry - stringDouble: Maps_StringDoubleEntry - stringFoo: Maps_StringFooEntry - stringBar: Maps_StringBarEntry -} - -type Oneof { - param1: String - oneof1: IsOneof_Oneof1 - oneof2: IsOneof_Oneof2 - oneof3: IsOneof_Oneof3 -} - -type Oneof_Param2 { - param2: String -} - -type Oneof_Param3 { - param3: String -} - -type Oneof_Param4 { - param4: String -} - -type Oneof_Param5 { - param5: String -} - -type Oneof_Param6 { - param6: String -} - -type Ref { - localTime2: pb_Timestamp - external: google_protobuf_Timestamp - localTime: pb_Timestamp - file: Baz - fileMsg: Foo - fileEnum: Bar - local: Ref_Foo - foreign: Foo_Foo2 - en1: Ref_Foo_En - en2: Ref_Foo_Bar_En - gz: Ref_Foo_Baz_Gz -} - -type Ref_Bar { - param1: String -} - -type Ref_Foo { - bar1: Ref_Foo_Bar - localTime2: pb_Timestamp - externalTime1: google_protobuf_Timestamp - bar2: Ref_Bar - en1: Ref_Foo_En - en2: Ref_Foo_Bar_En -} - -type Ref_Foo_Bar { - param1: String -} - -type Ref_Foo_Baz_Gz { - param1: String -} - -type Repeated { - double: [Float!] - float: [Float32!] - int32: [Int32!] - int64: [Int64!] - uint32: [Uint32!] - uint64: [Uint64!] - sint32: [Int32!] - sint64: [Int64!] - fixed32: [Uint32!] - fixed64: [Uint64!] - sfixed32: [Int32!] - sfixed64: [Int64!] - bool: [Boolean!] - string: [String!] - bytes: [Bytes!] - foo: [Foo!] - bar: [Bar!] -} - -type Scalars { - double: Float - float: Float32 - int32: Int32 - int64: Int64 - uint32: Uint32 - uint64: Uint64 - sint32: Int32 - sint64: Int64 - fixed32: Uint32 - fixed64: Uint64 - sfixed32: Int32 - sfixed64: Int64 - bool: Boolean - string: String - bytes: Bytes -} - -type pb_Timestamp { - time: String -} - -union IsOneof_Oneof1 = Oneof_Param2 | Oneof_Param3 - -union IsOneof_Oneof2 = Oneof_Param4 | Oneof_Param5 - -union IsOneof_Oneof3 = Oneof_Param6 - -enum Bar { - BAR1 - BAR2 - BAR3 -} - -enum Ref_Foo_Bar_En { - A0 - A1 -} - -enum Ref_Foo_En { - A0 - A1 -} - -type Mutation { - constructsScalars_(in: ScalarsInput): Scalars @Constructs - constructsRepeated_(in: RepeatedInput): Repeated @Constructs - constructsMaps_(in: MapsInput): Maps @Constructs - constructsAny_(in: Any): pb_Any @Constructs - constructsEmpty_: Boolean @Constructs - constructsEmpty2_: Boolean @Constructs - constructsEmpty3_: Boolean @Constructs - constructsRef_(in: RefInput): Ref @Constructs - constructsOneof_(in: OneofInput): Oneof @Constructs - constructsCallWithId: Boolean @Constructs -} - -type Query { dummy: Boolean } - diff --git a/example/gateway/Makefile b/example/gateway/Makefile new file mode 100644 index 0000000..dbcd2f8 --- /dev/null +++ b/example/gateway/Makefile @@ -0,0 +1,15 @@ +.PHONY: generate start stop + +start: generate + docker-compose up + +stop: + docker-compose down + +generate: optionsserver/pb/options_grpc.pb.go constructserver/pb/constructs_grpc.pb.go + +%_grpc.pb.go: %.proto %.pb.go + protoc --go-grpc_out=paths=source_relative:. -I . -I ../../ $*.proto + +%.pb.go: %.proto + protoc --go_out=paths=source_relative:. -I . -I ../../ $*.proto diff --git a/example/gateway/config.json b/example/gateway/config.json new file mode 100644 index 0000000..f4c3698 --- /dev/null +++ b/example/gateway/config.json @@ -0,0 +1,6 @@ +{ + "endpoints": [ + "constructserver:8081", + "optionsserver:8082" + ] +} \ No newline at end of file diff --git a/reflect/examples/constructserver/main.go b/example/gateway/constructserver/main.go similarity index 88% rename from reflect/examples/constructserver/main.go rename to example/gateway/constructserver/main.go index 3300722..7d519a0 100644 --- a/reflect/examples/constructserver/main.go +++ b/example/gateway/constructserver/main.go @@ -5,11 +5,12 @@ import ( "log" "net" - "github.com/danielvladco/go-proto-gql/reflect/examples/constructserver/pb" - "github.com/golang/protobuf/ptypes/any" - "github.com/golang/protobuf/ptypes/empty" "google.golang.org/grpc" "google.golang.org/grpc/reflection" + any "google.golang.org/protobuf/types/known/anypb" + empty "google.golang.org/protobuf/types/known/emptypb" + + "github.com/danielvladco/go-proto-gql/example/gateway/constructserver/pb" ) func main() { @@ -25,6 +26,7 @@ func main() { } type service struct { + pb.UnimplementedConstructsServer } func (s *service) Anyway_(ctx context.Context, a *pb.Any) (*pb.AnyInput, error) { diff --git a/reflect/examples/constructserver/pb/constructs.pb.go b/example/gateway/constructserver/pb/constructs.pb.go similarity index 52% rename from reflect/examples/constructserver/pb/constructs.pb.go rename to example/gateway/constructserver/pb/constructs.pb.go index 8ae8d13..9bc679b 100644 --- a/reflect/examples/constructserver/pb/constructs.pb.go +++ b/example/gateway/constructserver/pb/constructs.pb.go @@ -1,21 +1,16 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.21.0 -// protoc v3.7.1 -// source: constructs.proto +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: constructserver/pb/constructs.proto package pb import ( - context "context" proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" empty "github.com/golang/protobuf/ptypes/empty" timestamp "github.com/golang/protobuf/ptypes/timestamp" - _ "github.com/golang/protobuf/ptypes/wrappers" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -66,11 +61,11 @@ func (x Bar) String() string { } func (Bar) Descriptor() protoreflect.EnumDescriptor { - return file_constructs_proto_enumTypes[0].Descriptor() + return file_constructserver_pb_constructs_proto_enumTypes[0].Descriptor() } func (Bar) Type() protoreflect.EnumType { - return &file_constructs_proto_enumTypes[0] + return &file_constructserver_pb_constructs_proto_enumTypes[0] } func (x Bar) Number() protoreflect.EnumNumber { @@ -79,7 +74,7 @@ func (x Bar) Number() protoreflect.EnumNumber { // Deprecated: Use Bar.Descriptor instead. func (Bar) EnumDescriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{0} } type Ref_Foo_En int32 @@ -112,11 +107,11 @@ func (x Ref_Foo_En) String() string { } func (Ref_Foo_En) Descriptor() protoreflect.EnumDescriptor { - return file_constructs_proto_enumTypes[1].Descriptor() + return file_constructserver_pb_constructs_proto_enumTypes[1].Descriptor() } func (Ref_Foo_En) Type() protoreflect.EnumType { - return &file_constructs_proto_enumTypes[1] + return &file_constructserver_pb_constructs_proto_enumTypes[1] } func (x Ref_Foo_En) Number() protoreflect.EnumNumber { @@ -125,7 +120,7 @@ func (x Ref_Foo_En) Number() protoreflect.EnumNumber { // Deprecated: Use Ref_Foo_En.Descriptor instead. func (Ref_Foo_En) EnumDescriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 1, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 1, 0} } type Ref_Foo_Bar_En int32 @@ -158,11 +153,11 @@ func (x Ref_Foo_Bar_En) String() string { } func (Ref_Foo_Bar_En) Descriptor() protoreflect.EnumDescriptor { - return file_constructs_proto_enumTypes[2].Descriptor() + return file_constructserver_pb_constructs_proto_enumTypes[2].Descriptor() } func (Ref_Foo_Bar_En) Type() protoreflect.EnumType { - return &file_constructs_proto_enumTypes[2] + return &file_constructserver_pb_constructs_proto_enumTypes[2] } func (x Ref_Foo_Bar_En) Number() protoreflect.EnumNumber { @@ -171,7 +166,7 @@ func (x Ref_Foo_Bar_En) Number() protoreflect.EnumNumber { // Deprecated: Use Ref_Foo_Bar_En.Descriptor instead. func (Ref_Foo_Bar_En) EnumDescriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 1, 1, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 1, 1, 0} } type AnyInput struct { @@ -185,7 +180,7 @@ type AnyInput struct { func (x *AnyInput) Reset() { *x = AnyInput{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[0] + mi := &file_constructserver_pb_constructs_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -198,7 +193,7 @@ func (x *AnyInput) String() string { func (*AnyInput) ProtoMessage() {} func (x *AnyInput) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[0] + mi := &file_constructserver_pb_constructs_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -211,7 +206,7 @@ func (x *AnyInput) ProtoReflect() protoreflect.Message { // Deprecated: Use AnyInput.ProtoReflect.Descriptor instead. func (*AnyInput) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{0} } func (x *AnyInput) GetAny() *any.Any { @@ -232,7 +227,7 @@ type Empty3 struct { func (x *Empty3) Reset() { *x = Empty3{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[1] + mi := &file_constructserver_pb_constructs_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -245,7 +240,7 @@ func (x *Empty3) String() string { func (*Empty3) ProtoMessage() {} func (x *Empty3) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[1] + mi := &file_constructserver_pb_constructs_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -258,7 +253,7 @@ func (x *Empty3) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty3.ProtoReflect.Descriptor instead. func (*Empty3) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{1} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{1} } func (x *Empty3) GetI() *Empty3_Int { @@ -280,7 +275,7 @@ type Foo struct { func (x *Foo) Reset() { *x = Foo{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[2] + mi := &file_constructserver_pb_constructs_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -293,7 +288,7 @@ func (x *Foo) String() string { func (*Foo) ProtoMessage() {} func (x *Foo) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[2] + mi := &file_constructserver_pb_constructs_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -306,7 +301,7 @@ func (x *Foo) ProtoReflect() protoreflect.Message { // Deprecated: Use Foo.ProtoReflect.Descriptor instead. func (*Foo) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{2} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{2} } func (x *Foo) GetParam1() string { @@ -334,7 +329,7 @@ type Baz struct { func (x *Baz) Reset() { *x = Baz{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[3] + mi := &file_constructserver_pb_constructs_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -347,7 +342,7 @@ func (x *Baz) String() string { func (*Baz) ProtoMessage() {} func (x *Baz) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[3] + mi := &file_constructserver_pb_constructs_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -360,7 +355,7 @@ func (x *Baz) ProtoReflect() protoreflect.Message { // Deprecated: Use Baz.ProtoReflect.Descriptor instead. func (*Baz) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{3} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{3} } func (x *Baz) GetParam1() string { @@ -396,7 +391,7 @@ type Scalars struct { func (x *Scalars) Reset() { *x = Scalars{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[4] + mi := &file_constructserver_pb_constructs_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -409,7 +404,7 @@ func (x *Scalars) String() string { func (*Scalars) ProtoMessage() {} func (x *Scalars) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[4] + mi := &file_constructserver_pb_constructs_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -422,7 +417,7 @@ func (x *Scalars) ProtoReflect() protoreflect.Message { // Deprecated: Use Scalars.ProtoReflect.Descriptor instead. func (*Scalars) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{4} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{4} } func (x *Scalars) GetDouble() float64 { @@ -564,7 +559,7 @@ type Repeated struct { func (x *Repeated) Reset() { *x = Repeated{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[5] + mi := &file_constructserver_pb_constructs_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -577,7 +572,7 @@ func (x *Repeated) String() string { func (*Repeated) ProtoMessage() {} func (x *Repeated) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[5] + mi := &file_constructserver_pb_constructs_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -590,7 +585,7 @@ func (x *Repeated) ProtoReflect() protoreflect.Message { // Deprecated: Use Repeated.ProtoReflect.Descriptor instead. func (*Repeated) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{5} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{5} } func (x *Repeated) GetDouble() []float64 { @@ -739,7 +734,7 @@ type Maps struct { func (x *Maps) Reset() { *x = Maps{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[6] + mi := &file_constructserver_pb_constructs_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -752,7 +747,7 @@ func (x *Maps) String() string { func (*Maps) ProtoMessage() {} func (x *Maps) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[6] + mi := &file_constructserver_pb_constructs_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -765,7 +760,7 @@ func (x *Maps) ProtoReflect() protoreflect.Message { // Deprecated: Use Maps.ProtoReflect.Descriptor instead. func (*Maps) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{6} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{6} } func (x *Maps) GetInt32Int32() map[int32]int32 { @@ -898,7 +893,7 @@ type Any struct { func (x *Any) Reset() { *x = Any{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[7] + mi := &file_constructserver_pb_constructs_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -911,7 +906,7 @@ func (x *Any) String() string { func (*Any) ProtoMessage() {} func (x *Any) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[7] + mi := &file_constructserver_pb_constructs_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -924,7 +919,7 @@ func (x *Any) ProtoReflect() protoreflect.Message { // Deprecated: Use Any.ProtoReflect.Descriptor instead. func (*Any) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{7} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{7} } func (x *Any) GetAny() *any.Any { @@ -943,7 +938,7 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[8] + mi := &file_constructserver_pb_constructs_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -956,7 +951,7 @@ func (x *Empty) String() string { func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[8] + mi := &file_constructserver_pb_constructs_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -969,7 +964,7 @@ func (x *Empty) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{8} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{8} } type EmptyRecursive struct { @@ -984,7 +979,7 @@ type EmptyRecursive struct { func (x *EmptyRecursive) Reset() { *x = EmptyRecursive{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[9] + mi := &file_constructserver_pb_constructs_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -997,7 +992,7 @@ func (x *EmptyRecursive) String() string { func (*EmptyRecursive) ProtoMessage() {} func (x *EmptyRecursive) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[9] + mi := &file_constructserver_pb_constructs_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1010,7 +1005,7 @@ func (x *EmptyRecursive) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyRecursive.ProtoReflect.Descriptor instead. func (*EmptyRecursive) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{9} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{9} } func (x *EmptyRecursive) GetEmpty() *EmptyRecursive { @@ -1031,7 +1026,7 @@ type EmptyNested struct { func (x *EmptyNested) Reset() { *x = EmptyNested{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[10] + mi := &file_constructserver_pb_constructs_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1044,7 +1039,7 @@ func (x *EmptyNested) String() string { func (*EmptyNested) ProtoMessage() {} func (x *EmptyNested) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[10] + mi := &file_constructserver_pb_constructs_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1057,7 +1052,7 @@ func (x *EmptyNested) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyNested.ProtoReflect.Descriptor instead. func (*EmptyNested) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{10} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{10} } func (x *EmptyNested) GetNested1() *EmptyNested_EmptyNested1 { @@ -1078,7 +1073,7 @@ type Timestamp struct { func (x *Timestamp) Reset() { *x = Timestamp{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[11] + mi := &file_constructserver_pb_constructs_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1091,7 +1086,7 @@ func (x *Timestamp) String() string { func (*Timestamp) ProtoMessage() {} func (x *Timestamp) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[11] + mi := &file_constructserver_pb_constructs_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1104,7 +1099,7 @@ func (x *Timestamp) ProtoReflect() protoreflect.Message { // Deprecated: Use Timestamp.ProtoReflect.Descriptor instead. func (*Timestamp) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{11} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{11} } func (x *Timestamp) GetTime() string { @@ -1135,7 +1130,7 @@ type Ref struct { func (x *Ref) Reset() { *x = Ref{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[12] + mi := &file_constructserver_pb_constructs_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1148,7 +1143,7 @@ func (x *Ref) String() string { func (*Ref) ProtoMessage() {} func (x *Ref) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[12] + mi := &file_constructserver_pb_constructs_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1161,7 +1156,7 @@ func (x *Ref) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref.ProtoReflect.Descriptor instead. func (*Ref) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12} } func (x *Ref) GetLocalTime2() *Timestamp { @@ -1263,7 +1258,7 @@ type Oneof struct { func (x *Oneof) Reset() { *x = Oneof{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[13] + mi := &file_constructserver_pb_constructs_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1276,7 +1271,7 @@ func (x *Oneof) String() string { func (*Oneof) ProtoMessage() {} func (x *Oneof) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[13] + mi := &file_constructserver_pb_constructs_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1289,7 +1284,7 @@ func (x *Oneof) ProtoReflect() protoreflect.Message { // Deprecated: Use Oneof.ProtoReflect.Descriptor instead. func (*Oneof) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{13} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{13} } func (x *Oneof) GetParam1() string { @@ -1408,7 +1403,7 @@ type Empty3_Int struct { func (x *Empty3_Int) Reset() { *x = Empty3_Int{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[14] + mi := &file_constructserver_pb_constructs_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1421,7 +1416,7 @@ func (x *Empty3_Int) String() string { func (*Empty3_Int) ProtoMessage() {} func (x *Empty3_Int) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[14] + mi := &file_constructserver_pb_constructs_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1434,7 +1429,7 @@ func (x *Empty3_Int) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty3_Int.ProtoReflect.Descriptor instead. func (*Empty3_Int) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{1, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{1, 0} } func (x *Empty3_Int) GetE() *Empty3 { @@ -1455,7 +1450,7 @@ type Foo_Foo2 struct { func (x *Foo_Foo2) Reset() { *x = Foo_Foo2{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[15] + mi := &file_constructserver_pb_constructs_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1468,7 +1463,7 @@ func (x *Foo_Foo2) String() string { func (*Foo_Foo2) ProtoMessage() {} func (x *Foo_Foo2) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[15] + mi := &file_constructserver_pb_constructs_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1481,7 +1476,7 @@ func (x *Foo_Foo2) ProtoReflect() protoreflect.Message { // Deprecated: Use Foo_Foo2.ProtoReflect.Descriptor instead. func (*Foo_Foo2) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{2, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{2, 0} } func (x *Foo_Foo2) GetParam1() string { @@ -1502,7 +1497,7 @@ type EmptyNested_EmptyNested1 struct { func (x *EmptyNested_EmptyNested1) Reset() { *x = EmptyNested_EmptyNested1{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[33] + mi := &file_constructserver_pb_constructs_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1515,7 +1510,7 @@ func (x *EmptyNested_EmptyNested1) String() string { func (*EmptyNested_EmptyNested1) ProtoMessage() {} func (x *EmptyNested_EmptyNested1) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[33] + mi := &file_constructserver_pb_constructs_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1528,7 +1523,7 @@ func (x *EmptyNested_EmptyNested1) ProtoReflect() protoreflect.Message { // Deprecated: Use EmptyNested_EmptyNested1.ProtoReflect.Descriptor instead. func (*EmptyNested_EmptyNested1) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{10, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{10, 0} } func (x *EmptyNested_EmptyNested1) GetNested2() *EmptyNested_EmptyNested1_EmptyNested2 { @@ -1547,7 +1542,7 @@ type EmptyNested_EmptyNested1_EmptyNested2 struct { func (x *EmptyNested_EmptyNested1_EmptyNested2) Reset() { *x = EmptyNested_EmptyNested1_EmptyNested2{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[34] + mi := &file_constructserver_pb_constructs_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1560,7 +1555,7 @@ func (x *EmptyNested_EmptyNested1_EmptyNested2) String() string { func (*EmptyNested_EmptyNested1_EmptyNested2) ProtoMessage() {} func (x *EmptyNested_EmptyNested1_EmptyNested2) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[34] + mi := &file_constructserver_pb_constructs_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1573,7 +1568,7 @@ func (x *EmptyNested_EmptyNested1_EmptyNested2) ProtoReflect() protoreflect.Mess // Deprecated: Use EmptyNested_EmptyNested1_EmptyNested2.ProtoReflect.Descriptor instead. func (*EmptyNested_EmptyNested1_EmptyNested2) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{10, 0, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{10, 0, 0} } // google.protobuf.Empty empty = 10; // must disappear as part of is empty validation @@ -1588,7 +1583,7 @@ type Ref_Bar struct { func (x *Ref_Bar) Reset() { *x = Ref_Bar{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[35] + mi := &file_constructserver_pb_constructs_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1601,7 +1596,7 @@ func (x *Ref_Bar) String() string { func (*Ref_Bar) ProtoMessage() {} func (x *Ref_Bar) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[35] + mi := &file_constructserver_pb_constructs_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1614,7 +1609,7 @@ func (x *Ref_Bar) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Bar.ProtoReflect.Descriptor instead. func (*Ref_Bar) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 0} } func (x *Ref_Bar) GetParam1() string { @@ -1640,7 +1635,7 @@ type Ref_Foo struct { func (x *Ref_Foo) Reset() { *x = Ref_Foo{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[36] + mi := &file_constructserver_pb_constructs_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1653,7 +1648,7 @@ func (x *Ref_Foo) String() string { func (*Ref_Foo) ProtoMessage() {} func (x *Ref_Foo) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[36] + mi := &file_constructserver_pb_constructs_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1666,7 +1661,7 @@ func (x *Ref_Foo) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo.ProtoReflect.Descriptor instead. func (*Ref_Foo) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 1} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 1} } func (x *Ref_Foo) GetBar1() *Ref_Foo_Bar { @@ -1720,7 +1715,7 @@ type Ref_Foo_Baz struct { func (x *Ref_Foo_Baz) Reset() { *x = Ref_Foo_Baz{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[37] + mi := &file_constructserver_pb_constructs_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1733,7 +1728,7 @@ func (x *Ref_Foo_Baz) String() string { func (*Ref_Foo_Baz) ProtoMessage() {} func (x *Ref_Foo_Baz) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[37] + mi := &file_constructserver_pb_constructs_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1746,7 +1741,7 @@ func (x *Ref_Foo_Baz) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo_Baz.ProtoReflect.Descriptor instead. func (*Ref_Foo_Baz) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 1, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 1, 0} } type Ref_Foo_Bar struct { @@ -1760,7 +1755,7 @@ type Ref_Foo_Bar struct { func (x *Ref_Foo_Bar) Reset() { *x = Ref_Foo_Bar{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[38] + mi := &file_constructserver_pb_constructs_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1773,7 +1768,7 @@ func (x *Ref_Foo_Bar) String() string { func (*Ref_Foo_Bar) ProtoMessage() {} func (x *Ref_Foo_Bar) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[38] + mi := &file_constructserver_pb_constructs_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1786,7 +1781,7 @@ func (x *Ref_Foo_Bar) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo_Bar.ProtoReflect.Descriptor instead. func (*Ref_Foo_Bar) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 1, 1} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 1, 1} } func (x *Ref_Foo_Bar) GetParam1() string { @@ -1807,7 +1802,7 @@ type Ref_Foo_Baz_Gz struct { func (x *Ref_Foo_Baz_Gz) Reset() { *x = Ref_Foo_Baz_Gz{} if protoimpl.UnsafeEnabled { - mi := &file_constructs_proto_msgTypes[39] + mi := &file_constructserver_pb_constructs_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1820,7 +1815,7 @@ func (x *Ref_Foo_Baz_Gz) String() string { func (*Ref_Foo_Baz_Gz) ProtoMessage() {} func (x *Ref_Foo_Baz_Gz) ProtoReflect() protoreflect.Message { - mi := &file_constructs_proto_msgTypes[39] + mi := &file_constructserver_pb_constructs_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1833,7 +1828,7 @@ func (x *Ref_Foo_Baz_Gz) ProtoReflect() protoreflect.Message { // Deprecated: Use Ref_Foo_Baz_Gz.ProtoReflect.Descriptor instead. func (*Ref_Foo_Baz_Gz) Descriptor() ([]byte, []int) { - return file_constructs_proto_rawDescGZIP(), []int{12, 1, 0, 0} + return file_constructserver_pb_constructs_proto_rawDescGZIP(), []int{12, 1, 0, 0} } func (x *Ref_Foo_Baz_Gz) GetParam1() string { @@ -1843,361 +1838,360 @@ func (x *Ref_Foo_Baz_Gz) GetParam1() string { return "" } -var File_constructs_proto protoreflect.FileDescriptor - -var file_constructs_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 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, 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, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x32, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x26, 0x0a, 0x03, 0x61, - 0x6e, 0x79, 0x18, 0x01, 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, 0x03, - 0x61, 0x6e, 0x79, 0x22, 0x47, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x12, 0x1c, 0x0a, - 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x69, 0x1a, 0x1f, 0x0a, 0x03, 0x49, - 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x01, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x52, 0x01, 0x65, 0x22, 0x55, 0x0a, 0x03, - 0x46, 0x6f, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x32, 0x1a, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x31, 0x22, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x31, 0x22, 0x8e, 0x03, 0x0a, 0x07, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, - 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x08, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x65, - 0x6e, 0x75, 0x6d, 0x22, 0xa8, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, - 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, - 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, - 0x0a, 0x20, 0x03, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x1a, - 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0f, - 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x10, 0x52, 0x08, 0x73, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, - 0x20, 0x03, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, - 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x03, - 0x66, 0x6f, 0x6f, 0x12, 0x19, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x03, 0x62, 0x61, 0x72, 0x22, 0xaa, - 0x11, 0x0a, 0x04, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, - 0x33, 0x32, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, - 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, - 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, - 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, - 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, - 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, - 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, - 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, - 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, - 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, - 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, - 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x4b, 0x0a, 0x11, - 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, - 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x33, 0x0a, 0x09, 0x62, 0x6f, 0x6f, - 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x3f, - 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, - 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, - 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, - 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x10, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x11, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0a, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x6f, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x46, 0x6f, 0x6f, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, - 0x61, 0x72, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, - 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x1a, 0x3d, 0x0a, 0x0f, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 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, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, - 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, - 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, +var File_constructserver_pb_constructs_proto protoreflect.FileDescriptor + +var file_constructserver_pb_constructs_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 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, 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, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x26, + 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x01, 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, 0x03, 0x61, 0x6e, 0x79, 0x22, 0x47, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, + 0x12, 0x1c, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x69, 0x1a, 0x1f, + 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x01, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x52, 0x01, 0x65, 0x22, + 0x55, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x1a, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x8e, 0x03, 0x0a, 0x07, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, + 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0f, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x08, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x65, 0x6e, 0x75, + 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, + 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, 0xa8, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x70, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, + 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, + 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, + 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x75, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, 0x52, 0x06, 0x73, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, + 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, 0x52, 0x07, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0f, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, + 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x10, 0x52, + 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, + 0x6c, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x08, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x03, 0x66, + 0x6f, 0x6f, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, + 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, 0x19, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x11, 0x20, + 0x03, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x03, 0x62, 0x61, + 0x72, 0x22, 0xaa, 0x11, 0x0a, 0x04, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x5f, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, + 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, + 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, + 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x75, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, + 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x73, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, + 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x73, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, + 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x45, 0x0a, 0x0f, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, + 0x36, 0x34, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, + 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, + 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, 0x73, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, + 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, + 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x33, 0x0a, 0x09, + 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, + 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, + 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, + 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x79, 0x74, + 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, + 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, + 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x3f, + 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, + 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, + 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x6f, 0x18, 0x0d, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x5f, 0x62, 0x61, 0x72, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, + 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x1a, + 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 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, 0x1a, 0x3d, + 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, - 0x11, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, + 0x11, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x12, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, - 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, + 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, + 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x07, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, - 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, - 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x28, 0x12, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, 0x78, 0x65, + 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, - 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, - 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2d, 0x0a, 0x03, 0x41, - 0x6e, 0x79, 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x01, 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, 0x03, 0x61, 0x6e, 0x79, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x3a, 0x0a, 0x0e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, - 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0xaa, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, - 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x52, 0x07, - 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x1a, 0x63, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x12, 0x43, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x32, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x1a, 0x0e, 0x0a, 0x0c, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x22, 0x1f, 0x0a, 0x09, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xd1, 0x06, - 0x0a, 0x03, 0x52, 0x65, 0x66, 0x12, 0x2e, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x2c, 0x0a, - 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, - 0x61, 0x7a, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, - 0x46, 0x6f, 0x6f, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x09, - 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, - 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, - 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x12, 0x20, 0x0a, - 0x03, 0x65, 0x6e, 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, - 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, - 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, - 0x52, 0x03, 0x65, 0x6e, 0x32, 0x12, 0x22, 0x0a, 0x02, 0x67, 0x7a, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, - 0x61, 0x7a, 0x2e, 0x47, 0x7a, 0x52, 0x02, 0x67, 0x7a, 0x1a, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x72, + 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, + 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x10, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, + 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, + 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 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, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, + 0x42, 0x61, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2d, + 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x01, 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, 0x03, 0x61, 0x6e, 0x79, 0x22, 0x07, 0x0a, + 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3a, 0x0a, 0x0e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x52, 0x05, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0xaa, 0x01, 0x0a, 0x0b, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, + 0x31, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x1a, 0x63, 0x0a, 0x0c, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x12, 0x43, 0x0a, 0x07, 0x6e, 0x65, + 0x73, 0x74, 0x65, 0x64, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, + 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x1a, + 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x22, + 0x1f, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x22, 0xd1, 0x06, 0x0a, 0x03, 0x52, 0x65, 0x66, 0x12, 0x2e, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x12, 0x2c, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, + 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, + 0x62, 0x2e, 0x42, 0x61, 0x7a, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, + 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x12, + 0x24, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x08, 0x66, 0x69, 0x6c, + 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x21, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, + 0x6f, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, + 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x6f, 0x6f, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, + 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, + 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, + 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x32, 0x12, 0x22, 0x0a, 0x02, 0x67, 0x7a, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, + 0x6f, 0x2e, 0x42, 0x61, 0x7a, 0x2e, 0x47, 0x7a, 0x52, 0x02, 0x67, 0x7a, 0x1a, 0x1d, 0x0a, 0x03, + 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, 0xf6, 0x02, 0x0a, 0x03, + 0x46, 0x6f, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, + 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, 0x31, 0x12, 0x2e, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x6f, + 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x31, 0x12, 0x1f, 0x0a, 0x04, 0x62, + 0x61, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x66, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, 0x32, 0x12, 0x20, 0x0a, 0x03, + 0x65, 0x6e, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, 0x24, + 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, 0x52, + 0x03, 0x65, 0x6e, 0x32, 0x1a, 0x23, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x1a, 0x1c, 0x0a, 0x02, 0x47, + 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, 0x33, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, 0xf6, 0x02, 0x0a, 0x03, 0x46, 0x6f, 0x6f, - 0x12, 0x23, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, - 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x52, - 0x04, 0x62, 0x61, 0x72, 0x31, 0x12, 0x2e, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x32, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x54, 0x69, 0x6d, 0x65, 0x32, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x31, 0x12, 0x1f, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x32, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, - 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, 0x32, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, - 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, - 0x6e, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, - 0x32, 0x1a, 0x23, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x1a, 0x1c, 0x0a, 0x02, 0x47, 0x7a, 0x12, 0x16, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x14, 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, + 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, 0x01, 0x22, 0x14, + 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, + 0x41, 0x31, 0x10, 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x1a, 0x33, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x14, 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, - 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, 0x01, 0x22, 0x14, 0x0a, 0x02, 0x45, - 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, - 0x01, 0x22, 0xbf, 0x01, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x31, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x18, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x34, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x35, 0x12, 0x18, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x36, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x31, 0x42, - 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x32, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, - 0x6f, 0x66, 0x33, 0x2a, 0x23, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, - 0x52, 0x31, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x32, 0x10, 0x01, 0x12, 0x08, - 0x0a, 0x04, 0x42, 0x41, 0x52, 0x33, 0x10, 0x02, 0x32, 0xac, 0x03, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, - 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x08, 0x53, 0x63, 0x61, 0x6c, 0x61, - 0x72, 0x73, 0x5f, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, - 0x1a, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x27, 0x0a, - 0x09, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x4d, 0x61, 0x70, 0x73, 0x5f, 0x12, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, - 0x61, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x41, 0x6e, 0x79, 0x5f, 0x12, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x12, 0x20, 0x0a, 0x07, 0x41, 0x6e, 0x79, 0x77, 0x61, - 0x79, 0x5f, 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x0c, 0x2e, 0x70, 0x62, - 0x2e, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x5f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, - 0x5f, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, - 0x72, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, - 0x5f, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x1a, 0x0a, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x12, 0x18, 0x0a, 0x04, 0x52, 0x65, 0x66, - 0x5f, 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x1a, 0x07, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x12, 0x09, 0x2e, - 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, - 0x65, 0x6f, 0x66, 0x12, 0x22, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x49, - 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, - 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, - 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, - 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, - 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, + 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x33, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x34, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x35, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x35, 0x12, 0x18, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x36, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, + 0x66, 0x31, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x32, 0x42, 0x08, 0x0a, 0x06, + 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x33, 0x2a, 0x23, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x08, 0x0a, + 0x04, 0x42, 0x41, 0x52, 0x31, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x32, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x33, 0x10, 0x02, 0x32, 0xac, 0x03, 0x0a, 0x0a, + 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x08, 0x53, 0x63, + 0x61, 0x6c, 0x61, 0x72, 0x73, 0x5f, 0x12, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, + 0x61, 0x72, 0x73, 0x1a, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, + 0x12, 0x27, 0x0a, 0x09, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x12, 0x0c, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x1a, 0x0c, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x4d, 0x61, 0x70, + 0x73, 0x5f, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x1a, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x32, 0x0a, 0x04, 0x41, 0x6e, 0x79, 0x5f, 0x12, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x12, 0x20, 0x0a, 0x07, 0x41, 0x6e, + 0x79, 0x77, 0x61, 0x79, 0x5f, 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x0c, + 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2b, 0x0a, 0x06, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x32, 0x5f, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, + 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x33, 0x5f, 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, + 0x1a, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x12, 0x18, 0x0a, 0x04, + 0x52, 0x65, 0x66, 0x5f, 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x1a, 0x07, 0x2e, + 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, + 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x1a, 0x09, 0x2e, 0x70, 0x62, + 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x22, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x57, 0x69, + 0x74, 0x68, 0x49, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, + 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, + 0x71, 0x6c, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_constructs_proto_rawDescOnce sync.Once - file_constructs_proto_rawDescData = file_constructs_proto_rawDesc + file_constructserver_pb_constructs_proto_rawDescOnce sync.Once + file_constructserver_pb_constructs_proto_rawDescData = file_constructserver_pb_constructs_proto_rawDesc ) -func file_constructs_proto_rawDescGZIP() []byte { - file_constructs_proto_rawDescOnce.Do(func() { - file_constructs_proto_rawDescData = protoimpl.X.CompressGZIP(file_constructs_proto_rawDescData) +func file_constructserver_pb_constructs_proto_rawDescGZIP() []byte { + file_constructserver_pb_constructs_proto_rawDescOnce.Do(func() { + file_constructserver_pb_constructs_proto_rawDescData = protoimpl.X.CompressGZIP(file_constructserver_pb_constructs_proto_rawDescData) }) - return file_constructs_proto_rawDescData + return file_constructserver_pb_constructs_proto_rawDescData } -var file_constructs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_constructs_proto_msgTypes = make([]protoimpl.MessageInfo, 40) -var file_constructs_proto_goTypes = []interface{}{ +var file_constructserver_pb_constructs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_constructserver_pb_constructs_proto_msgTypes = make([]protoimpl.MessageInfo, 40) +var file_constructserver_pb_constructs_proto_goTypes = []interface{}{ (Bar)(0), // 0: pb.Bar (Ref_Foo_En)(0), // 1: pb.Ref.Foo.En (Ref_Foo_Bar_En)(0), // 2: pb.Ref.Foo.Bar.En @@ -2245,7 +2239,7 @@ var file_constructs_proto_goTypes = []interface{}{ (*timestamp.Timestamp)(nil), // 44: google.protobuf.Timestamp (*empty.Empty)(nil), // 45: google.protobuf.Empty } -var file_constructs_proto_depIdxs = []int32{ +var file_constructserver_pb_constructs_proto_depIdxs = []int32{ 43, // 0: pb.AnyInput.any:type_name -> google.protobuf.Any 17, // 1: pb.Empty3.i:type_name -> pb.Empty3.Int 0, // 2: pb.Scalars.enum:type_name -> pb.Bar @@ -2321,13 +2315,13 @@ var file_constructs_proto_depIdxs = []int32{ 0, // [0:46] is the sub-list for field type_name } -func init() { file_constructs_proto_init() } -func file_constructs_proto_init() { - if File_constructs_proto != nil { +func init() { file_constructserver_pb_constructs_proto_init() } +func file_constructserver_pb_constructs_proto_init() { + if File_constructserver_pb_constructs_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_constructs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AnyInput); i { case 0: return &v.state @@ -2339,7 +2333,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty3); i { case 0: return &v.state @@ -2351,7 +2345,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Foo); i { case 0: return &v.state @@ -2363,7 +2357,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Baz); i { case 0: return &v.state @@ -2375,7 +2369,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Scalars); i { case 0: return &v.state @@ -2387,7 +2381,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Repeated); i { case 0: return &v.state @@ -2399,7 +2393,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Maps); i { case 0: return &v.state @@ -2411,7 +2405,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Any); i { case 0: return &v.state @@ -2423,7 +2417,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty); i { case 0: return &v.state @@ -2435,7 +2429,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyRecursive); i { case 0: return &v.state @@ -2447,7 +2441,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyNested); i { case 0: return &v.state @@ -2459,7 +2453,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Timestamp); i { case 0: return &v.state @@ -2471,7 +2465,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref); i { case 0: return &v.state @@ -2483,7 +2477,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Oneof); i { case 0: return &v.state @@ -2495,7 +2489,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Empty3_Int); i { case 0: return &v.state @@ -2507,7 +2501,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Foo_Foo2); i { case 0: return &v.state @@ -2519,7 +2513,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyNested_EmptyNested1); i { case 0: return &v.state @@ -2531,7 +2525,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyNested_EmptyNested1_EmptyNested2); i { case 0: return &v.state @@ -2543,7 +2537,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Bar); i { case 0: return &v.state @@ -2555,7 +2549,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo); i { case 0: return &v.state @@ -2567,7 +2561,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo_Baz); i { case 0: return &v.state @@ -2579,7 +2573,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo_Bar); i { case 0: return &v.state @@ -2591,7 +2585,7 @@ func file_constructs_proto_init() { return nil } } - file_constructs_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_constructserver_pb_constructs_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Ref_Foo_Baz_Gz); i { case 0: return &v.state @@ -2604,7 +2598,7 @@ func file_constructs_proto_init() { } } } - file_constructs_proto_msgTypes[13].OneofWrappers = []interface{}{ + file_constructserver_pb_constructs_proto_msgTypes[13].OneofWrappers = []interface{}{ (*Oneof_Param2)(nil), (*Oneof_Param3)(nil), (*Oneof_Param4)(nil), @@ -2615,459 +2609,19 @@ func file_constructs_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_constructs_proto_rawDesc, + RawDescriptor: file_constructserver_pb_constructs_proto_rawDesc, NumEnums: 3, NumMessages: 40, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_constructs_proto_goTypes, - DependencyIndexes: file_constructs_proto_depIdxs, - EnumInfos: file_constructs_proto_enumTypes, - MessageInfos: file_constructs_proto_msgTypes, + GoTypes: file_constructserver_pb_constructs_proto_goTypes, + DependencyIndexes: file_constructserver_pb_constructs_proto_depIdxs, + EnumInfos: file_constructserver_pb_constructs_proto_enumTypes, + MessageInfos: file_constructserver_pb_constructs_proto_msgTypes, }.Build() - File_constructs_proto = out.File - file_constructs_proto_rawDesc = nil - file_constructs_proto_goTypes = nil - file_constructs_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ConstructsClient is the client API for Constructs service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ConstructsClient interface { - Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) - Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) - Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) - Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*any.Any, error) - Anyway_(ctx context.Context, in *Any, opts ...grpc.CallOption) (*AnyInput, error) - Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) - Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) - Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) - Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) - Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) - CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) -} - -type constructsClient struct { - cc grpc.ClientConnInterface -} - -func NewConstructsClient(cc grpc.ClientConnInterface) ConstructsClient { - return &constructsClient{cc} -} - -func (c *constructsClient) Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) { - out := new(Scalars) - err := c.cc.Invoke(ctx, "/pb.Constructs/Scalars_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) { - out := new(Repeated) - err := c.cc.Invoke(ctx, "/pb.Constructs/Repeated_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) { - out := new(Maps) - err := c.cc.Invoke(ctx, "/pb.Constructs/Maps_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*any.Any, error) { - out := new(any.Any) - err := c.cc.Invoke(ctx, "/pb.Constructs/Any_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Anyway_(ctx context.Context, in *Any, opts ...grpc.CallOption) (*AnyInput, error) { - out := new(AnyInput) - err := c.cc.Invoke(ctx, "/pb.Constructs/Anyway_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/pb.Constructs/Empty_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) { - out := new(EmptyNested) - err := c.cc.Invoke(ctx, "/pb.Constructs/Empty2_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) { - out := new(Empty3) - err := c.cc.Invoke(ctx, "/pb.Constructs/Empty3_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) { - out := new(Ref) - err := c.cc.Invoke(ctx, "/pb.Constructs/Ref_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) { - out := new(Oneof) - err := c.cc.Invoke(ctx, "/pb.Constructs/Oneof_", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *constructsClient) CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - out := new(Empty) - err := c.cc.Invoke(ctx, "/pb.Constructs/CallWithId", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConstructsServer is the server API for Constructs service. -type ConstructsServer interface { - Scalars_(context.Context, *Scalars) (*Scalars, error) - Repeated_(context.Context, *Repeated) (*Repeated, error) - Maps_(context.Context, *Maps) (*Maps, error) - Any_(context.Context, *any.Any) (*any.Any, error) - Anyway_(context.Context, *Any) (*AnyInput, error) - Empty_(context.Context, *empty.Empty) (*Empty, error) - Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) - Empty3_(context.Context, *Empty3) (*Empty3, error) - Ref_(context.Context, *Ref) (*Ref, error) - Oneof_(context.Context, *Oneof) (*Oneof, error) - CallWithId(context.Context, *Empty) (*Empty, error) -} - -// UnimplementedConstructsServer can be embedded to have forward compatible implementations. -type UnimplementedConstructsServer struct { -} - -func (*UnimplementedConstructsServer) Scalars_(context.Context, *Scalars) (*Scalars, error) { - return nil, status.Errorf(codes.Unimplemented, "method Scalars_ not implemented") -} -func (*UnimplementedConstructsServer) Repeated_(context.Context, *Repeated) (*Repeated, error) { - return nil, status.Errorf(codes.Unimplemented, "method Repeated_ not implemented") -} -func (*UnimplementedConstructsServer) Maps_(context.Context, *Maps) (*Maps, error) { - return nil, status.Errorf(codes.Unimplemented, "method Maps_ not implemented") -} -func (*UnimplementedConstructsServer) Any_(context.Context, *any.Any) (*any.Any, error) { - return nil, status.Errorf(codes.Unimplemented, "method Any_ not implemented") -} -func (*UnimplementedConstructsServer) Anyway_(context.Context, *Any) (*AnyInput, error) { - return nil, status.Errorf(codes.Unimplemented, "method Anyway_ not implemented") -} -func (*UnimplementedConstructsServer) Empty_(context.Context, *empty.Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty_ not implemented") -} -func (*UnimplementedConstructsServer) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty2_ not implemented") -} -func (*UnimplementedConstructsServer) Empty3_(context.Context, *Empty3) (*Empty3, error) { - return nil, status.Errorf(codes.Unimplemented, "method Empty3_ not implemented") -} -func (*UnimplementedConstructsServer) Ref_(context.Context, *Ref) (*Ref, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ref_ not implemented") -} -func (*UnimplementedConstructsServer) Oneof_(context.Context, *Oneof) (*Oneof, error) { - return nil, status.Errorf(codes.Unimplemented, "method Oneof_ not implemented") -} -func (*UnimplementedConstructsServer) CallWithId(context.Context, *Empty) (*Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallWithId not implemented") -} - -func RegisterConstructsServer(s *grpc.Server, srv ConstructsServer) { - s.RegisterService(&_Constructs_serviceDesc, srv) -} - -func _Constructs_Scalars__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Scalars) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Scalars_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Scalars_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Scalars_(ctx, req.(*Scalars)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Repeated__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Repeated) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Repeated_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Repeated_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Repeated_(ctx, req.(*Repeated)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Maps__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Maps) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Maps_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Maps_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Maps_(ctx, req.(*Maps)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(any.Any) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Any_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Any_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Any_(ctx, req.(*any.Any)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Anyway__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Any) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Anyway_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Anyway_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Anyway_(ctx, req.(*Any)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Empty__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Empty_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Empty_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty_(ctx, req.(*empty.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Empty2__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EmptyRecursive) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Empty2_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Empty2_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty2_(ctx, req.(*EmptyRecursive)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Empty3__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty3) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Empty3_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Empty3_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Empty3_(ctx, req.(*Empty3)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Ref__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Ref) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Ref_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Ref_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Ref_(ctx, req.(*Ref)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_Oneof__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Oneof) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).Oneof_(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/Oneof_", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).Oneof_(ctx, req.(*Oneof)) - } - return interceptor(ctx, in, info, handler) -} - -func _Constructs_CallWithId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConstructsServer).CallWithId(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/pb.Constructs/CallWithId", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConstructsServer).CallWithId(ctx, req.(*Empty)) - } - return interceptor(ctx, in, info, handler) -} - -var _Constructs_serviceDesc = grpc.ServiceDesc{ - ServiceName: "pb.Constructs", - HandlerType: (*ConstructsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Scalars_", - Handler: _Constructs_Scalars__Handler, - }, - { - MethodName: "Repeated_", - Handler: _Constructs_Repeated__Handler, - }, - { - MethodName: "Maps_", - Handler: _Constructs_Maps__Handler, - }, - { - MethodName: "Any_", - Handler: _Constructs_Any__Handler, - }, - { - MethodName: "Anyway_", - Handler: _Constructs_Anyway__Handler, - }, - { - MethodName: "Empty_", - Handler: _Constructs_Empty__Handler, - }, - { - MethodName: "Empty2_", - Handler: _Constructs_Empty2__Handler, - }, - { - MethodName: "Empty3_", - Handler: _Constructs_Empty3__Handler, - }, - { - MethodName: "Ref_", - Handler: _Constructs_Ref__Handler, - }, - { - MethodName: "Oneof_", - Handler: _Constructs_Oneof__Handler, - }, - { - MethodName: "CallWithId", - Handler: _Constructs_CallWithId_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "constructs.proto", + File_constructserver_pb_constructs_proto = out.File + file_constructserver_pb_constructs_proto_rawDesc = nil + file_constructserver_pb_constructs_proto_goTypes = nil + file_constructserver_pb_constructs_proto_depIdxs = nil } diff --git a/reflect/examples/constructserver/pb/constructs.proto b/example/gateway/constructserver/pb/constructs.proto similarity index 99% rename from reflect/examples/constructserver/pb/constructs.proto rename to example/gateway/constructserver/pb/constructs.proto index a99fbee..bbe782a 100644 --- a/reflect/examples/constructserver/pb/constructs.proto +++ b/example/gateway/constructserver/pb/constructs.proto @@ -3,7 +3,6 @@ package pb; option go_package = "github.com/danielvladco/go-proto-gql/reflect/constructserver;pb"; import "google/protobuf/any.proto"; -import "google/protobuf/wrappers.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; diff --git a/example/gateway/constructserver/pb/constructs_grpc.pb.go b/example/gateway/constructserver/pb/constructs_grpc.pb.go new file mode 100644 index 0000000..c0204e8 --- /dev/null +++ b/example/gateway/constructserver/pb/constructs_grpc.pb.go @@ -0,0 +1,459 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package pb + +import ( + context "context" + any "github.com/golang/protobuf/ptypes/any" + empty "github.com/golang/protobuf/ptypes/empty" + 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. +const _ = grpc.SupportPackageIsVersion7 + +// ConstructsClient is the client API for Constructs 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 ConstructsClient interface { + Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) + Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) + Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) + Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*any.Any, error) + Anyway_(ctx context.Context, in *Any, opts ...grpc.CallOption) (*AnyInput, error) + Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) + Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) + Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) + Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) + Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) + CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) +} + +type constructsClient struct { + cc grpc.ClientConnInterface +} + +func NewConstructsClient(cc grpc.ClientConnInterface) ConstructsClient { + return &constructsClient{cc} +} + +func (c *constructsClient) Scalars_(ctx context.Context, in *Scalars, opts ...grpc.CallOption) (*Scalars, error) { + out := new(Scalars) + err := c.cc.Invoke(ctx, "/pb.Constructs/Scalars_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Repeated_(ctx context.Context, in *Repeated, opts ...grpc.CallOption) (*Repeated, error) { + out := new(Repeated) + err := c.cc.Invoke(ctx, "/pb.Constructs/Repeated_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Maps_(ctx context.Context, in *Maps, opts ...grpc.CallOption) (*Maps, error) { + out := new(Maps) + err := c.cc.Invoke(ctx, "/pb.Constructs/Maps_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Any_(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*any.Any, error) { + out := new(any.Any) + err := c.cc.Invoke(ctx, "/pb.Constructs/Any_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Anyway_(ctx context.Context, in *Any, opts ...grpc.CallOption) (*AnyInput, error) { + out := new(AnyInput) + err := c.cc.Invoke(ctx, "/pb.Constructs/Anyway_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Empty_(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/pb.Constructs/Empty_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Empty2_(ctx context.Context, in *EmptyRecursive, opts ...grpc.CallOption) (*EmptyNested, error) { + out := new(EmptyNested) + err := c.cc.Invoke(ctx, "/pb.Constructs/Empty2_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Empty3_(ctx context.Context, in *Empty3, opts ...grpc.CallOption) (*Empty3, error) { + out := new(Empty3) + err := c.cc.Invoke(ctx, "/pb.Constructs/Empty3_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Ref_(ctx context.Context, in *Ref, opts ...grpc.CallOption) (*Ref, error) { + out := new(Ref) + err := c.cc.Invoke(ctx, "/pb.Constructs/Ref_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) Oneof_(ctx context.Context, in *Oneof, opts ...grpc.CallOption) (*Oneof, error) { + out := new(Oneof) + err := c.cc.Invoke(ctx, "/pb.Constructs/Oneof_", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *constructsClient) CallWithId(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, "/pb.Constructs/CallWithId", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ConstructsServer is the server API for Constructs service. +// All implementations must embed UnimplementedConstructsServer +// for forward compatibility +type ConstructsServer interface { + Scalars_(context.Context, *Scalars) (*Scalars, error) + Repeated_(context.Context, *Repeated) (*Repeated, error) + Maps_(context.Context, *Maps) (*Maps, error) + Any_(context.Context, *any.Any) (*any.Any, error) + Anyway_(context.Context, *Any) (*AnyInput, error) + Empty_(context.Context, *empty.Empty) (*Empty, error) + Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) + Empty3_(context.Context, *Empty3) (*Empty3, error) + Ref_(context.Context, *Ref) (*Ref, error) + Oneof_(context.Context, *Oneof) (*Oneof, error) + CallWithId(context.Context, *Empty) (*Empty, error) + mustEmbedUnimplementedConstructsServer() +} + +// UnimplementedConstructsServer must be embedded to have forward compatible implementations. +type UnimplementedConstructsServer struct { +} + +func (UnimplementedConstructsServer) Scalars_(context.Context, *Scalars) (*Scalars, error) { + return nil, status.Errorf(codes.Unimplemented, "method Scalars_ not implemented") +} +func (UnimplementedConstructsServer) Repeated_(context.Context, *Repeated) (*Repeated, error) { + return nil, status.Errorf(codes.Unimplemented, "method Repeated_ not implemented") +} +func (UnimplementedConstructsServer) Maps_(context.Context, *Maps) (*Maps, error) { + return nil, status.Errorf(codes.Unimplemented, "method Maps_ not implemented") +} +func (UnimplementedConstructsServer) Any_(context.Context, *any.Any) (*any.Any, error) { + return nil, status.Errorf(codes.Unimplemented, "method Any_ not implemented") +} +func (UnimplementedConstructsServer) Anyway_(context.Context, *Any) (*AnyInput, error) { + return nil, status.Errorf(codes.Unimplemented, "method Anyway_ not implemented") +} +func (UnimplementedConstructsServer) Empty_(context.Context, *empty.Empty) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method Empty_ not implemented") +} +func (UnimplementedConstructsServer) Empty2_(context.Context, *EmptyRecursive) (*EmptyNested, error) { + return nil, status.Errorf(codes.Unimplemented, "method Empty2_ not implemented") +} +func (UnimplementedConstructsServer) Empty3_(context.Context, *Empty3) (*Empty3, error) { + return nil, status.Errorf(codes.Unimplemented, "method Empty3_ not implemented") +} +func (UnimplementedConstructsServer) Ref_(context.Context, *Ref) (*Ref, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ref_ not implemented") +} +func (UnimplementedConstructsServer) Oneof_(context.Context, *Oneof) (*Oneof, error) { + return nil, status.Errorf(codes.Unimplemented, "method Oneof_ not implemented") +} +func (UnimplementedConstructsServer) CallWithId(context.Context, *Empty) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CallWithId not implemented") +} +func (UnimplementedConstructsServer) mustEmbedUnimplementedConstructsServer() {} + +// UnsafeConstructsServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ConstructsServer will +// result in compilation errors. +type UnsafeConstructsServer interface { + mustEmbedUnimplementedConstructsServer() +} + +func RegisterConstructsServer(s grpc.ServiceRegistrar, srv ConstructsServer) { + s.RegisterService(&_Constructs_serviceDesc, srv) +} + +func _Constructs_Scalars__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Scalars) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Scalars_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Scalars_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Scalars_(ctx, req.(*Scalars)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Repeated__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Repeated) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Repeated_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Repeated_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Repeated_(ctx, req.(*Repeated)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Maps__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Maps) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Maps_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Maps_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Maps_(ctx, req.(*Maps)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Any__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(any.Any) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Any_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Any_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Any_(ctx, req.(*any.Any)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Anyway__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Any) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Anyway_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Anyway_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Anyway_(ctx, req.(*Any)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Empty__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Empty_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Empty_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Empty_(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Empty2__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRecursive) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Empty2_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Empty2_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Empty2_(ctx, req.(*EmptyRecursive)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Empty3__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty3) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Empty3_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Empty3_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Empty3_(ctx, req.(*Empty3)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Ref__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Ref) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Ref_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Ref_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Ref_(ctx, req.(*Ref)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_Oneof__Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Oneof) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).Oneof_(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/Oneof_", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).Oneof_(ctx, req.(*Oneof)) + } + return interceptor(ctx, in, info, handler) +} + +func _Constructs_CallWithId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConstructsServer).CallWithId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.Constructs/CallWithId", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConstructsServer).CallWithId(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Constructs_serviceDesc = grpc.ServiceDesc{ + ServiceName: "pb.Constructs", + HandlerType: (*ConstructsServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Scalars_", + Handler: _Constructs_Scalars__Handler, + }, + { + MethodName: "Repeated_", + Handler: _Constructs_Repeated__Handler, + }, + { + MethodName: "Maps_", + Handler: _Constructs_Maps__Handler, + }, + { + MethodName: "Any_", + Handler: _Constructs_Any__Handler, + }, + { + MethodName: "Anyway_", + Handler: _Constructs_Anyway__Handler, + }, + { + MethodName: "Empty_", + Handler: _Constructs_Empty__Handler, + }, + { + MethodName: "Empty2_", + Handler: _Constructs_Empty2__Handler, + }, + { + MethodName: "Empty3_", + Handler: _Constructs_Empty3__Handler, + }, + { + MethodName: "Ref_", + Handler: _Constructs_Ref__Handler, + }, + { + MethodName: "Oneof_", + Handler: _Constructs_Oneof__Handler, + }, + { + MethodName: "CallWithId", + Handler: _Constructs_CallWithId_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "constructserver/pb/constructs.proto", +} diff --git a/example/gateway/docker-compose.yaml b/example/gateway/docker-compose.yaml new file mode 100644 index 0000000..02054ac --- /dev/null +++ b/example/gateway/docker-compose.yaml @@ -0,0 +1,22 @@ +version: "3.7" + +x-base_go_service: &base_go_service + image: golang + volumes: + - ${PWD}/../../:/go/src/ws + working_dir: /go/src/ws + +services: + constructserver: + <<: *base_go_service + command: go run ./example/gateway/constructserver/main.go + + optionsserver: + <<: *base_go_service + command: go run ./example/gateway/optionsserver/main.go + + gateway: + <<: *base_go_service + command: go run ./cmd/gateway/main.go --cfg ./example/gateway/config.json + ports: + - 8080:8080 diff --git a/reflect/examples/optionsserver/main.go b/example/gateway/optionsserver/main.go similarity index 91% rename from reflect/examples/optionsserver/main.go rename to example/gateway/optionsserver/main.go index e9975e0..819063a 100644 --- a/reflect/examples/optionsserver/main.go +++ b/example/gateway/optionsserver/main.go @@ -2,11 +2,13 @@ package main import ( "context" - "github.com/danielvladco/go-proto-gql/reflect/examples/optionsserver/pb" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" "log" "net" + + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" + + "github.com/danielvladco/go-proto-gql/example/gateway/optionsserver/pb" ) func main() { @@ -21,7 +23,7 @@ func main() { log.Fatal(s.Serve(l)) } -type service struct{} +type service struct{ pb.UnimplementedServiceServer } func (s service) Mutate1(ctx context.Context, data *pb.Data) (*pb.Data, error) { return data, nil diff --git a/example/gateway/optionsserver/pb/options.pb.go b/example/gateway/optionsserver/pb/options.pb.go new file mode 100644 index 0000000..e4fadb7 --- /dev/null +++ b/example/gateway/optionsserver/pb/options.pb.go @@ -0,0 +1,328 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: optionsserver/pb/options.proto + +package pb + +import ( + _ "github.com/danielvladco/go-proto-gql/pb" + proto "github.com/golang/protobuf/proto" + 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) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type Data struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + String_ string `protobuf:"bytes,1,opt,name=string,proto3" json:"string,omitempty"` // must be required + Foo *Foo2 `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"` // must be required + Float []float32 `protobuf:"fixed32,3,rep,packed,name=float,proto3" json:"float,omitempty"` // must be required because its greater than 0 + String2 string `protobuf:"bytes,4,opt,name=string2,proto3" json:"string2,omitempty"` // simple + Foo2 *Foo2 `protobuf:"bytes,5,opt,name=foo2,proto3" json:"foo2,omitempty"` // simple + Float2 []float32 `protobuf:"fixed32,6,rep,packed,name=float2,proto3" json:"float2,omitempty"` // simple +} + +func (x *Data) Reset() { + *x = Data{} + if protoimpl.UnsafeEnabled { + mi := &file_optionsserver_pb_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Data) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Data) ProtoMessage() {} + +func (x *Data) ProtoReflect() protoreflect.Message { + mi := &file_optionsserver_pb_options_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 Data.ProtoReflect.Descriptor instead. +func (*Data) Descriptor() ([]byte, []int) { + return file_optionsserver_pb_options_proto_rawDescGZIP(), []int{0} +} + +func (x *Data) GetString_() string { + if x != nil { + return x.String_ + } + return "" +} + +func (x *Data) GetFoo() *Foo2 { + if x != nil { + return x.Foo + } + return nil +} + +func (x *Data) GetFloat() []float32 { + if x != nil { + return x.Float + } + return nil +} + +func (x *Data) GetString2() string { + if x != nil { + return x.String2 + } + return "" +} + +func (x *Data) GetFoo2() *Foo2 { + if x != nil { + return x.Foo2 + } + return nil +} + +func (x *Data) GetFloat2() []float32 { + if x != nil { + return x.Float2 + } + return nil +} + +type Foo2 struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Param1 string `protobuf:"bytes,1,opt,name=param1,proto3" json:"param1,omitempty"` +} + +func (x *Foo2) Reset() { + *x = Foo2{} + if protoimpl.UnsafeEnabled { + mi := &file_optionsserver_pb_options_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Foo2) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Foo2) ProtoMessage() {} + +func (x *Foo2) ProtoReflect() protoreflect.Message { + mi := &file_optionsserver_pb_options_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 Foo2.ProtoReflect.Descriptor instead. +func (*Foo2) Descriptor() ([]byte, []int) { + return file_optionsserver_pb_options_proto_rawDescGZIP(), []int{1} +} + +func (x *Foo2) GetParam1() string { + if x != nil { + return x.Param1 + } + return "" +} + +var File_optionsserver_pb_options_proto protoreflect.FileDescriptor + +var file_optionsserver_pb_options_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, + 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x02, 0x70, 0x62, 0x1a, 0x10, 0x70, 0x62, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x1e, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, + 0x22, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x03, + 0x66, 0x6f, 0x6f, 0x12, 0x1c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x02, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x12, 0x1c, 0x0a, 0x04, 0x66, + 0x6f, 0x6f, 0x32, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, + 0x6f, 0x6f, 0x32, 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6c, 0x6f, + 0x61, 0x74, 0x32, 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x32, 0x22, 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x31, 0x32, 0x90, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, + 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x07, + 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x12, + 0x1f, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, + 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, + 0x12, 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x30, 0x01, 0x12, 0x21, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x31, 0x12, 0x08, + 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x28, 0x01, 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, + 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x28, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x01, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x33, 0x12, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, + 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x27, 0x0a, 0x07, 0x50, + 0x75, 0x62, 0x53, 0x75, 0x62, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x00, + 0x28, 0x01, 0x30, 0x01, 0x32, 0x91, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, + 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, + 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x06, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x4d, 0x75, + 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, + 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x01, 0x12, + 0x21, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, + 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x30, 0x01, 0x1a, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, + 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, + 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_optionsserver_pb_options_proto_rawDescOnce sync.Once + file_optionsserver_pb_options_proto_rawDescData = file_optionsserver_pb_options_proto_rawDesc +) + +func file_optionsserver_pb_options_proto_rawDescGZIP() []byte { + file_optionsserver_pb_options_proto_rawDescOnce.Do(func() { + file_optionsserver_pb_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_optionsserver_pb_options_proto_rawDescData) + }) + return file_optionsserver_pb_options_proto_rawDescData +} + +var file_optionsserver_pb_options_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_optionsserver_pb_options_proto_goTypes = []interface{}{ + (*Data)(nil), // 0: pb.Data + (*Foo2)(nil), // 1: pb.Foo2 +} +var file_optionsserver_pb_options_proto_depIdxs = []int32{ + 1, // 0: pb.Data.foo:type_name -> pb.Foo2 + 1, // 1: pb.Data.foo2:type_name -> pb.Foo2 + 0, // 2: pb.Service.Mutate1:input_type -> pb.Data + 0, // 3: pb.Service.Mutate2:input_type -> pb.Data + 0, // 4: pb.Service.Query1:input_type -> pb.Data + 0, // 5: pb.Service.Publish:input_type -> pb.Data + 0, // 6: pb.Service.Subscribe:input_type -> pb.Data + 0, // 7: pb.Service.PubSub1:input_type -> pb.Data + 0, // 8: pb.Service.InvalidSubscribe1:input_type -> pb.Data + 0, // 9: pb.Service.InvalidSubscribe2:input_type -> pb.Data + 0, // 10: pb.Service.InvalidSubscribe3:input_type -> pb.Data + 0, // 11: pb.Service.PubSub2:input_type -> pb.Data + 0, // 12: pb.Query.Query1:input_type -> pb.Data + 0, // 13: pb.Query.Query2:input_type -> pb.Data + 0, // 14: pb.Query.Mutate1:input_type -> pb.Data + 0, // 15: pb.Query.Subscribe:input_type -> pb.Data + 0, // 16: pb.Service.Mutate1:output_type -> pb.Data + 0, // 17: pb.Service.Mutate2:output_type -> pb.Data + 0, // 18: pb.Service.Query1:output_type -> pb.Data + 0, // 19: pb.Service.Publish:output_type -> pb.Data + 0, // 20: pb.Service.Subscribe:output_type -> pb.Data + 0, // 21: pb.Service.PubSub1:output_type -> pb.Data + 0, // 22: pb.Service.InvalidSubscribe1:output_type -> pb.Data + 0, // 23: pb.Service.InvalidSubscribe2:output_type -> pb.Data + 0, // 24: pb.Service.InvalidSubscribe3:output_type -> pb.Data + 0, // 25: pb.Service.PubSub2:output_type -> pb.Data + 0, // 26: pb.Query.Query1:output_type -> pb.Data + 0, // 27: pb.Query.Query2:output_type -> pb.Data + 0, // 28: pb.Query.Mutate1:output_type -> pb.Data + 0, // 29: pb.Query.Subscribe:output_type -> pb.Data + 16, // [16:30] is the sub-list for method output_type + 2, // [2:16] 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_optionsserver_pb_options_proto_init() } +func file_optionsserver_pb_options_proto_init() { + if File_optionsserver_pb_options_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_optionsserver_pb_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Data); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_optionsserver_pb_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Foo2); 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_optionsserver_pb_options_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_optionsserver_pb_options_proto_goTypes, + DependencyIndexes: file_optionsserver_pb_options_proto_depIdxs, + MessageInfos: file_optionsserver_pb_options_proto_msgTypes, + }.Build() + File_optionsserver_pb_options_proto = out.File + file_optionsserver_pb_options_proto_rawDesc = nil + file_optionsserver_pb_options_proto_goTypes = nil + file_optionsserver_pb_options_proto_depIdxs = nil +} diff --git a/reflect/examples/optionsserver/pb/options.proto b/example/gateway/optionsserver/pb/options.proto similarity index 97% rename from reflect/examples/optionsserver/pb/options.proto rename to example/gateway/optionsserver/pb/options.proto index 102becf..e233e01 100644 --- a/reflect/examples/optionsserver/pb/options.proto +++ b/example/gateway/optionsserver/pb/options.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package pb; option go_package = "github.com/danielvladco/go-proto-gql/example;pb"; -import "danielvladco/protobuf/graphql.proto"; +import "pb/graphql.proto"; service Service { rpc Mutate1 (Data) returns (Data); // must be a mutation diff --git a/reflect/examples/optionsserver/pb/options.pb.go b/example/gateway/optionsserver/pb/options_grpc.pb.go similarity index 57% rename from reflect/examples/optionsserver/pb/options.pb.go rename to example/gateway/optionsserver/pb/options_grpc.pb.go index 2afc3f5..f23fdc1 100644 --- a/reflect/examples/optionsserver/pb/options.pb.go +++ b/example/gateway/optionsserver/pb/options_grpc.pb.go @@ -1,347 +1,21 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.21.0 -// protoc v3.7.1 -// source: reflect/examples/optionsserver/pb/options.proto +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package pb import ( context "context" - _ "github.com/danielvladco/go-proto-gql/pb" - proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Data struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - String_ string `protobuf:"bytes,1,opt,name=string,proto3" json:"string,omitempty"` // must be required - Foo *Foo2 `protobuf:"bytes,2,opt,name=foo,proto3" json:"foo,omitempty"` // must be required - Float []float32 `protobuf:"fixed32,3,rep,packed,name=float,proto3" json:"float,omitempty"` // must be required because its greater than 0 - String2 string `protobuf:"bytes,4,opt,name=string2,proto3" json:"string2,omitempty"` // simple - Foo2 *Foo2 `protobuf:"bytes,5,opt,name=foo2,proto3" json:"foo2,omitempty"` // simple - Float2 []float32 `protobuf:"fixed32,6,rep,packed,name=float2,proto3" json:"float2,omitempty"` // simple -} - -func (x *Data) Reset() { - *x = Data{} - if protoimpl.UnsafeEnabled { - mi := &file_reflect_examples_optionsserver_pb_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Data) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Data) ProtoMessage() {} - -func (x *Data) ProtoReflect() protoreflect.Message { - mi := &file_reflect_examples_optionsserver_pb_options_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 Data.ProtoReflect.Descriptor instead. -func (*Data) Descriptor() ([]byte, []int) { - return file_reflect_examples_optionsserver_pb_options_proto_rawDescGZIP(), []int{0} -} - -func (x *Data) GetString_() string { - if x != nil { - return x.String_ - } - return "" -} - -func (x *Data) GetFoo() *Foo2 { - if x != nil { - return x.Foo - } - return nil -} - -func (x *Data) GetFloat() []float32 { - if x != nil { - return x.Float - } - return nil -} - -func (x *Data) GetString2() string { - if x != nil { - return x.String2 - } - return "" -} - -func (x *Data) GetFoo2() *Foo2 { - if x != nil { - return x.Foo2 - } - return nil -} - -func (x *Data) GetFloat2() []float32 { - if x != nil { - return x.Float2 - } - return nil -} - -type Foo2 struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Param1 string `protobuf:"bytes,1,opt,name=param1,proto3" json:"param1,omitempty"` -} - -func (x *Foo2) Reset() { - *x = Foo2{} - if protoimpl.UnsafeEnabled { - mi := &file_reflect_examples_optionsserver_pb_options_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Foo2) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Foo2) ProtoMessage() {} - -func (x *Foo2) ProtoReflect() protoreflect.Message { - mi := &file_reflect_examples_optionsserver_pb_options_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 Foo2.ProtoReflect.Descriptor instead. -func (*Foo2) Descriptor() ([]byte, []int) { - return file_reflect_examples_optionsserver_pb_options_proto_rawDescGZIP(), []int{1} -} - -func (x *Foo2) GetParam1() string { - if x != nil { - return x.Param1 - } - return "" -} - -var File_reflect_examples_optionsserver_pb_options_proto protoreflect.FileDescriptor - -var file_reflect_examples_optionsserver_pb_options_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2f, 0x70, 0x62, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x0c, 0x70, 0x62, 0x2f, 0x67, 0x71, 0x6c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x06, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xb2, 0xe0, - 0x1f, 0x02, 0x08, 0x01, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x0a, 0x03, - 0x66, 0x6f, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, - 0x6f, 0x6f, 0x32, 0x42, 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, - 0x12, 0x1c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x02, 0x42, - 0x06, 0xb2, 0xe0, 0x1f, 0x02, 0x08, 0x01, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x32, 0x12, 0x1c, 0x0a, 0x04, 0x66, 0x6f, 0x6f, 0x32, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x32, - 0x52, 0x04, 0x66, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x06, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x22, 0x1e, - 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x32, 0x90, - 0x03, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, - 0x74, 0x61, 0x74, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x07, 0x4d, 0x75, 0x74, - 0x61, 0x74, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, - 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, - 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x12, 0x1f, 0x0a, 0x07, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, 0x01, 0x12, 0x21, 0x0a, - 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, - 0x12, 0x21, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, 0x75, 0x62, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, - 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, - 0x1f, 0x02, 0x28, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, - 0xe0, 0x1f, 0x01, 0x30, 0x01, 0x12, 0x31, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x33, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, - 0xb0, 0xe0, 0x1f, 0x02, 0x28, 0x01, 0x30, 0x01, 0x12, 0x27, 0x0a, 0x07, 0x50, 0x75, 0x62, 0x53, - 0x75, 0x62, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, - 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x00, 0x28, 0x01, 0x30, - 0x01, 0x32, 0x91, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x06, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, - 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1c, 0x0a, 0x06, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x32, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, - 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x07, 0x4d, 0x75, 0x74, 0x61, 0x74, - 0x65, 0x31, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, - 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x22, 0x04, 0xb0, 0xe0, 0x1f, 0x01, 0x12, 0x21, 0x0a, 0x09, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, - 0x61, 0x74, 0x61, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x30, 0x01, 0x1a, - 0x04, 0xb0, 0xe0, 0x1f, 0x02, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, - 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_reflect_examples_optionsserver_pb_options_proto_rawDescOnce sync.Once - file_reflect_examples_optionsserver_pb_options_proto_rawDescData = file_reflect_examples_optionsserver_pb_options_proto_rawDesc -) - -func file_reflect_examples_optionsserver_pb_options_proto_rawDescGZIP() []byte { - file_reflect_examples_optionsserver_pb_options_proto_rawDescOnce.Do(func() { - file_reflect_examples_optionsserver_pb_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_reflect_examples_optionsserver_pb_options_proto_rawDescData) - }) - return file_reflect_examples_optionsserver_pb_options_proto_rawDescData -} - -var file_reflect_examples_optionsserver_pb_options_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_reflect_examples_optionsserver_pb_options_proto_goTypes = []interface{}{ - (*Data)(nil), // 0: pb.Data - (*Foo2)(nil), // 1: pb.Foo2 -} -var file_reflect_examples_optionsserver_pb_options_proto_depIdxs = []int32{ - 1, // 0: pb.Data.foo:type_name -> pb.Foo2 - 1, // 1: pb.Data.foo2:type_name -> pb.Foo2 - 0, // 2: pb.Service.Mutate1:input_type -> pb.Data - 0, // 3: pb.Service.Mutate2:input_type -> pb.Data - 0, // 4: pb.Service.Query1:input_type -> pb.Data - 0, // 5: pb.Service.Publish:input_type -> pb.Data - 0, // 6: pb.Service.Subscribe:input_type -> pb.Data - 0, // 7: pb.Service.PubSub1:input_type -> pb.Data - 0, // 8: pb.Service.InvalidSubscribe1:input_type -> pb.Data - 0, // 9: pb.Service.InvalidSubscribe2:input_type -> pb.Data - 0, // 10: pb.Service.InvalidSubscribe3:input_type -> pb.Data - 0, // 11: pb.Service.PubSub2:input_type -> pb.Data - 0, // 12: pb.Query.Query1:input_type -> pb.Data - 0, // 13: pb.Query.Query2:input_type -> pb.Data - 0, // 14: pb.Query.Mutate1:input_type -> pb.Data - 0, // 15: pb.Query.Subscribe:input_type -> pb.Data - 0, // 16: pb.Service.Mutate1:output_type -> pb.Data - 0, // 17: pb.Service.Mutate2:output_type -> pb.Data - 0, // 18: pb.Service.Query1:output_type -> pb.Data - 0, // 19: pb.Service.Publish:output_type -> pb.Data - 0, // 20: pb.Service.Subscribe:output_type -> pb.Data - 0, // 21: pb.Service.PubSub1:output_type -> pb.Data - 0, // 22: pb.Service.InvalidSubscribe1:output_type -> pb.Data - 0, // 23: pb.Service.InvalidSubscribe2:output_type -> pb.Data - 0, // 24: pb.Service.InvalidSubscribe3:output_type -> pb.Data - 0, // 25: pb.Service.PubSub2:output_type -> pb.Data - 0, // 26: pb.Query.Query1:output_type -> pb.Data - 0, // 27: pb.Query.Query2:output_type -> pb.Data - 0, // 28: pb.Query.Mutate1:output_type -> pb.Data - 0, // 29: pb.Query.Subscribe:output_type -> pb.Data - 16, // [16:30] is the sub-list for method output_type - 2, // [2:16] 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_reflect_examples_optionsserver_pb_options_proto_init() } -func file_reflect_examples_optionsserver_pb_options_proto_init() { - if File_reflect_examples_optionsserver_pb_options_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_reflect_examples_optionsserver_pb_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Data); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_reflect_examples_optionsserver_pb_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Foo2); 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_reflect_examples_optionsserver_pb_options_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 2, - }, - GoTypes: file_reflect_examples_optionsserver_pb_options_proto_goTypes, - DependencyIndexes: file_reflect_examples_optionsserver_pb_options_proto_depIdxs, - MessageInfos: file_reflect_examples_optionsserver_pb_options_proto_msgTypes, - }.Build() - File_reflect_examples_optionsserver_pb_options_proto = out.File - file_reflect_examples_optionsserver_pb_options_proto_rawDesc = nil - file_reflect_examples_optionsserver_pb_options_proto_goTypes = nil - file_reflect_examples_optionsserver_pb_options_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 +const _ = grpc.SupportPackageIsVersion7 // ServiceClient is the client API for Service service. // -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// 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 ServiceClient interface { Mutate1(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) Mutate2(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) @@ -616,6 +290,8 @@ func (x *servicePubSub2Client) Recv() (*Data, error) { } // ServiceServer is the server API for Service service. +// All implementations must embed UnimplementedServiceServer +// for forward compatibility type ServiceServer interface { Mutate1(context.Context, *Data) (*Data, error) Mutate2(context.Context, *Data) (*Data, error) @@ -627,44 +303,53 @@ type ServiceServer interface { InvalidSubscribe2(*Data, Service_InvalidSubscribe2Server) error InvalidSubscribe3(Service_InvalidSubscribe3Server) error PubSub2(Service_PubSub2Server) error + mustEmbedUnimplementedServiceServer() } -// UnimplementedServiceServer can be embedded to have forward compatible implementations. +// UnimplementedServiceServer must be embedded to have forward compatible implementations. type UnimplementedServiceServer struct { } -func (*UnimplementedServiceServer) Mutate1(context.Context, *Data) (*Data, error) { +func (UnimplementedServiceServer) Mutate1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Mutate1 not implemented") } -func (*UnimplementedServiceServer) Mutate2(context.Context, *Data) (*Data, error) { +func (UnimplementedServiceServer) Mutate2(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Mutate2 not implemented") } -func (*UnimplementedServiceServer) Query1(context.Context, *Data) (*Data, error) { +func (UnimplementedServiceServer) Query1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Query1 not implemented") } -func (*UnimplementedServiceServer) Publish(Service_PublishServer) error { +func (UnimplementedServiceServer) Publish(Service_PublishServer) error { return status.Errorf(codes.Unimplemented, "method Publish not implemented") } -func (*UnimplementedServiceServer) Subscribe(*Data, Service_SubscribeServer) error { +func (UnimplementedServiceServer) Subscribe(*Data, Service_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } -func (*UnimplementedServiceServer) PubSub1(Service_PubSub1Server) error { +func (UnimplementedServiceServer) PubSub1(Service_PubSub1Server) error { return status.Errorf(codes.Unimplemented, "method PubSub1 not implemented") } -func (*UnimplementedServiceServer) InvalidSubscribe1(Service_InvalidSubscribe1Server) error { +func (UnimplementedServiceServer) InvalidSubscribe1(Service_InvalidSubscribe1Server) error { return status.Errorf(codes.Unimplemented, "method InvalidSubscribe1 not implemented") } -func (*UnimplementedServiceServer) InvalidSubscribe2(*Data, Service_InvalidSubscribe2Server) error { +func (UnimplementedServiceServer) InvalidSubscribe2(*Data, Service_InvalidSubscribe2Server) error { return status.Errorf(codes.Unimplemented, "method InvalidSubscribe2 not implemented") } -func (*UnimplementedServiceServer) InvalidSubscribe3(Service_InvalidSubscribe3Server) error { +func (UnimplementedServiceServer) InvalidSubscribe3(Service_InvalidSubscribe3Server) error { return status.Errorf(codes.Unimplemented, "method InvalidSubscribe3 not implemented") } -func (*UnimplementedServiceServer) PubSub2(Service_PubSub2Server) error { +func (UnimplementedServiceServer) PubSub2(Service_PubSub2Server) error { return status.Errorf(codes.Unimplemented, "method PubSub2 not implemented") } +func (UnimplementedServiceServer) mustEmbedUnimplementedServiceServer() {} -func RegisterServiceServer(s *grpc.Server, srv ServiceServer) { +// UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ServiceServer will +// result in compilation errors. +type UnsafeServiceServer interface { + mustEmbedUnimplementedServiceServer() +} + +func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { s.RegisterService(&_Service_serviceDesc, srv) } @@ -951,12 +636,12 @@ var _Service_serviceDesc = grpc.ServiceDesc{ ClientStreams: true, }, }, - Metadata: "reflect/examples/optionsserver/pb/options.proto", + Metadata: "optionsserver/pb/options.proto", } // QueryClient is the client API for Query service. // -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// 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 QueryClient interface { Query1(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) Query2(ctx context.Context, in *Data, opts ...grpc.CallOption) (*Data, error) @@ -1032,31 +717,42 @@ func (x *querySubscribeClient) Recv() (*Data, error) { } // QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility type QueryServer interface { Query1(context.Context, *Data) (*Data, error) Query2(context.Context, *Data) (*Data, error) Mutate1(context.Context, *Data) (*Data, error) Subscribe(*Data, Query_SubscribeServer) error + mustEmbedUnimplementedQueryServer() } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. +// UnimplementedQueryServer must be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Query1(context.Context, *Data) (*Data, error) { +func (UnimplementedQueryServer) Query1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Query1 not implemented") } -func (*UnimplementedQueryServer) Query2(context.Context, *Data) (*Data, error) { +func (UnimplementedQueryServer) Query2(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Query2 not implemented") } -func (*UnimplementedQueryServer) Mutate1(context.Context, *Data) (*Data, error) { +func (UnimplementedQueryServer) Mutate1(context.Context, *Data) (*Data, error) { return nil, status.Errorf(codes.Unimplemented, "method Mutate1 not implemented") } -func (*UnimplementedQueryServer) Subscribe(*Data, Query_SubscribeServer) error { +func (UnimplementedQueryServer) Subscribe(*Data, Query_SubscribeServer) error { return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} -func RegisterQueryServer(s *grpc.Server, srv QueryServer) { +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } @@ -1159,5 +855,5 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "reflect/examples/optionsserver/pb/options.proto", + Metadata: "optionsserver/pb/options.proto", } diff --git a/example/options.gqlgen.pb.go b/example/options.gqlgen.pb.go deleted file mode 100644 index b3d5a31..0000000 --- a/example/options.gqlgen.pb.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: example/options.proto - -package pb - -import ( - context "context" - fmt "fmt" - _ "github.com/danielvladco/go-proto-gql/pb" - proto "github.com/golang/protobuf/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type ServiceGQLServer struct{ Service ServiceServer } - -func (s *ServiceGQLServer) ServiceMutate1(ctx context.Context, in *Data) (*Data, error) { - return s.Service.Mutate1(ctx, in) -} -func (s *ServiceGQLServer) ServiceMutate2(ctx context.Context, in *Data) (*Data, error) { - return s.Service.Mutate2(ctx, in) -} -func (s *ServiceGQLServer) ServiceQuery1(ctx context.Context, in *Data) (*Data, error) { - return s.Service.Query1(ctx, in) -} - -type QueryGQLServer struct{ Service QueryServer } - -func (s *QueryGQLServer) QueryQuery1(ctx context.Context, in *Data) (*Data, error) { - return s.Service.Query1(ctx, in) -} -func (s *QueryGQLServer) QueryQuery2(ctx context.Context, in *Data) (*Data, error) { - return s.Service.Query2(ctx, in) -} -func (s *QueryGQLServer) QueryMutate1(ctx context.Context, in *Data) (*Data, error) { - return s.Service.Mutate1(ctx, in) -} diff --git a/example/options.gqlgen.pb.yml b/example/options.gqlgen.pb.yml deleted file mode 100644 index 4d556f4..0000000 --- a/example/options.gqlgen.pb.yml +++ /dev/null @@ -1,25 +0,0 @@ -schema: -- options.pb.graphqls -exec: - filename: generated.gen.go -model: - filename: models.gen.go -resolver: - filename: resolver.go - type: resolver -models: - Data: - model: - - github.com/danielvladco/go-proto-gql/example.Data - DataInput: - model: - - github.com/danielvladco/go-proto-gql/example.Data - Float32: - model: - - github.com/danielvladco/go-proto-gql/pb.Float32 - Foo2: - model: - - github.com/danielvladco/go-proto-gql/example.Foo2 - Foo2Input: - model: - - github.com/danielvladco/go-proto-gql/example.Foo2 diff --git a/example/options.pb.graphqls b/example/options.pb.graphqls deleted file mode 100644 index 3379bb1..0000000 --- a/example/options.pb.graphqls +++ /dev/null @@ -1,64 +0,0 @@ -# Code generated by protoc-gen-gogql. DO NOT EDIT -# source: example/options.proto - -directive @Service(name: String) on FIELD_DEFINITION - -directive @Query(name: String) on FIELD_DEFINITION - -scalar Float32 - -input DataInput { - string: String! - foo: Foo2Input! - float: [Float32!]! - string2: String - foo2: Foo2Input - float2: [Float32!] -} - -input Foo2Input { - param1: String -} - -type Data { - string: String! - foo: Foo2! - float: [Float32!]! - string2: String - foo2: Foo2 - float2: [Float32!] -} - -type Foo2 { - param1: String -} - -type Mutation { - serviceMutate1(in: DataInput): Data @Service - serviceMutate2(in: DataInput): Data @Service - servicePublish(in: DataInput): Data @Service - # See the Subscription with the same name - servicePubSub1(in: DataInput): Boolean @Service - # See the Subscription with the same name - serviceInvalidSubscribe3(in: DataInput): Boolean @Service - # See the Subscription with the same name - servicePubSub2(in: DataInput): Boolean @Service - queryMutate1(in: DataInput): Data @Query -} - -type Query { - serviceQuery1(in: DataInput): Data @Service - serviceInvalidSubscribe1(in: DataInput): Data @Service - queryQuery1(in: DataInput): Data @Query - queryQuery2(in: DataInput): Data @Query -} - -type Subscription { - serviceSubscribe(in: DataInput): Data @Service - servicePubSub1(in: DataInput): Data @Service - serviceInvalidSubscribe2(in: DataInput): Data @Service - serviceInvalidSubscribe3(in: DataInput): Data @Service - servicePubSub2(in: DataInput): Data @Service - querySubscribe(in: DataInput): Data @Query -} - diff --git a/go.mod b/go.mod index 86ba1ae..548cc89 100644 --- a/go.mod +++ b/go.mod @@ -3,23 +3,17 @@ module github.com/danielvladco/go-proto-gql go 1.14 require ( - github.com/danielvladco/go-proto-gql/pb v0.6.0 - github.com/davecgh/go-spew v1.1.1 - github.com/golang/protobuf v1.4.2 - github.com/graphql-go/graphql v0.7.8 - github.com/graphql-go/handler v0.2.3 - github.com/jhump/goprotoc v0.2.0 // indirect - github.com/jhump/protoreflect v1.5.0 - github.com/lyft/protoc-gen-star v0.4.15 // indirect - github.com/spf13/afero v1.2.2 // indirect - github.com/vektah/gqlparser/v2 v2.0.1 - golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 // indirect - golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect + github.com/99designs/gqlgen v0.13.0 + github.com/golang/protobuf v1.4.3 + github.com/jhump/protoreflect v1.6.1 + github.com/mitchellh/mapstructure v1.3.0 + github.com/nautilus/gateway v0.1.4 + github.com/nautilus/graphql v0.0.9 + github.com/vektah/gqlparser/v2 v2.1.0 + golang.org/x/net v0.0.0-20200513185701-a91f0712d120 // indirect + golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 // indirect golang.org/x/text v0.3.2 // indirect - google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 // indirect - google.golang.org/grpc v1.23.0 - google.golang.org/protobuf v1.23.0 - gopkg.in/yaml.v2 v2.2.4 + google.golang.org/grpc v1.33.2 + google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1 + google.golang.org/protobuf v1.25.0 ) - -replace github.com/danielvladco/go-proto-gql/pb => ./pb diff --git a/go.sum b/go.sum index 0bb78da..ecf7b5b 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,35 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/99designs/gqlgen v0.11.3 h1:oFSxl1DFS9X///uHV3y6CEfpcXWrDUxVblR4Xib2bs4= +github.com/99designs/gqlgen v0.11.3/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= +github.com/99designs/gqlgen v0.13.0 h1:haLTcUp3Vwp80xMVEg5KRNwzfUrgFdRmtBY8fuB8scA= +github.com/99designs/gqlgen v0.13.0/go.mod h1:NV130r6f4tpRWuAI+zsrSdooO/eWUv+Gyyoi3rEfXIk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= +github.com/agnivade/levenshtein v1.0.3 h1:M5ZnqLOoZR8ygVq0FfkXsNOKzMCk0xRiow0R5+5VkQ0= +github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6ie5efyrwRJXs= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= +github.com/carted/graphql v0.7.6 h1:1DAom3l7Irln/hHlPMBR6w/RirCXjopsCY9WCZc7WUc= +github.com/carted/graphql v0.7.6/go.mod h1:aIVByVaa4avHzEnahcnHbP48OrkT/+gTtxBT+dPV2R0= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 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/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c h1:TUuUh0Xgj97tLMNtWtNvI9mIV6isjEb9lBMNv+77IGM= +github.com/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -18,61 +41,140 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.1 h1:ZFgWrT+bLgsYPirOnRfKLYJLvssAegOj/hgyMFdJZe0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/graphql-go/graphql v0.7.8 h1:769CR/2JNAhLG9+aa8pfLkKdR0H+r5lsQqling5WwpU= -github.com/graphql-go/graphql v0.7.8/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= -github.com/graphql-go/handler v0.2.3 h1:CANh8WPnl5M9uA25c2GBhPqJhE53Fg0Iue/fRNla71E= -github.com/graphql-go/handler v0.2.3/go.mod h1:leLF6RpV5uZMN1CdImAxuiayrYYhOk33bZciaUGaXeU= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.2.0 h1:VFu8NxlzVAsHKStxwqFzoGLLySZ9rQc/E5Elpu4x91k= -github.com/jhump/goprotoc v0.2.0/go.mod h1:TM0lulZUNujIC+aepfTnT5KK1gpI15BcON2TTVBsWzI= -github.com/jhump/protoreflect v1.5.0 h1:NgpVT+dX71c8hZnxHof2M7QDK7QtohIJ7DYycjnkyfc= -github.com/jhump/protoreflect v1.5.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= +github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= +github.com/graph-gophers/graphql-go v0.0.0-20190108123631-d5b7dc6be53b/go.mod h1:aRnZGurV3LlZ1Y+ygyx1mAV6OUfq+nu6OgpJ6jKgZ3g= +github.com/graphql-go/graphql v0.7.7/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= +github.com/graphql-go/graphql v0.7.9 h1:5Va/Rt4l5g3YjwDnid3vFfn43faaQBq7rMcIZ0VnV34= +github.com/graphql-go/graphql v0.7.9/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jhump/protoreflect v1.6.1 h1:4/2yi5LyDPP7nN+Hiird1SAJ6YoxUm13/oxHGRnbPd8= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/lyft/protoc-gen-star v0.4.15 h1:quC0MYv1hc+s8Wz9qCdPPI+DjhEPVD9gHZn2So2jbwc= -github.com/lyft/protoc-gen-star v0.4.15/go.mod h1:mE8fbna26u7aEA2QCVvvfBU/ZrPgocG1206xAFPcs94= +github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/matryer/moq v0.0.0-20200125112110-7615cbe60268 h1:76J+StfuBgQoDIEqBliiA/ua9UhUDN1EyC6e0YkJFzc= +github.com/matryer/moq v0.0.0-20200125112110-7615cbe60268/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.0 h1:iDwIio/3gk2QtLLEsqU5lInaMzos0hDTz8a6lazSFVw= +github.com/mitchellh/mapstructure v1.3.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/nautilus/gateway v0.1.4 h1:vq2c8TtAECDMJYIlGk71NuiMwbNAjKaKmD7de3gJNLI= +github.com/nautilus/gateway v0.1.4/go.mod h1:RxuX3aApDc+xYY7FpS75o6wOSsJcOstS9tFgCwNKC+U= +github.com/nautilus/graphql v0.0.9 h1:si606oOgpARWH7STlA5NoTcCHOf7WfK5pH0AQjskKcE= +github.com/nautilus/graphql v0.0.9/go.mod h1:MQDucBpBRbhwZfeE59tS1DFg7VXS3NvwQpLkgHBmQkg= +github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= +github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= +github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= +github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= +github.com/vektah/dataloaden v0.3.0 h1:ZfVN2QD6swgvp+tDqdH/OIT/wu3Dhu0cus0k5gIZS84= +github.com/vektah/dataloaden v0.3.0/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= +github.com/vektah/gqlparser v1.1.0 h1:3668p2gUlO+PiS81x957Rpr3/FPRWG6cxgCXAvTS1hw= +github.com/vektah/gqlparser v1.1.0/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vektah/gqlparser/v2 v2.0.1 h1:xgl5abVnsd4hkN9rk65OJID9bfcLSMuTaTcZj777q1o= github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= +github.com/vektah/gqlparser/v2 v2.1.0 h1:uiKJ+T5HMGGQM2kRKQ8Pxw8+Zq9qhhZhz/lieYvCMns= +github.com/vektah/gqlparser/v2 v2.1.0/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120 h1:EZ3cVSzKOlJxAd8e8YAJ7no8nNypTxexh/YE/xW3ZEY= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200321134203-328b4cd54aae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 h1:YTzHMGlqJu67/uEo1lBv0n3wBXhXNeUbB1XfN2vmTm0= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -81,26 +183,45 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200225022059-a0ec867d517c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b h1:zSzQJAznWxAh9fZxiPy2FZo+ZZEYoYFYYDYdOrU7AaM= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64 h1:iKtrH9Y8mcbADOP0YFaEMth7OfuHY9xHOwNj4znpM1A= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1 h1:M8spwkmx0pHrPq+uMdl22w5CvJ/Y+oAJTIs9oGoCpOE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -108,5 +229,9 @@ gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= +sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= diff --git a/gqlserver/main.go b/gqlserver/main.go deleted file mode 100644 index 677423c..0000000 --- a/gqlserver/main.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - graphql "github.com/danielvladco/go-proto-gql/pb/danielvladco/protobuf" - "log" - "net/http" -) - -func main() { - // TODO serve gql server ... - fields := graphql.Fields{ - "hello": &graphql.Field{ - Type: graphql.String, - Resolve: func(p graphql.ResolveParams) (interface{}, error) { - return "world", nil - }, - }, - } - rootQuery := graphql.ObjectConfig{Name: "RootQuery", Fields: fields} - schemaConfig := graphql.SchemaConfig{Query: graphql.NewObject(rootQuery)} - schema, err := graphql.NewSchema(schemaConfig) - if err != nil { - log.Fatalf("failed to create new schema, error: %v", err) - } - h := handler.New(&handler.Config{ - Schema: &schema, - Pretty: true, - GraphiQL: true, - }) - - http.Handle("/graphql", h) - http.ListenAndServe(":8080", nil) -} diff --git a/pb/go.mod b/pb/go.mod deleted file mode 100644 index 249fce2..0000000 --- a/pb/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/danielvladco/go-proto-gql/pb - -go 1.12 - -require github.com/golang/protobuf v1.4.2 diff --git a/pb/go.sum b/pb/go.sum deleted file mode 100644 index 0eeb491..0000000 --- a/pb/go.sum +++ /dev/null @@ -1,20 +0,0 @@ -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= diff --git a/pb/gql.pb.go b/pb/gql.pb.go deleted file mode 100644 index d545977..0000000 --- a/pb/gql.pb.go +++ /dev/null @@ -1,309 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.21.0 -// protoc v3.7.1 -// source: pb/graphql.proto - -package gql - -import ( - proto "github.com/golang/protobuf/proto" - descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" - 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) -) - -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 - -type Type int32 - -const ( - Type_DEFAULT Type = 0 - Type_MUTATION Type = 1 - Type_QUERY Type = 2 -) - -// Enum value maps for Type. -var ( - Type_name = map[int32]string{ - 0: "DEFAULT", - 1: "MUTATION", - 2: "QUERY", - } - Type_value = map[string]int32{ - "DEFAULT": 0, - "MUTATION": 1, - "QUERY": 2, - } -) - -func (x Type) Enum() *Type { - p := new(Type) - *p = x - return p -} - -func (x Type) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Type) Descriptor() protoreflect.EnumDescriptor { - return file_pb_gql_proto_enumTypes[0].Descriptor() -} - -func (Type) Type() protoreflect.EnumType { - return &file_pb_gql_proto_enumTypes[0] -} - -func (x Type) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *Type) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = Type(num) - return nil -} - -// Deprecated: Use Type.Descriptor instead. -func (Type) EnumDescriptor() ([]byte, []int) { - return file_pb_gql_proto_rawDescGZIP(), []int{0} -} - -type Field struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - Params *string `protobuf:"bytes,2,opt,name=params" json:"params,omitempty"` - Dirs *string `protobuf:"bytes,3,opt,name=dirs" json:"dirs,omitempty"` -} - -func (x *Field) Reset() { - *x = Field{} - if protoimpl.UnsafeEnabled { - mi := &file_pb_gql_proto_msgTypes[0] - 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_pb_gql_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 Field.ProtoReflect.Descriptor instead. -func (*Field) Descriptor() ([]byte, []int) { - return file_pb_gql_proto_rawDescGZIP(), []int{0} -} - -func (x *Field) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -func (x *Field) GetParams() string { - if x != nil && x.Params != nil { - return *x.Params - } - return "" -} - -func (x *Field) GetDirs() string { - if x != nil && x.Dirs != nil { - return *x.Dirs - } - return "" -} - -var file_pb_gql_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptor.MethodOptions)(nil), - ExtensionType: (*Type)(nil), - Field: 65030, - Name: "danielvladco.go_proto_gql.gql.rpc_type", - Tag: "varint,65030,opt,name=rpc_type,enum=danielvladco.go_proto_gql.gql.Type", - Filename: "pb/graphql.proto", - }, - { - ExtendedType: (*descriptor.ServiceOptions)(nil), - ExtensionType: (*Type)(nil), - Field: 65030, - Name: "danielvladco.go_proto_gql.gql.svc_type", - Tag: "varint,65030,opt,name=svc_type,enum=danielvladco.go_proto_gql.gql.Type", - Filename: "pb/graphql.proto", - }, - { - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*Field)(nil), - Field: 65030, - Name: "danielvladco.go_proto_gql.gql.field", - Tag: "bytes,65030,opt,name=field", - Filename: "pb/graphql.proto", - }, -} - -// Extension fields to descriptor.MethodOptions. -var ( - // optional danielvladco.go_proto_gql.gql.Type rpc_type = 65030; - E_RpcType = &file_pb_gql_proto_extTypes[0] -) - -// Extension fields to descriptor.ServiceOptions. -var ( - // optional danielvladco.go_proto_gql.gql.Type svc_type = 65030; - E_SvcType = &file_pb_gql_proto_extTypes[1] -) - -// Extension fields to descriptor.FieldOptions. -var ( - // optional danielvladco.go_proto_gql.gql.Field field = 65030; - E_Field = &file_pb_gql_proto_extTypes[2] -) - -var File_pb_gql_proto protoreflect.FileDescriptor - -var file_pb_gql_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x70, 0x62, 0x2f, 0x67, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, - 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x67, 0x6f, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x67, 0x71, 0x6c, 0x2e, 0x67, 0x71, 0x6c, 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, - 0x4f, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x64, 0x69, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x72, 0x73, - 0x2a, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, - 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x02, 0x3a, 0x60, - 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 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, 0x86, 0xfc, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, - 0x6f, 0x2e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x67, 0x71, 0x6c, 0x2e, 0x67, - 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x72, 0x70, 0x63, 0x54, 0x79, 0x70, 0x65, - 0x3a, 0x61, 0x0a, 0x08, 0x73, 0x76, 0x63, 0x5f, 0x74, 0x79, 0x70, 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, 0x86, 0xfc, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, - 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x67, 0x71, - 0x6c, 0x2e, 0x67, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x73, 0x76, 0x63, 0x54, - 0x79, 0x70, 0x65, 0x3a, 0x5b, 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, 0x86, 0xfc, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, - 0x63, 0x6f, 0x2e, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x67, 0x71, 0x6c, 0x2e, - 0x67, 0x71, 0x6c, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, - 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x70, 0x62, 0x3b, 0x67, 0x71, 0x6c, -} - -var ( - file_pb_gql_proto_rawDescOnce sync.Once - file_pb_gql_proto_rawDescData = file_pb_gql_proto_rawDesc -) - -func file_pb_gql_proto_rawDescGZIP() []byte { - file_pb_gql_proto_rawDescOnce.Do(func() { - file_pb_gql_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_gql_proto_rawDescData) - }) - return file_pb_gql_proto_rawDescData -} - -var file_pb_gql_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pb_gql_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_pb_gql_proto_goTypes = []interface{}{ - (Type)(0), // 0: danielvladco.go_proto_gql.gql.Type - (*Field)(nil), // 1: danielvladco.go_proto_gql.gql.Field - (*descriptor.MethodOptions)(nil), // 2: google.protobuf.MethodOptions - (*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions - (*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions -} -var file_pb_gql_proto_depIdxs = []int32{ - 2, // 0: danielvladco.go_proto_gql.gql.rpc_type:extendee -> google.protobuf.MethodOptions - 3, // 1: danielvladco.go_proto_gql.gql.svc_type:extendee -> google.protobuf.ServiceOptions - 4, // 2: danielvladco.go_proto_gql.gql.field:extendee -> google.protobuf.FieldOptions - 0, // 3: danielvladco.go_proto_gql.gql.rpc_type:type_name -> danielvladco.go_proto_gql.gql.Type - 0, // 4: danielvladco.go_proto_gql.gql.svc_type:type_name -> danielvladco.go_proto_gql.gql.Type - 1, // 5: danielvladco.go_proto_gql.gql.field:type_name -> danielvladco.go_proto_gql.gql.Field - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 3, // [3:6] is the sub-list for extension type_name - 0, // [0:3] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_pb_gql_proto_init() } -func file_pb_gql_proto_init() { - if File_pb_gql_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_pb_gql_proto_msgTypes[0].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 - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_pb_gql_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 3, - NumServices: 0, - }, - GoTypes: file_pb_gql_proto_goTypes, - DependencyIndexes: file_pb_gql_proto_depIdxs, - EnumInfos: file_pb_gql_proto_enumTypes, - MessageInfos: file_pb_gql_proto_msgTypes, - ExtensionInfos: file_pb_gql_proto_extTypes, - }.Build() - File_pb_gql_proto = out.File - file_pb_gql_proto_rawDesc = nil - file_pb_gql_proto_goTypes = nil - file_pb_gql_proto_depIdxs = nil -} diff --git a/pb/danielvladco/protobuf/graphql.pb.go b/pb/graphql.pb.go similarity index 52% rename from pb/danielvladco/protobuf/graphql.pb.go rename to pb/graphql.pb.go index 326187c..71f52ef 100644 --- a/pb/danielvladco/protobuf/graphql.pb.go +++ b/pb/graphql.pb.go @@ -1,8 +1,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.21.0 -// protoc v3.7.1 -// source: danielvladco/protobuf/graphql.proto +// protoc-gen-go v1.25.0 +// protoc v3.13.0 +// source: pb/graphql.proto package graphql @@ -59,11 +59,11 @@ func (x Type) String() string { } func (Type) Descriptor() protoreflect.EnumDescriptor { - return file_danielvladco_protobuf_graphql_proto_enumTypes[0].Descriptor() + return file_pb_graphql_proto_enumTypes[0].Descriptor() } func (Type) Type() protoreflect.EnumType { - return &file_danielvladco_protobuf_graphql_proto_enumTypes[0] + return &file_pb_graphql_proto_enumTypes[0] } func (x Type) Number() protoreflect.EnumNumber { @@ -82,7 +82,7 @@ func (x *Type) UnmarshalJSON(b []byte) error { // Deprecated: Use Type.Descriptor instead. func (Type) EnumDescriptor() ([]byte, []int) { - return file_danielvladco_protobuf_graphql_proto_rawDescGZIP(), []int{0} + return file_pb_graphql_proto_rawDescGZIP(), []int{0} } type Field struct { @@ -98,7 +98,7 @@ type Field struct { func (x *Field) Reset() { *x = Field{} if protoimpl.UnsafeEnabled { - mi := &file_danielvladco_protobuf_graphql_proto_msgTypes[0] + mi := &file_pb_graphql_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -111,7 +111,7 @@ func (x *Field) String() string { func (*Field) ProtoMessage() {} func (x *Field) ProtoReflect() protoreflect.Message { - mi := &file_danielvladco_protobuf_graphql_proto_msgTypes[0] + mi := &file_pb_graphql_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -124,7 +124,7 @@ func (x *Field) ProtoReflect() protoreflect.Message { // Deprecated: Use Field.ProtoReflect.Descriptor instead. func (*Field) Descriptor() ([]byte, []int) { - return file_danielvladco_protobuf_graphql_proto_rawDescGZIP(), []int{0} + return file_pb_graphql_proto_rawDescGZIP(), []int{0} } func (x *Field) GetRequired() bool { @@ -148,14 +148,14 @@ func (x *Field) GetDirs() string { return "" } -var file_danielvladco_protobuf_graphql_proto_extTypes = []protoimpl.ExtensionInfo{ +var file_pb_graphql_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptor.MethodOptions)(nil), ExtensionType: (*Type)(nil), Field: 65030, Name: "danielvladco.protobuf.graphql.rpc_type", Tag: "varint,65030,opt,name=rpc_type,enum=danielvladco.protobuf.graphql.Type", - Filename: "danielvladco/protobuf/graphql.proto", + Filename: "pb/graphql.proto", }, { ExtendedType: (*descriptor.ServiceOptions)(nil), @@ -163,7 +163,7 @@ var file_danielvladco_protobuf_graphql_proto_extTypes = []protoimpl.ExtensionInf Field: 65030, Name: "danielvladco.protobuf.graphql.svc_type", Tag: "varint,65030,opt,name=svc_type,enum=danielvladco.protobuf.graphql.Type", - Filename: "danielvladco/protobuf/graphql.proto", + Filename: "pb/graphql.proto", }, { ExtendedType: (*descriptor.FieldOptions)(nil), @@ -171,90 +171,90 @@ var file_danielvladco_protobuf_graphql_proto_extTypes = []protoimpl.ExtensionInf Field: 65030, Name: "danielvladco.protobuf.graphql.field", Tag: "bytes,65030,opt,name=field", - Filename: "danielvladco/protobuf/graphql.proto", + Filename: "pb/graphql.proto", }, } // Extension fields to descriptor.MethodOptions. var ( // optional danielvladco.protobuf.graphql.Type rpc_type = 65030; - E_RpcType = &file_danielvladco_protobuf_graphql_proto_extTypes[0] + E_RpcType = &file_pb_graphql_proto_extTypes[0] ) // Extension fields to descriptor.ServiceOptions. var ( // optional danielvladco.protobuf.graphql.Type svc_type = 65030; - E_SvcType = &file_danielvladco_protobuf_graphql_proto_extTypes[1] + E_SvcType = &file_pb_graphql_proto_extTypes[1] ) // Extension fields to descriptor.FieldOptions. var ( // optional danielvladco.protobuf.graphql.Field field = 65030; - E_Field = &file_danielvladco_protobuf_graphql_proto_extTypes[2] + E_Field = &file_pb_graphql_proto_extTypes[2] ) -var File_danielvladco_protobuf_graphql_proto protoreflect.FileDescriptor - -var file_danielvladco_protobuf_graphql_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, - 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x71, 0x6c, 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, 0x4f, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x64, 0x69, 0x72, 0x73, 0x2a, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, - 0x4d, 0x55, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, - 0x45, 0x52, 0x59, 0x10, 0x02, 0x3a, 0x60, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x79, 0x70, - 0x65, 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, +var File_pb_graphql_proto protoreflect.FileDescriptor + +var file_pb_graphql_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x70, 0x62, 0x2f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x1d, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, + 0x6c, 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, 0x4f, 0x0a, 0x05, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x64, 0x69, 0x72, 0x73, 0x2a, 0x2c, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4d, 0x55, 0x54, + 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x51, 0x55, 0x45, 0x52, 0x59, + 0x10, 0x02, 0x3a, 0x60, 0x0a, 0x08, 0x72, 0x70, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 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, 0x86, + 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, + 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x72, 0x70, 0x63, + 0x54, 0x79, 0x70, 0x65, 0x3a, 0x61, 0x0a, 0x08, 0x73, 0x76, 0x63, 0x5f, 0x74, 0x79, 0x70, 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, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, - 0x72, 0x70, 0x63, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x61, 0x0a, 0x08, 0x73, 0x76, 0x63, 0x5f, 0x74, - 0x79, 0x70, 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, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x64, - 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x07, 0x73, 0x76, 0x63, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x5b, 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, 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x6e, - 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x1f, 0x5a, 0x1d, 0x64, 0x61, 0x6e, 0x69, 0x65, - 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x3b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, + 0x73, 0x76, 0x63, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x5b, 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, + 0x86, 0xfc, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, + 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x05, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, 0x6f, 0x2f, + 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x70, 0x62, 0x3b, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, } var ( - file_danielvladco_protobuf_graphql_proto_rawDescOnce sync.Once - file_danielvladco_protobuf_graphql_proto_rawDescData = file_danielvladco_protobuf_graphql_proto_rawDesc + file_pb_graphql_proto_rawDescOnce sync.Once + file_pb_graphql_proto_rawDescData = file_pb_graphql_proto_rawDesc ) -func file_danielvladco_protobuf_graphql_proto_rawDescGZIP() []byte { - file_danielvladco_protobuf_graphql_proto_rawDescOnce.Do(func() { - file_danielvladco_protobuf_graphql_proto_rawDescData = protoimpl.X.CompressGZIP(file_danielvladco_protobuf_graphql_proto_rawDescData) +func file_pb_graphql_proto_rawDescGZIP() []byte { + file_pb_graphql_proto_rawDescOnce.Do(func() { + file_pb_graphql_proto_rawDescData = protoimpl.X.CompressGZIP(file_pb_graphql_proto_rawDescData) }) - return file_danielvladco_protobuf_graphql_proto_rawDescData + return file_pb_graphql_proto_rawDescData } -var file_danielvladco_protobuf_graphql_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_danielvladco_protobuf_graphql_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_danielvladco_protobuf_graphql_proto_goTypes = []interface{}{ +var file_pb_graphql_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_pb_graphql_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_pb_graphql_proto_goTypes = []interface{}{ (Type)(0), // 0: danielvladco.protobuf.graphql.Type (*Field)(nil), // 1: danielvladco.protobuf.graphql.Field (*descriptor.MethodOptions)(nil), // 2: google.protobuf.MethodOptions (*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions (*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions } -var file_danielvladco_protobuf_graphql_proto_depIdxs = []int32{ +var file_pb_graphql_proto_depIdxs = []int32{ 2, // 0: danielvladco.protobuf.graphql.rpc_type:extendee -> google.protobuf.MethodOptions 3, // 1: danielvladco.protobuf.graphql.svc_type:extendee -> google.protobuf.ServiceOptions 4, // 2: danielvladco.protobuf.graphql.field:extendee -> google.protobuf.FieldOptions @@ -268,13 +268,13 @@ var file_danielvladco_protobuf_graphql_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_danielvladco_protobuf_graphql_proto_init() } -func file_danielvladco_protobuf_graphql_proto_init() { - if File_danielvladco_protobuf_graphql_proto != nil { +func init() { file_pb_graphql_proto_init() } +func file_pb_graphql_proto_init() { + if File_pb_graphql_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_danielvladco_protobuf_graphql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_pb_graphql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Field); i { case 0: return &v.state @@ -291,20 +291,20 @@ func file_danielvladco_protobuf_graphql_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_danielvladco_protobuf_graphql_proto_rawDesc, + RawDescriptor: file_pb_graphql_proto_rawDesc, NumEnums: 1, NumMessages: 1, NumExtensions: 3, NumServices: 0, }, - GoTypes: file_danielvladco_protobuf_graphql_proto_goTypes, - DependencyIndexes: file_danielvladco_protobuf_graphql_proto_depIdxs, - EnumInfos: file_danielvladco_protobuf_graphql_proto_enumTypes, - MessageInfos: file_danielvladco_protobuf_graphql_proto_msgTypes, - ExtensionInfos: file_danielvladco_protobuf_graphql_proto_extTypes, + GoTypes: file_pb_graphql_proto_goTypes, + DependencyIndexes: file_pb_graphql_proto_depIdxs, + EnumInfos: file_pb_graphql_proto_enumTypes, + MessageInfos: file_pb_graphql_proto_msgTypes, + ExtensionInfos: file_pb_graphql_proto_extTypes, }.Build() - File_danielvladco_protobuf_graphql_proto = out.File - file_danielvladco_protobuf_graphql_proto_rawDesc = nil - file_danielvladco_protobuf_graphql_proto_goTypes = nil - file_danielvladco_protobuf_graphql_proto_depIdxs = nil + File_pb_graphql_proto = out.File + file_pb_graphql_proto_rawDesc = nil + file_pb_graphql_proto_goTypes = nil + file_pb_graphql_proto_depIdxs = nil } diff --git a/pb/danielvladco/protobuf/graphql.proto b/pb/graphql.proto similarity index 89% rename from pb/danielvladco/protobuf/graphql.proto rename to pb/graphql.proto index 39f50d8..e57b674 100644 --- a/pb/danielvladco/protobuf/graphql.proto +++ b/pb/graphql.proto @@ -1,7 +1,7 @@ syntax = "proto2"; package danielvladco.protobuf.graphql; -option go_package = "danielvladco/protobuf;graphql"; +option go_package = "github.com/danielvladco/go-proto-gql/pb;graphql"; import "google/protobuf/descriptor.proto"; diff --git a/pb/pb.go b/pb/pb.go deleted file mode 100644 index 08d0c5d..0000000 --- a/pb/pb.go +++ /dev/null @@ -1,3 +0,0 @@ -package gql - -//go:generate protoc --go_out=. danielvladco/protobuf/graphql.proto diff --git a/pb/types.go b/pb/types.go deleted file mode 100644 index b70a0b2..0000000 --- a/pb/types.go +++ /dev/null @@ -1,172 +0,0 @@ -package gql - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/any" -) - -type DummyResolver struct{} - -func (r *DummyResolver) Dummy(ctx context.Context) (*bool, error) { return nil, nil } - -func MarshalBytes(b []byte) Marshaler { - return WriterFunc(func(w io.Writer) { - _, _ = fmt.Fprintf(w, "%q", string(b)) - }) -} - -func UnmarshalBytes(v interface{}) ([]byte, error) { - switch v := v.(type) { - case string: - return []byte(v), nil - case *string: - return []byte(*v), nil - case []byte: - return v, nil - case json.RawMessage: - return []byte(v), nil - default: - return nil, fmt.Errorf("%T is not []byte", v) - } -} - -func MarshalAny(any any.Any) Marshaler { - return WriterFunc(func(w io.Writer) { - d := &ptypes.DynamicAny{} - if err := ptypes.UnmarshalAny(&any, d); err != nil { - panic("unable to unmarshal any: " + err.Error()) - return - } - - if err := json.NewEncoder(w).Encode(d.Message); err != nil { - panic("unable to encode json: " + err.Error()) - } - }) -} - -func UnmarshalAny(v interface{}) (any.Any, error) { - switch v := v.(type) { - case []byte: - return any.Any{}, nil //TODO add an unmarshal mechanism - case json.RawMessage: - return any.Any{}, nil - default: - return any.Any{}, fmt.Errorf("%T is not json.RawMessage", v) - } -} - -func MarshalInt32(any int32) Marshaler { - return WriterFunc(func(w io.Writer) { - _, _ = w.Write([]byte(strconv.Itoa(int(any)))) - }) -} - -func UnmarshalInt32(v interface{}) (int32, error) { - switch v := v.(type) { - case int: - return int32(v), nil - case int32: - return v, nil - case json.Number: - i, err := v.Int64() - return int32(i), err - default: - return 0, fmt.Errorf("%T is not int32", v) - } -} - -func MarshalInt64(any int64) Marshaler { - return WriterFunc(func(w io.Writer) { - _, _ = w.Write([]byte(strconv.Itoa(int(any)))) - }) -} - -func UnmarshalInt64(v interface{}) (int64, error) { - switch v := v.(type) { - case int: - return int64(v), nil - case int64: - return v, nil - case json.Number: - i, err := v.Int64() - return i, err - default: - return 0, fmt.Errorf("%T is not int32", v) - } -} - -func MarshalUint32(any uint32) Marshaler { - return WriterFunc(func(w io.Writer) { - _, _ = w.Write([]byte(strconv.Itoa(int(any)))) - }) -} - -func UnmarshalUint32(v interface{}) (uint32, error) { - switch v := v.(type) { - case int: - return uint32(v), nil - case uint32: - return v, nil - case json.Number: - i, err := v.Int64() - return uint32(i), err - default: - return 0, fmt.Errorf("%T is not int32", v) - } -} - -func MarshalUint64(any uint64) Marshaler { - return WriterFunc(func(w io.Writer) { - _, _ = w.Write([]byte(strconv.Itoa(int(any)))) - }) -} - -func UnmarshalUint64(v interface{}) (uint64, error) { - switch v := v.(type) { - case int: - return uint64(v), nil - case uint64: - return v, nil //TODO add an unmarshal mechanism - case json.Number: - i, err := v.Int64() - return uint64(i), err - default: - return 0, fmt.Errorf("%T is not uint64", v) - } -} - -func MarshalFloat32(any float32) Marshaler { - return WriterFunc(func(w io.Writer) { - _, _ = w.Write([]byte(strconv.Itoa(int(any)))) - }) -} - -func UnmarshalFloat32(v interface{}) (float32, error) { - switch v := v.(type) { - case int: - return float32(v), nil - case float32: - return v, nil - case json.Number: - f, err := v.Float64() - return float32(f), err - default: - return 0, fmt.Errorf("%T is not float32", v) - } -} - -type Marshaler interface { - MarshalGQL(w io.Writer) -} - -type WriterFunc func(writer io.Writer) - -func (f WriterFunc) MarshalGQL(w io.Writer) { - f(w) -} diff --git a/pkg/generator/callstack.go b/pkg/generator/callstack.go new file mode 100644 index 0000000..e5b25ff --- /dev/null +++ b/pkg/generator/callstack.go @@ -0,0 +1,51 @@ +package generator + +type Callstack interface { + Push(entry interface{}) + Pop(entry interface{}) + Has(entry interface{}) bool + Free() + Len() int +} + +func NewCallstack() Callstack { + return &callstack{stack: make(map[interface{}]int), index: 0} +} + +type callstack struct { + stack map[interface{}]int + sorted []string + index int +} + +func (c *callstack) Free() { + c.stack = make(map[interface{}]int) + c.index = 0 +} + +func (c *callstack) Pop(entry interface{}) { + delete(c.stack, entry) + c.index-- +} + +func (c *callstack) Push(entry interface{}) { + c.stack[entry] = c.index + c.index++ +} + +func (c *callstack) List() []interface{} { + res := make([]interface{}, len(c.stack)) + for s, si := range c.stack { + res[si] = s + } + return res +} + +func (c *callstack) Has(entry interface{}) bool { + _, ok := c.stack[entry] + return ok +} + +func (c *callstack) Len() int { + return len(c.stack) +} diff --git a/reflect/gateway/internal/generator/object-definition.go b/pkg/generator/descriptors.go similarity index 84% rename from reflect/gateway/internal/generator/object-definition.go rename to pkg/generator/descriptors.go index 4d758c2..a950d81 100644 --- a/reflect/gateway/internal/generator/object-definition.go +++ b/pkg/generator/descriptors.go @@ -1,13 +1,11 @@ package generator import ( - "reflect" "strings" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/any" "github.com/jhump/protoreflect/desc" "github.com/vektah/gqlparser/v2/ast" + any "google.golang.org/protobuf/types/known/anypb" ) type ObjectDescriptor struct { @@ -68,11 +66,7 @@ func isEmpty(o *desc.MessageDescriptor, callstack Callstack) bool { return true } +// TODO maybe not compare by strings func IsAny(o *desc.MessageDescriptor) bool { - messageType := proto.MessageType(o.GetFullyQualifiedName()) - if messageType == nil { - return false - } - _, ok := reflect.New(messageType).Elem().Interface().(*any.Any) - return ok + return string((&any.Any{}).ProtoReflect().Descriptor().FullName()) == o.GetFullyQualifiedName() } diff --git a/reflect/gateway/internal/generator/generator.go b/pkg/generator/generator.go similarity index 79% rename from reflect/gateway/internal/generator/generator.go rename to pkg/generator/generator.go index c0cdded..175845d 100644 --- a/reflect/gateway/internal/generator/generator.go +++ b/pkg/generator/generator.go @@ -2,25 +2,20 @@ package generator import ( "fmt" - gql "github.com/danielvladco/go-proto-gql/pb" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/jhump/protoreflect/desc" - "github.com/vektah/gqlparser/v2/ast" "strconv" "strings" -) -func NewSchemas(files []*desc.FileDescriptor, mergeSchemas bool) (SchemaDescriptorList, error) { - schema := &SchemaDescriptor{ - Schema: &ast.Schema{ - Directives: map[string]*ast.DirectiveDefinition{}, - Types: map[string]*ast.Definition{}, - }, - reservedNames: graphqlReservedNames, - } + "github.com/jhump/protoreflect/desc" + "github.com/vektah/gqlparser/v2/ast" + "google.golang.org/protobuf/proto" + descriptor "google.golang.org/protobuf/types/descriptorpb" + gqlpb "github.com/danielvladco/go-proto-gql/pb" +) + +func NewSchemas(files []*desc.FileDescriptor, mergeSchemas, genServiceDesc bool) (schemas SchemaDescriptorList, _ error) { if mergeSchemas { + schema := NewSchemaDescriptor(genServiceDesc) for _, file := range files { err := generateFile(file, schema) if err != nil { @@ -31,21 +26,22 @@ func NewSchemas(files []*desc.FileDescriptor, mergeSchemas bool) (SchemaDescript return []*SchemaDescriptor{schema}, nil } - var schemas []*SchemaDescriptor for _, file := range files { - schema := *schema - err := generateFile(file, &schema) + schema := NewSchemaDescriptor(genServiceDesc) + err := generateFile(file, schema) if err != nil { return nil, err } - schemas = append(schemas, &schema) + schemas = append(schemas, schema) } - return schemas, nil + return } func generateFile(file *desc.FileDescriptor, schema *SchemaDescriptor) error { + schema.FileDescriptors = append(schema.FileDescriptors, file) + for _, svc := range file.GetServices() { for _, rpc := range svc.GetMethods() { in, err := schema.CreateObjects(rpc.GetInputType(), true) @@ -66,16 +62,16 @@ func generateFile(file *desc.FileDescriptor, schema *SchemaDescriptor) error { schema.GetSubscription().addMethod(schema.createMethod(svc, rpc, in, out)) } else { switch getMethodType(rpc) { - case gql.Type_DEFAULT: + case gqlpb.Type_DEFAULT: switch ttt := getServiceType(svc); ttt { - case gql.Type_DEFAULT, gql.Type_MUTATION: + case gqlpb.Type_DEFAULT, gqlpb.Type_MUTATION: schema.GetMutation().addMethod(schema.createMethod(svc, rpc, in, out)) - case gql.Type_QUERY: + case gqlpb.Type_QUERY: schema.GetQuery().addMethod(schema.createMethod(svc, rpc, in, out)) } - case gql.Type_MUTATION: + case gqlpb.Type_MUTATION: schema.GetMutation().addMethod(schema.createMethod(svc, rpc, in, out)) - case gql.Type_QUERY: + case gqlpb.Type_QUERY: schema.GetQuery().addMethod(schema.createMethod(svc, rpc, in, out)) } } @@ -89,49 +85,28 @@ type SchemaDescriptorList []*SchemaDescriptor func (s SchemaDescriptorList) AsGraphql() (astSchema []*ast.Schema) { for _, ss := range s { - queryDef := ss.GetQuery().Definition - mutationDef := ss.GetMutation().Definition - subscriptionsDef := ss.GetSubscription().Definition - ss.Schema.Query = queryDef - ss.Schema.Types["Query"] = queryDef - if ss.query.methods == nil { - ss.Schema.Query.Fields = append(ss.Schema.Query.Fields, &ast.FieldDefinition{ - Name: "dummy", - Type: ast.NamedType("Boolean", &ast.Position{}), - }) - } else { - for _, m := range ss.query.methods { - ss.Schema.Query.Fields = append(ss.Schema.Query.Fields, m.AsGraphql()) - } - } - if ss.mutation.methods != nil { - ss.Schema.Mutation = mutationDef - ss.Schema.Types["Mutation"] = mutationDef - - for _, m := range ss.mutation.methods { - ss.Schema.Mutation.Fields = append(ss.Schema.Mutation.Fields, m.AsGraphql()) - } - } - if ss.subscription.methods != nil { - ss.Schema.Subscription = subscriptionsDef - ss.Schema.Types["Subscription"] = subscriptionsDef - for _, m := range ss.subscription.methods { - ss.Schema.Subscription.Fields = append(ss.Schema.Subscription.Fields, m.AsGraphql()) - } - } - - for _, o := range ss.objects { - def := o.AsGraphql() - ss.Schema.Types[def.Name] = def - } - - astSchema = append(astSchema, ss.Schema) + astSchema = append(astSchema, ss.AsGraphql()) } return } +func NewSchemaDescriptor(genServiceDesc bool) *SchemaDescriptor { + return &SchemaDescriptor{ + Schema: &ast.Schema{ + Directives: map[string]*ast.DirectiveDefinition{}, + Types: map[string]*ast.Definition{}, + }, + reservedNames: graphqlReservedNames, + createdObjects: map[createdObjectKey]*ObjectDescriptor{}, + generateServiceDescriptors: genServiceDesc, + } +} + type SchemaDescriptor struct { *ast.Schema + + FileDescriptors []*desc.FileDescriptor + files []*desc.FileDescriptor query *RootDefinition @@ -140,7 +115,43 @@ type SchemaDescriptor struct { objects []*ObjectDescriptor - reservedNames map[string]desc.Descriptor + reservedNames map[string]desc.Descriptor + createdObjects map[createdObjectKey]*ObjectDescriptor + + generateServiceDescriptors bool +} + +type createdObjectKey struct { + desc desc.Descriptor + input bool +} + +func (s *SchemaDescriptor) AsGraphql() *ast.Schema { + queryDef := s.GetQuery().Definition + mutationDef := s.GetMutation().Definition + subscriptionsDef := s.GetSubscription().Definition + s.Schema.Query = queryDef + s.Schema.Types["Query"] = queryDef + if s.query.methods == nil { + s.Schema.Query.Fields = append(s.Schema.Query.Fields, &ast.FieldDefinition{ + Name: "dummy", + Type: ast.NamedType("Boolean", &ast.Position{}), + }) + } + if s.mutation.methods != nil { + s.Schema.Mutation = mutationDef + s.Schema.Types["Mutation"] = mutationDef + } + if s.subscription.methods != nil { + s.Schema.Subscription = subscriptionsDef + s.Schema.Types["Subscription"] = subscriptionsDef + } + + for _, o := range s.objects { + def := o.AsGraphql() + s.Schema.Types[def.Name] = def + } + return s.Schema } func (s *SchemaDescriptor) Objects() []*ObjectDescriptor { @@ -172,7 +183,7 @@ func (s *SchemaDescriptor) GetQuery() *RootDefinition { // make name be unique // just create a map and register every name func (s *SchemaDescriptor) uniqueName(d desc.Descriptor, input bool) (name string) { - if input { + if _, ok := d.(*desc.MessageDescriptor); input && ok { name = strings.Title(CamelCaseSlice(strings.Split(strings.TrimPrefix(d.GetFullyQualifiedName(), d.GetFile().GetPackage()+"."), ".")) + "Input") } else { name = strings.Title(CamelCaseSlice(strings.Split(strings.TrimPrefix(d.GetFullyQualifiedName(), d.GetFile().GetPackage()+"."), "."))) @@ -211,16 +222,21 @@ func (s *SchemaDescriptor) createObjects(d desc.Descriptor, input bool, callstac if d == nil { return } + if obj, ok := s.createdObjects[createdObjectKey{d, input}]; ok { + return obj, nil + } callstack.Push(d) // if add a return statement dont forget to clean stack - defer callstack.Pop(d) + defer func() { + callstack.Pop(d) + s.createdObjects[createdObjectKey{d, input}] = obj + }() switch dd := d.(type) { case *desc.MessageDescriptor: if IsEmpty(dd) { - return nil, nil + return obj, nil } if IsAny(dd) { - any := s.createScalar("Any", "Any is any json type") - s.objects = append(s.objects, any) + any := s.createScalar(s.uniqueName(dd, false), "Any is any json type") return any, nil } @@ -229,13 +245,20 @@ func (s *SchemaDescriptor) createObjects(d desc.Descriptor, input bool, callstac kind = ast.InputObject } fields := FieldDescriptorList{} + outputOneofRegistrar := map[*desc.OneOfDescriptor]struct{}{} + for _, df := range dd.GetFields() { var fieldDirective []*ast.Directive if callstack.Has(df.GetMessageType()) { continue } + if oneof := df.GetOneOf(); oneof != nil { if !input { + if _, ok := outputOneofRegistrar[oneof]; ok { + continue + } + outputOneofRegistrar[oneof] = struct{}{} field, err := s.createUnion(oneof, callstack) if err != nil { return nil, err @@ -265,7 +288,9 @@ func (s *SchemaDescriptor) createObjects(d desc.Descriptor, input bool, callstac if err != nil { return nil, err } - + if obj == nil && df.GetMessageType() != nil { + continue + } f, err := s.createField(df, obj) if err != nil { return nil, err @@ -300,14 +325,6 @@ func (s *SchemaDescriptor) createObjects(d desc.Descriptor, input bool, callstac panic(fmt.Sprintf("received unexpected value %v of type %T", dd, dd)) } - //if obj.IsEmpty() { - // return obj, nil - //} - //if obj.IsAny() { - // any := s.createScalar("Any", "Any is any json type") - // s.objects = append(s.objects, any) - // return any, nil - //} s.objects = append(s.objects, obj) return obj, nil } @@ -431,18 +448,15 @@ func getDescription(descs ...desc.Descriptor) string { func (s *SchemaDescriptor) createMethod(svc *desc.ServiceDescriptor, rpc *desc.MethodDescriptor, in, out *ObjectDescriptor) *MethodDescriptor { var args ast.ArgumentDefinitionList - if in != nil && in.Descriptor != nil && !IsEmpty(in.Descriptor.(*desc.MessageDescriptor)) { + if in != nil && (in.Descriptor != nil && !IsEmpty(in.Descriptor.(*desc.MessageDescriptor)) || in.Definition.Kind == ast.Scalar) { args = append(args, &ast.ArgumentDefinition{ - Description: "", - DefaultValue: nil, - Name: "in", - Type: ast.NamedType(in.Name, &ast.Position{}), - Directives: nil, - Position: &ast.Position{}, + Name: "in", + Type: ast.NamedType(in.Name, &ast.Position{}), + Position: &ast.Position{}, }) } objType := ast.NamedType("Boolean", &ast.Position{}) - if out != nil && out.Descriptor != nil && !IsEmpty(out.Descriptor.(*desc.MessageDescriptor)) { + if out != nil && (out.Descriptor != nil && !IsEmpty(out.Descriptor.(*desc.MessageDescriptor)) || in.Definition.Kind == ast.Scalar) { objType = ast.NamedType(out.Name, &ast.Position{}) } @@ -462,18 +476,19 @@ func (s *SchemaDescriptor) createMethod(svc *desc.ServiceDescriptor, rpc *desc.M Name: ToLowerFirst(svc.GetName()) + strings.Title(rpc.GetName()), Arguments: args, Type: objType, - Directives: []*ast.Directive{{ - Name: svcDir.Name, - Position: &ast.Position{}, - Definition: svcDir, - Location: svcDir.Locations[0], - }}, - Position: &ast.Position{}, + Position: &ast.Position{}, }, input: in, output: out, } - + if s.generateServiceDescriptors { + m.Directives = []*ast.Directive{{ + Name: svcDir.Name, + Position: &ast.Position{}, + Definition: svcDir, + Location: svcDir.Locations[0], + }} + } return m } @@ -568,7 +583,7 @@ func (s *SchemaDescriptor) createUnion(oneof *desc.OneOfDescriptor, callstack Ca Definition: &ast.Definition{ Kind: ast.Object, Description: getDescription(f), - Name: CamelCaseSlice(strings.Split(strings.Trim(oneof.GetName()+"."+strings.Title(f.GetName()), "."), ".")), + Name: CamelCaseSlice(strings.Split(strings.Trim(choice.GetParent().GetName()+"."+strings.Title(f.GetName()), "."), ".")), Fields: ast.FieldList{f.FieldDefinition}, Position: &ast.Position{}, }, @@ -614,11 +629,11 @@ func isRequired(field *desc.FieldDescriptor) bool { return false } -func graphqlFieldOptions(field *desc.FieldDescriptor) *gql.Field { +func graphqlFieldOptions(field *desc.FieldDescriptor) *gqlpb.Field { if field.GetOptions() != nil { - v, err := proto.GetExtension(field.GetOptions(), gql.E_Field) - if err == nil && v.(*gql.Field) != nil { - return v.(*gql.Field) + v := proto.GetExtension(field.AsFieldDescriptorProto().GetOptions(), gqlpb.E_Field) + if v != nil && v.(*gqlpb.Field) != nil { + return v.(*gqlpb.Field) } } return nil diff --git a/reflect/gateway/internal/generator/store.go b/pkg/generator/registry.go similarity index 70% rename from reflect/gateway/internal/generator/store.go rename to pkg/generator/registry.go index faad8c6..91f05d0 100644 --- a/reflect/gateway/internal/generator/store.go +++ b/pkg/generator/registry.go @@ -1,13 +1,11 @@ package generator import ( - "fmt" - "github.com/davecgh/go-spew/spew" "github.com/jhump/protoreflect/desc" "github.com/vektah/gqlparser/v2/ast" ) -type Repository interface { +type Registry interface { FindMethodByName(name string) *desc.MethodDescriptor FindObjectByName(name string) *desc.MessageDescriptor @@ -16,7 +14,7 @@ type Repository interface { FindFieldByName(msg desc.Descriptor, name string) *desc.FieldDescriptor } -func NewInmemRepository(files SchemaDescriptorList) Repository { +func NewRegistry(files SchemaDescriptorList) Registry { v := &repository{ methodsByName: map[string]*desc.MethodDescriptor{}, objectsByName: map[string]*desc.MessageDescriptor{}, @@ -32,23 +30,11 @@ func NewInmemRepository(files SchemaDescriptorList) Repository { for _, m := range f.Objects() { v.gqlFieldsByName[m.Descriptor] = map[string]*desc.FieldDescriptor{} for _, f := range m.GetFields() { - //for _, oneof := range msgDesc.GetOneOfs() { - // println(m.GetFullyQualifiedName(), f.Name, msgDesc.GetOneOfs()) - //} - // println(m.Descriptor, m.GetFullyQualifiedName(), f.Name, f.FieldDescriptor.GetName()) v.gqlFieldsByName[m.Descriptor][f.Name] = f.FieldDescriptor } switch msgDesc := m.Descriptor.(type) { case *desc.MessageDescriptor: - //v.gqlFieldsByName[m.Descriptor] = map[string]*desc.FieldDescriptor{} - //for _, f := range m.GetFields() { - // for _, oneof := range msgDesc.GetOneOfs() { - // println(m.GetFullyQualifiedName(), f.Name, msgDesc.GetOneOfs()) - // } - // //println(m.GetFullyQualifiedName(), f.Name, msgDesc.GetOneOfs()) - // v.gqlFieldsByName[m.Descriptor][f.Name] = f.FieldDescriptor - //} v.objectsByFQN[m.GetFullyQualifiedName()] = m v.objectsByName[m.Name] = msgDesc } @@ -83,8 +69,6 @@ func (r repository) FindObjectByFullyQualifiedName(fqn string) (*desc.MessageDes } func (r repository) FindFieldByName(msg desc.Descriptor, name string) *desc.FieldDescriptor { - fmt.Printf("%p, %q, %s \n", msg.(*desc.MessageDescriptor), name, msg.GetFullyQualifiedName()) - spew.Dump(r.gqlFieldsByName[msg]) f, _ := r.gqlFieldsByName[msg][name] return f } diff --git a/reflect/gateway/internal/generator/utils.go b/pkg/generator/utils.go similarity index 90% rename from reflect/gateway/internal/generator/utils.go rename to pkg/generator/utils.go index 39ab7fc..a7dd894 100644 --- a/reflect/gateway/internal/generator/utils.go +++ b/pkg/generator/utils.go @@ -1,40 +1,36 @@ package generator import ( - gql "github.com/danielvladco/go-proto-gql/pb" - "github.com/golang/protobuf/proto" - "github.com/jhump/protoreflect/desc" "strings" "unicode" "unicode/utf8" + + "github.com/jhump/protoreflect/desc" + "google.golang.org/protobuf/proto" + + gqlpb "github.com/danielvladco/go-proto-gql/pb" ) -func getMethodType(rpc *desc.MethodDescriptor) gql.Type { +func getMethodType(rpc *desc.MethodDescriptor) gqlpb.Type { if rpc.GetOptions() != nil { - v, err := proto.GetExtension(rpc.GetOptions(), gql.E_RpcType) - if err == nil { - tt := v.(*gql.Type) - if tt != nil { - return *tt - } + v := proto.GetExtension(rpc.AsMethodDescriptorProto().GetOptions(), gqlpb.E_RpcType) + if v != nil { + return v.(gqlpb.Type) } } - return gql.Type_DEFAULT + return gqlpb.Type_DEFAULT } -func getServiceType(svc *desc.ServiceDescriptor) gql.Type { +func getServiceType(svc *desc.ServiceDescriptor) gqlpb.Type { if svc.GetOptions() != nil { - v, err := proto.GetExtension(svc.GetOptions(), gql.E_SvcType) - if err == nil { - tt := v.(*gql.Type) - if tt != nil { - return *tt - } + v := proto.GetExtension(svc.AsServiceDescriptorProto().GetOptions(), gqlpb.E_SvcType) + if v != nil { + return v.(gqlpb.Type) } } - return gql.Type_DEFAULT + return gqlpb.Type_DEFAULT } // Split splits the camelcase word and returns a list of words. It also diff --git a/reflect/gateway/internal/reflection/fetch.go b/pkg/reflection/fetch.go similarity index 100% rename from reflect/gateway/internal/reflection/fetch.go rename to pkg/reflection/fetch.go diff --git a/reflect/gateway/internal/server/grpc.go b/pkg/server/grpc.go similarity index 97% rename from reflect/gateway/internal/server/grpc.go rename to pkg/server/grpc.go index 870c186..3e79452 100644 --- a/reflect/gateway/internal/server/grpc.go +++ b/pkg/server/grpc.go @@ -10,7 +10,7 @@ import ( "github.com/jhump/protoreflect/dynamic/grpcdynamic" "google.golang.org/grpc" - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/reflection" + "github.com/danielvladco/go-proto-gql/pkg/reflection" ) type Caller interface { diff --git a/reflect/gateway/internal/server/queryer.go b/pkg/server/queryer.go similarity index 98% rename from reflect/gateway/internal/server/queryer.go rename to pkg/server/queryer.go index 165de78..d719d75 100644 --- a/reflect/gateway/internal/server/queryer.go +++ b/pkg/server/queryer.go @@ -5,7 +5,6 @@ import ( "encoding/base64" "errors" "fmt" - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/generator" "log" "reflect" "time" @@ -19,16 +18,18 @@ import ( "github.com/nautilus/graphql" "github.com/vektah/gqlparser/v2/ast" "google.golang.org/protobuf/types/known/anypb" + + "github.com/danielvladco/go-proto-gql/pkg/generator" ) type any = map[string]interface{} -func NewQueryer(pm generator.Repository, caller Caller) graphql.Queryer { +func NewQueryer(pm generator.Registry, caller Caller) graphql.Queryer { return &queryer{pm: pm, c: caller} } type queryer struct { - pm generator.Repository + pm generator.Registry c Caller } diff --git a/pkg/types/any.go b/pkg/types/any.go new file mode 100644 index 0000000..20c3ac9 --- /dev/null +++ b/pkg/types/any.go @@ -0,0 +1,37 @@ +package types + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/99designs/gqlgen/graphql" + "github.com/golang/protobuf/ptypes" + "google.golang.org/protobuf/types/known/anypb" +) + +// TODO create mapping for proto to graphql types to unmarshal any +func MarshalAny(any *anypb.Any) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + d := &ptypes.DynamicAny{} + if err := ptypes.UnmarshalAny(any, d); err != nil { + panic("unable to unmarshal any: " + err.Error()) + return + } + + if err := json.NewEncoder(w).Encode(d.Message); err != nil { + panic("unable to encode json: " + err.Error()) + } + }) +} + +func UnmarshalAny(v interface{}) (*anypb.Any, error) { + switch v := v.(type) { + case []byte: + return &anypb.Any{}, nil //TODO add an unmarshal mechanism + case json.RawMessage: + return &anypb.Any{}, nil + default: + return &anypb.Any{}, fmt.Errorf("%T is not json.RawMessage", v) + } +} diff --git a/pkg/types/bytes.go b/pkg/types/bytes.go new file mode 100644 index 0000000..fde2d09 --- /dev/null +++ b/pkg/types/bytes.go @@ -0,0 +1,30 @@ +package types + +import ( + "encoding/json" + "fmt" + "io" + + "github.com/99designs/gqlgen/graphql" +) + +func MarshalBytes(b []byte) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + _, _ = fmt.Fprintf(w, "%q", string(b)) + }) +} + +func UnmarshalBytes(v interface{}) ([]byte, error) { + switch v := v.(type) { + case string: + return []byte(v), nil + case *string: + return []byte(*v), nil + case []byte: + return v, nil + case json.RawMessage: + return []byte(v), nil + default: + return nil, fmt.Errorf("%T is not []byte", v) + } +} diff --git a/pkg/types/float32.go b/pkg/types/float32.go new file mode 100644 index 0000000..6d5ffdc --- /dev/null +++ b/pkg/types/float32.go @@ -0,0 +1,30 @@ +package types + +import ( + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/99designs/gqlgen/graphql" +) + +func MarshalFloat32(any float32) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + _, _ = w.Write([]byte(strconv.Itoa(int(any)))) + }) +} + +func UnmarshalFloat32(v interface{}) (float32, error) { + switch v := v.(type) { + case int: + return float32(v), nil + case float32: + return v, nil + case json.Number: + f, err := v.Float64() + return float32(f), err + default: + return 0, fmt.Errorf("%T is not float32", v) + } +} diff --git a/pkg/types/uint32.go b/pkg/types/uint32.go new file mode 100644 index 0000000..6cb6d18 --- /dev/null +++ b/pkg/types/uint32.go @@ -0,0 +1,37 @@ +package types + +import ( + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/99designs/gqlgen/graphql" +) + +func MarshalUint32(i uint32) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + io.WriteString(w, strconv.FormatUint(uint64(i), 10)) + }) +} + +func UnmarshalUint32(v interface{}) (uint32, error) { + switch v := v.(type) { + case string: + ui64, err := strconv.ParseUint(v, 10, 32) + return uint32(ui64), err + case int: + return uint32(v), nil + case uint: + return uint32(v), nil + case int32: + return uint32(v), nil + case uint32: + return v, nil + case json.Number: + ui64, err := strconv.ParseUint(string(v), 10, 32) + return uint32(ui64), err + default: + return 0, fmt.Errorf("%T is not an int", v) + } +} diff --git a/pkg/types/uint64.go b/pkg/types/uint64.go new file mode 100644 index 0000000..c11c9c5 --- /dev/null +++ b/pkg/types/uint64.go @@ -0,0 +1,35 @@ +package types + +import ( + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/99designs/gqlgen/graphql" +) + +func MarshalUint64(i uint64) graphql.Marshaler { + return graphql.WriterFunc(func(w io.Writer) { + io.WriteString(w, strconv.FormatUint(i, 10)) + }) +} + +func UnmarshalUint64(v interface{}) (uint64, error) { + switch v := v.(type) { + case string: + return strconv.ParseUint(v, 10, 64) + case int: + return uint64(v), nil + case uint: + return uint64(v), nil + case int64: + return uint64(v), nil + case uint64: + return v, nil + case json.Number: + return strconv.ParseUint(string(v), 10, 64) + default: + return 0, fmt.Errorf("%T is not an int", v) + } +} diff --git a/plugin/callstack.go b/plugin/callstack.go deleted file mode 100644 index 409e205..0000000 --- a/plugin/callstack.go +++ /dev/null @@ -1,52 +0,0 @@ -package plugin - -type Callstack interface { - Push(entry string) - Pop(entry string) - Has(entry string) bool - Free() - List() []string - Len() int -} - -func NewCallstack() Callstack { - return &callstack{stack: make(map[string]int), index: 0} -} - -type callstack struct { - stack map[string]int - sorted []string - index int -} - -func (c *callstack) Free() { - c.stack = make(map[string]int) - c.index = 0 -} - -func (c *callstack) Pop(entry string) { - delete(c.stack, entry) - c.index-- -} - -func (c *callstack) Push(entry string) { - c.stack[entry] = c.index - c.index++ -} - -func (c *callstack) List() []string { - res := make([]string, len(c.stack)) - for s, si := range c.stack { - res[si] = s - } - return res -} - -func (c *callstack) Has(entry string) bool { - _, ok := c.stack[entry] - return ok -} - -func (c *callstack) Len() int { - return len(c.stack) -} diff --git a/plugin/camelcase.go b/plugin/camelcase.go deleted file mode 100644 index 0a955c9..0000000 --- a/plugin/camelcase.go +++ /dev/null @@ -1,150 +0,0 @@ -package plugin - -import ( - "strings" - "unicode" - "unicode/utf8" -) - -// Split splits the camelcase word and returns a list of words. It also -// supports digits. Both lower camel case and upper camel case are supported. -// For more info please check: http://en.wikipedia.org/wiki/CamelCase -// -// Examples -// -// "" => [""] -// "lowercase" => ["lowercase"] -// "Class" => ["Class"] -// "MyClass" => ["My", "Class"] -// "MyC" => ["My", "C"] -// "HTML" => ["HTML"] -// "PDFLoader" => ["PDF", "Loader"] -// "AString" => ["A", "String"] -// "SimpleXMLParser" => ["Simple", "XML", "Parser"] -// "vimRPCPlugin" => ["vim", "RPC", "Plugin"] -// "GL11Version" => ["GL", "11", "Version"] -// "99Bottles" => ["99", "Bottles"] -// "May5" => ["May", "5"] -// "BFG9000" => ["BFG", "9000"] -// "BöseÜberraschung" => ["Böse", "Überraschung"] -// "Two spaces" => ["Two", " ", "spaces"] -// "BadUTF8\xe2\xe2\xa1" => ["BadUTF8\xe2\xe2\xa1"] -// -// Splitting rules -// -// 1) If string is not valid UTF-8, return it without splitting as -// single item array. -// 2) Assign all unicode characters into one of 4 sets: lower case -// letters, upper case letters, numbers, and all other characters. -// 3) Iterate through characters of string, introducing splits -// between adjacent characters that belong to different sets. -// 4) Iterate through array of split strings, and if a given string -// is upper case: -// if subsequent string is lower case: -// move last character of upper case string to beginning of -// lower case string -func SplitCamelCase(src string) (entries []string) { - // don't split invalid utf8 - if !utf8.ValidString(src) { - return []string{src} - } - entries = []string{} - var runes [][]rune - lastClass := 0 - class := 0 - // split into fields based on class of unicode character - for _, r := range src { - switch true { - case unicode.IsLower(r): - class = 1 - case unicode.IsUpper(r): - class = 2 - case unicode.IsDigit(r): - class = 3 - default: - class = 4 - } - if class == lastClass { - runes[len(runes)-1] = append(runes[len(runes)-1], r) - } else { - runes = append(runes, []rune{r}) - } - lastClass = class - } - // handle upper case -> lower case sequences, e.g. - // "PDFL", "oader" -> "PDF", "Loader" - for i := 0; i < len(runes)-1; i++ { - if unicode.IsUpper(runes[i][0]) && unicode.IsLower(runes[i+1][0]) { - runes[i+1] = append([]rune{runes[i][len(runes[i])-1]}, runes[i+1]...) - runes[i] = runes[i][:len(runes[i])-1] - } - } - // construct []string from results - for _, s := range runes { - if len(s) > 0 { - entries = append(entries, string(s)) - } - } - return -} - -// CamelCase returns the CamelCased name. -// If there is an interior underscore followed by a lower case letter, -// drop the underscore and convert the letter to upper case. -// There is a remote possibility of this rewrite causing a name collision, -// but it's so remote we're prepared to pretend it's nonexistent - since the -// C++ generator lowercases names, it's extremely unlikely to have two fields -// with different capitalizations. -// In short, _my_field_name_2 becomes XMyFieldName_2. -func CamelCase(s string) string { - if s == "" { - return "" - } - t := make([]byte, 0, 32) - i := 0 - if s[0] == '_' { - // Need a capital letter; drop the '_'. - t = append(t, 'X') - i++ - } - // Invariant: if the next letter is lower case, it must be converted - // to upper case. - // That is, we process a word at a time, where words are marked by _ or - // upper case letter. Digits are treated as words. - for ; i < len(s); i++ { - c := s[i] - if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { - continue // Skip the underscore in s. - } - if isASCIIDigit(c) { - t = append(t, c) - continue - } - // Assume we have a letter now - if not, it's a bogus identifier. - // The next word is a sequence of characters that must start upper case. - if isASCIILower(c) { - c ^= ' ' // Make it a capital letter. - } - t = append(t, c) // Guaranteed not lower case. - // Accept lower case sequence that follows. - for i+1 < len(s) && isASCIILower(s[i+1]) { - i++ - t = append(t, s[i]) - } - } - return string(t) -} - -// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to -// be joined with "_". -func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } - -// Is c an ASCII lower-case letter? -func isASCIILower(c byte) bool { - return 'a' <= c && c <= 'z' -} - -// Is c an ASCII digit? -func isASCIIDigit(c byte) bool { - return '0' <= c && c <= '9' -} diff --git a/plugin/helpers.go b/plugin/helpers.go deleted file mode 100644 index 0042e18..0000000 --- a/plugin/helpers.go +++ /dev/null @@ -1,81 +0,0 @@ -package plugin - -import ( - //"github.com/golang/protobuf/protoc-gen-go/generator" - "strings" - "unicode" - - "github.com/danielvladco/go-proto-gql/pb" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" -) - -func getEnum(file *descriptor.FileDescriptorProto, typeName string) *descriptor.EnumDescriptorProto { - for _, enum := range file.GetEnumType() { - if enum.GetName() == typeName { - return enum - } - } - - for _, msg := range file.GetMessageType() { - if nes := getNestedEnum(file, msg, strings.TrimPrefix(typeName, msg.GetName()+".")); nes != nil { - return nes - } - } - return nil -} - -func getNestedEnum(file *descriptor.FileDescriptorProto, msg *descriptor.DescriptorProto, typeName string) *descriptor.EnumDescriptorProto { - for _, enum := range msg.GetEnumType() { - if enum.GetName() == typeName { - return enum - } - } - - for _, nes := range msg.GetNestedType() { - if res := getNestedEnum(file, nes, strings.TrimPrefix(typeName, nes.GetName()+".")); res != nil { - return res - } - } - return nil -} - -func resolveRequired(field *descriptor.FieldDescriptorProto) bool { - if v := GetGqlFieldOptions(field); v != nil { - return v.GetRequired() - } - return false -} - -func ToLowerFirst(s string) string { - if len(s) > 0 { - return string(unicode.ToLower(rune(s[0]))) + s[1:] - } - return "" -} - -func GetGqlFieldOptions(field *descriptor.FieldDescriptorProto) *gql.Field { - if field.Options != nil { - v, err := proto.GetExtension(field.Options, gql.E_Field) - if err == nil && v.(*gql.Field) != nil { - return v.(*gql.Field) - } - } - return nil -} - -// Match parsing algorithm from Generator.CommandLineParameters -//func Params(gen *generator.Generator) map[string]string { -// params := make(map[string]string) -// -// for _, parameter := range strings.Split(gen.Request.GetParameter(), ",") { -// kvp := strings.SplitN(parameter, "=", 2) -// if len(kvp) != 2 { -// continue -// } -// -// params[kvp[0]] = kvp[1] -// } -// -// return params -//} diff --git a/plugin/models.go b/plugin/models.go deleted file mode 100644 index dd08162..0000000 --- a/plugin/models.go +++ /dev/null @@ -1,88 +0,0 @@ -package plugin - -import ( - "sort" - - "github.com/golang/protobuf/protoc-gen-go/descriptor" -) - -type stringSet map[string]struct{} - -func (s stringSet) Strings() (ss []string) { - slen, i := len(s), 0 - if slen > 0 { - ss = make([]string, slen) - } - for v := range s { - ss[i] = v - i++ - } - return -} - -type ModelDescriptor struct { - FQN string - BuiltIn bool - //PackageDir string - TypeName string - UsedAsInput bool - Index int - OneofTypes stringSet - Phony bool - - packageName string - originalPackage string -} - -type Method struct { - Name string - InputType string - OutputType string - Phony bool - ServiceIndex int - Index int - - *descriptor.MethodDescriptorProto - *descriptor.ServiceDescriptorProto -} - -type Methods []*Method - -func (ms Methods) NameExists(name string) bool { - for _, m := range ms { - if m.Name == name { - return true - } - } - return false -} - -type Type struct { - *descriptor.DescriptorProto - *descriptor.EnumDescriptorProto - ModelDescriptor -} - -type TypeMapList []*TypeMapEntry - -func (t TypeMapList) Len() int { return len(t) } -func (t TypeMapList) Less(i, j int) bool { return t[i].Key < t[j].Key } -func (t TypeMapList) Swap(i, j int) { t[i], t[j] = t[j], t[i] } - -func TypeMap2List(t map[string]*Type) (m TypeMapList) { - for key, val := range t { - m = append(m, &TypeMapEntry{Key: key, Value: val}) - } - sort.Sort(m) - return -} - -type TypeMapEntry struct { - Key string - Value *Type -} - -type OneofRef struct { - Parent *Type - Index int32 -} diff --git a/plugin/plugin.go b/plugin/plugin.go deleted file mode 100644 index f76f0e6..0000000 --- a/plugin/plugin.go +++ /dev/null @@ -1,609 +0,0 @@ -package plugin - -import ( - "errors" - "fmt" - "github.com/jhump/protoreflect/desc" - "log" - "os" - "reflect" - "strconv" - "strings" - - "github.com/danielvladco/go-proto-gql/pb" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/golang/protobuf/ptypes/any" - "github.com/vektah/gqlparser/v2/ast" -) - -const ( - ScalarBytes = "Bytes" - ScalarFloat32 = "Float32" - ScalarInt64 = "Int64" - ScalarInt32 = "Int32" - ScalarUint32 = "Uint32" - ScalarUint64 = "Uint64" - ScalarAnyInput = "AnyInput" - ScalarAny = "Any" - ScalarDirective = "__Directive" - ScalarType = "__Type" - ScalarField = "__Field" - ScalarEnumValue = "__EnumValue" - ScalarInputValue = "__InputValue" - ScalarSchema = "__Schema" - ScalarInt = "Int" - ScalarFloat = "Float" - ScalarString = "String" - ScalarBoolean = "Boolean" - ScalarID = "ID" -) - -func NewPlugin(protoFiles []*desc.FileDescriptor) *Plugin { - p := &Plugin{ - fileIndex: 0, - protoFiles: protoFiles, - //schemas: []*schema{{buffer: &bytes.Buffer{}}}, - gqlModelNames: []map[*Type]string{make(map[*Type]string)}, - fields: make(map[FieldKey]*descriptor.FieldDescriptorProto), - types: make(map[string]*Type), - inputs: make(map[string]*Type), - enums: make(map[string]*Type), - //maps: make(map[string]*Type), - oneofs: make(map[string]*Type), - oneofsRef: make(map[OneofRef]string), - oneofFakeTypes: make(map[string]struct{}), - scalars: map[string]*Type{ - "__Directive": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "__Type": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "__Field": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "__EnumValue": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "__InputValue": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "__Schema": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "Int": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "Float": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "String": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "Boolean": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - "ID": {ModelDescriptor: ModelDescriptor{BuiltIn: true}}, - }, - logger: log.New(os.Stderr, "protoc-gen-gogql: ", log.Lshortfile), - } - return p -} - -type FieldKey struct { - T *descriptor.DescriptorProto - F string -} -type Plugin struct { - protoFiles []*desc.FileDescriptor - //*generator.Generator - - // info for the current schema - mutations Methods - queries Methods - subscriptions Methods - inputs map[string]*Type // map containing string representation of proto message that is used as gql input - types map[string]*Type // map containing string representation of proto message that is used as gql type - enums map[string]*Type // map containing string representation of proto enum that is used as gql enum - scalars map[string]*Type - //maps map[string]*Type - oneofs map[string]*Type - - oneofsRef map[OneofRef]string // map containing reference to gql oneof names, we need this since oneofs cant fe found by name - oneofFakeTypes map[string]struct{} - - fields map[FieldKey]*descriptor.FieldDescriptorProto - - fileIndex int - //schemas []*schema - gqlModelNames []map[*Type]string // map containing reference to gql type names - - logger *log.Logger -} - -func (p *Plugin) FieldBack(t *descriptor.DescriptorProto, name string) *descriptor.FieldDescriptorProto { - return p.fields[FieldKey{t, name}] -} - -func (p *Plugin) Fields() map[FieldKey]*descriptor.FieldDescriptorProto { return p.fields } -func (p *Plugin) GetOneof(ref OneofRef) *Type { return p.oneofs[p.oneofsRef[ref]] } -func (p *Plugin) Oneofs() map[string]*Type { return p.oneofs } - -//func (p *Plugin) Maps() map[string]*Type { return p.maps } -func (p *Plugin) Scalars() map[string]*Type { return p.scalars } -func (p *Plugin) Enums() map[string]*Type { return p.enums } -func (p *Plugin) Types() map[string]*Type { return p.types } -func (p *Plugin) Inputs() map[string]*Type { return p.inputs } -func (p *Plugin) Subscriptions() Methods { return p.subscriptions } -func (p *Plugin) Queries() Methods { return p.queries } -func (p *Plugin) Mutations() Methods { return p.mutations } - -//func (p *Plugin) GetSchemaByIndex(index int) *bytes.Buffer { return p.schemas[index].buffer } - -func (p *Plugin) IsAny(typeName string) (ok bool) { - messageType := proto.MessageType(strings.TrimPrefix(typeName, ".")) - if messageType == nil { - return false - } - _, ok = reflect.New(messageType).Elem().Interface().(*any.Any) - return ok -} - -// same isEmpty but for mortals -func (p *Plugin) IsEmpty(t *Type) bool { return p.isEmpty(t, make(map[*Type]struct{})) } - -// make sure objects are fulled with all types -func (p *Plugin) isEmpty(t *Type, callstack map[*Type]struct{}) bool { - callstack[t] = struct{}{} // don't forget to free stack on calling return when needed - - if t.DescriptorProto != nil { - if len(t.DescriptorProto.GetField()) == 0 { - return true - } else { - for _, f := range t.GetField() { - if f.GetType() != descriptor.FieldDescriptorProto_TYPE_MESSAGE { - delete(callstack, t) - return false - } - fieldType, ok := p.inputs[f.GetTypeName()] - if !ok { - if fieldType, ok = p.types[f.GetTypeName()]; !ok { - if fieldType, ok = p.enums[f.GetTypeName()]; !ok { - if fieldType, ok = p.scalars[f.GetTypeName()]; !ok { - if fieldType, ok = p.oneofs[f.GetTypeName()]; !ok { - continue - } - } - } - } - } - - // check if the call stack already contains a reference to this type and prevent it from calling itself again - if _, ok := callstack[fieldType]; ok { - return true - } - if !p.isEmpty(fieldType, callstack) { - delete(callstack, t) - return false - } - } - delete(callstack, t) - return true - } - } - delete(callstack, t) - return false -} - -func (p *Plugin) Error(err error, msgs ...string) { - s := strings.Join(msgs, " ") + ":" + err.Error() - _ = p.logger.Output(2, s) - os.Exit(1) -} - -func (p *Plugin) Warn(msgs ...interface{}) { - _ = p.logger.Output(2, fmt.Sprintln(append([]interface{}{"WARN: "}, msgs...)...)) -} - -// recursively goes trough all fields of the types from messages map and fills it with child types. -// i. e. if message Type1 { Type2: field1 = 1; } exists in the map this function will look up Type2 and add Type2 to the map as well -func (p *Plugin) FillTypeMap(typeName string, messages map[string]*Type, inputField bool) { - p.fillTypeMap(typeName, messages, inputField, NewCallstack()) -} -func (p *Plugin) fillTypeMap(typeName string, objects map[string]*Type, inputField bool, callstack Callstack) { - callstack.Push(typeName) // if add a return statement dont forget to clean stack - defer callstack.Pop(typeName) - - for _, file := range p.protoFiles { - if enum := p.getEnumType(file.AsFileDescriptorProto(), typeName); enum != nil { - if enum.EnumDescriptorProto != nil { - p.enums[typeName] = enum - continue - } - } - - // Any is considered to be scalar - if p.IsAny(typeName) { - if inputField { - p.scalars[typeName] = &Type{ - //DescriptorProto: m.DescriptorProto, - ModelDescriptor: ModelDescriptor{ - //PackageDir: "github.com/danielvladco/go-proto-gql/pb", //TODO generate gqlgen.yml - TypeName: ScalarAnyInput, - FQN: typeName, - }, - } - } else { - p.oneofs[typeName] = &Type{ - //DescriptorProto: m.DescriptorProto, - ModelDescriptor: ModelDescriptor{ - //PackageDir: "github.com/danielvladco/go-proto-gql/pb", //TODO generate gqlgen.yml - TypeName: ScalarAny, - FQN: typeName, - }, - } - } - delete(objects, typeName) - return - } - - if message := p.getMessageType(typeName); message != nil { - //if message.DescriptorProto.GetOptions().GetMapEntry() { // if the message is a map - // message.UsedAsInput = inputField - // p.maps[typeName] = message - //} else { - objects[typeName] = message - //} - - for _, field := range message.GetField() { - if field.OneofIndex != nil { - p.createOneofFromParent(message.OneofDecl[field.GetOneofIndex()].GetName(), message, callstack, inputField, field, file.AsFileDescriptorProto(), objects) - continue - } - - // defines scalars for unsupported graphql types - switch *field.Type { - case descriptor.FieldDescriptorProto_TYPE_BYTES: - p.scalars[ScalarBytes] = &Type{ModelDescriptor: ModelDescriptor{TypeName: ScalarBytes}} - - case descriptor.FieldDescriptorProto_TYPE_FLOAT: - p.scalars[ScalarFloat32] = &Type{ModelDescriptor: ModelDescriptor{TypeName: ScalarFloat32}} - - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_SINT64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64: - p.scalars[ScalarInt64] = &Type{ModelDescriptor: ModelDescriptor{TypeName: ScalarInt64}} - - case descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32: - p.scalars[ScalarInt32] = &Type{ModelDescriptor: ModelDescriptor{TypeName: ScalarInt32}} - - case descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32: - p.scalars[ScalarUint32] = &Type{ModelDescriptor: ModelDescriptor{TypeName: ScalarUint32}} - - case descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64: - p.scalars[ScalarUint64] = &Type{ModelDescriptor: ModelDescriptor{TypeName: ScalarUint64}} - } - - if field.GetType() != descriptor.FieldDescriptorProto_TYPE_MESSAGE && field.GetType() != descriptor.FieldDescriptorProto_TYPE_ENUM { - continue - } - - // check if already called and do nothing - if callstack.Has(field.GetTypeName()) { - continue - } - - p.fillTypeMap(field.GetTypeName(), objects, inputField, callstack) - } - - return // we know that it is not possible for multiple messages to have the same name - } - } -} - -// creates oneof type with full path name -func (p *Plugin) createOneofFromParent(name string, parent *Type, callstack Callstack, inputField bool, field *descriptor.FieldDescriptorProto, file *descriptor.FileDescriptorProto, objects map[string]*Type) { - oneofName := "" - for _, typeName := range callstack.List() { - oneofName += "." - oneofName += objects[typeName].DescriptorProto.GetName() - } - - // the name of the generated type - fieldType := "." + strings.Trim(parent.originalPackage, ".") + oneofName + "_" + strings.Title(CamelCase(field.GetName())) - uniqueOneofName := "." + strings.Trim(parent.originalPackage, ".") + oneofName + "." + name - - // create types for each field - if !inputField { - p.oneofFakeTypes[fieldType] = struct{}{} - objects[fieldType] = &Type{ - DescriptorProto: &descriptor.DescriptorProto{ - Field: []*descriptor.FieldDescriptorProto{{TypeName: field.TypeName, Name: field.Name, Type: field.Type, Options: field.Options}}, - }, - ModelDescriptor: ModelDescriptor{ - Phony: true, - TypeName: CamelCaseSlice(strings.Split(strings.Trim(oneofName+"."+strings.Title(field.GetName()), "."), ".")), - //PackageDir: parent.PackageDir, - Index: 0, - packageName: parent.packageName, - originalPackage: parent.originalPackage, - UsedAsInput: inputField, - }, - } - } - - // create type for a Oneof construct - if _, ok := p.oneofs[uniqueOneofName]; !ok { - p.oneofs[uniqueOneofName] = &Type{ - ModelDescriptor: ModelDescriptor{ - Phony: true, - OneofTypes: map[string]struct{}{fieldType: {}}, - originalPackage: parent.originalPackage, - packageName: parent.packageName, - UsedAsInput: inputField, - Index: 0, - //PackageDir: parent.PackageDir, - TypeName: CamelCaseSlice(strings.Split("Is"+strings.Trim(oneofName+"."+name, "."), ".")), - }, - } - } else { - p.oneofs[uniqueOneofName].OneofTypes[fieldType] = struct{}{} - } - p.oneofsRef[OneofRef{Parent: parent, Index: field.GetOneofIndex()}] = uniqueOneofName -} - -func (p *Plugin) ObjectNamed(typeName string) *desc.MessageDescriptor { - typeName = strings.TrimPrefix(typeName, ".") - for _, f := range p.protoFiles { - msg := f.FindMessage(typeName) - if msg != nil { - return msg - } - } - return nil -} - -func (p *Plugin) getMessageType(typeName string) *Type { - if _, ok := p.oneofFakeTypes[typeName]; ok { - return nil - } - - m := p.ObjectNamed(typeName) - if m == nil { - return nil - } - return &Type{DescriptorProto: m.AsDescriptorProto(), ModelDescriptor: ModelDescriptor{ - TypeName: CamelCaseSlice(strings.Split(strings.TrimPrefix(m.GetFullyQualifiedName(), m.GetFile().GetPackage()+"."), ".")), - //PackageDir: p.getImportPath(m.File().FileDescriptorProto), - originalPackage: m.GetFile().GetPackage(), - packageName: strings.Replace(m.GetFile().GetPackage(), ".", "_", -1) + "_", - }} -} - -// FIXME -func (p *Plugin) getEnumType(file *descriptor.FileDescriptorProto, typeName string) *Type { - packagePrefix := "." + file.GetPackage() + "." - if strings.HasPrefix(typeName, packagePrefix) { - typeWithoutPrefix := strings.TrimPrefix(typeName, packagePrefix) - if e := getEnum(file, typeWithoutPrefix); e != nil { - return &Type{EnumDescriptorProto: e, ModelDescriptor: ModelDescriptor{ - TypeName: CamelCaseSlice(strings.Split(typeWithoutPrefix, ".")), - //PackageDir: p.getImportPath(file), - originalPackage: file.GetPackage(), - packageName: strings.Replace(file.GetPackage(), ".", "_", -1) + "_", - }} - } - } - return nil -} - -func (p *Plugin) generateUniqueGraphqlSymbols(gqlModels map[string]*Type, entries map[string]*Type, suffix ...string) { - for _, entry := range entries { - - entryName := entry.ModelDescriptor.TypeName - if entryName == "" { - continue - } - - for _, sf := range suffix { - entryName += sf - } - - originalName := entryName - for uniqueSuffix := 0; ; uniqueSuffix++ { - _, ok := gqlModels[entryName] - if !ok { - break - } - if uniqueSuffix == 0 { - entryName = entry.packageName + originalName - continue - } - entryName = entry.packageName + originalName + strconv.Itoa(uniqueSuffix) - } - - p.gqlModelNames[p.fileIndex][entry] = entryName - gqlModels[entryName] = entry - } -} - -func (p *Plugin) getMethodType(rpc *descriptor.MethodDescriptorProto) gql.Type { - if rpc.Options != nil { - v, err := proto.GetExtension(rpc.Options, gql.E_RpcType) - if err == nil { - tt := v.(*gql.Type) - if tt != nil { - return *tt - } - } - } - - return gql.Type_DEFAULT -} - -func (p *Plugin) getServiceType(svc *descriptor.ServiceDescriptorProto) gql.Type { - if svc.Options != nil { - v, err := proto.GetExtension(svc.Options, gql.E_SvcType) - if err == nil { - tt := v.(*gql.Type) - if tt != nil { - return *tt - } - } - } - - return gql.Type_DEFAULT -} - -func (p *Plugin) checkInitialized() { - if p.fileIndex == -1 { - panic("file is not initialized! please use the InitFile(file) method for the file you want to generate code") - } -} - -func (p *Plugin) GraphQLField(t *descriptor.DescriptorProto, f *descriptor.FieldDescriptorProto) string { - dd := ToLowerFirst(CamelCase(f.GetName())) - p.fields[FieldKey{t, dd}] = f - return dd -} - -func (p *Plugin) GraphQLType(field *descriptor.FieldDescriptorProto, input bool) (gqltype *ast.Type) { - p.checkInitialized() - gqltype = &ast.Type{Position: &ast.Position{}} - switch field.GetType() { - case descriptor.FieldDescriptorProto_TYPE_DOUBLE, - descriptor.FieldDescriptorProto_TYPE_FLOAT: - gqltype.NamedType = ScalarFloat - - case descriptor.FieldDescriptorProto_TYPE_BYTES: - gqltype.NamedType = ScalarBytes - - case descriptor.FieldDescriptorProto_TYPE_INT64, - descriptor.FieldDescriptorProto_TYPE_SINT64, - descriptor.FieldDescriptorProto_TYPE_SFIXED64, - descriptor.FieldDescriptorProto_TYPE_INT32, - descriptor.FieldDescriptorProto_TYPE_SINT32, - descriptor.FieldDescriptorProto_TYPE_SFIXED32, - descriptor.FieldDescriptorProto_TYPE_UINT32, - descriptor.FieldDescriptorProto_TYPE_FIXED32, - descriptor.FieldDescriptorProto_TYPE_UINT64, - descriptor.FieldDescriptorProto_TYPE_FIXED64: - gqltype.NamedType = ScalarInt - - case descriptor.FieldDescriptorProto_TYPE_BOOL: - gqltype.NamedType = ScalarBoolean - - case descriptor.FieldDescriptorProto_TYPE_STRING: - gqltype.NamedType = ScalarString - - case descriptor.FieldDescriptorProto_TYPE_GROUP: - p.Error(errors.New("proto2 groups are not supported please use proto3 syntax")) - - case descriptor.FieldDescriptorProto_TYPE_ENUM: - gqltype.NamedType = p.gqlModelNames[p.fileIndex][p.enums[field.GetTypeName()]] - - case descriptor.FieldDescriptorProto_TYPE_MESSAGE: - if input { - if msg, ok := p.inputs[field.GetTypeName()]; ok { - // TODO try to bring oneofs here - //if field.OneofIndex != nil { - //} - - gqltype.NamedType = p.gqlModelNames[p.fileIndex][msg] - } else if scalar, ok := p.scalars[field.GetTypeName()]; ok { - gqltype.NamedType = p.gqlModelNames[p.fileIndex][scalar] - //} else if mp, ok := p.maps[field.GetTypeName()]; ok { - // gqltype.NamedType = p.gqlModelNames[p.fileIndex][mp] - // return - } else { - panic("unknown proto field type") - } - } else { - if msg, ok := p.types[field.GetTypeName()]; ok { - // TODO try to bring oneofs here - //if field.OneofIndex != nil { - //} - - gqltype.NamedType = p.gqlModelNames[p.fileIndex][msg] - } else if oneof, ok := p.oneofs[field.GetTypeName()]; ok { - gqltype.NamedType = p.gqlModelNames[p.fileIndex][oneof] - //} else if mp, ok := p.maps[field.GetTypeName()]; ok { - // gqltype.NamedType = p.gqlModelNames[p.fileIndex][mp] - // return - } else { - panic("unknown proto field type") - } - } - - default: - panic("unknown proto field type") - } - - if field.GetLabel() == descriptor.FieldDescriptorProto_LABEL_REPEATED { - gqltype = ast.ListType(gqltype, &ast.Position{}) - gqltype.Elem.NonNull = true - } - if resolveRequired(field) { - gqltype.NonNull = true - } - - return -} -func (p *Plugin) GqlModelNames() map[*Type]string { - p.checkInitialized() - return p.gqlModelNames[p.fileIndex] -} - -func (p *Plugin) defineMethods(file *descriptor.FileDescriptorProto) { - for svci, svc := range file.GetService() { - for rpci, rpc := range svc.GetMethod() { - m := &Method{ - Name: ToLowerFirst(svc.GetName()) + strings.Title(rpc.GetName()), - InputType: rpc.GetInputType(), - OutputType: rpc.GetOutputType(), - ServiceIndex: svci, - Index: rpci, - MethodDescriptorProto: rpc, - ServiceDescriptorProto: svc, - } - - if rpc.GetClientStreaming() && rpc.GetServerStreaming() { - p.mutations = append(p.mutations, &Method{ - Name: ToLowerFirst(svc.GetName()) + strings.Title(rpc.GetName()), - InputType: rpc.GetInputType(), - OutputType: "", - Phony: true, - ServiceIndex: svci, - Index: rpci, - MethodDescriptorProto: rpc, - ServiceDescriptorProto: svc, - }) - } - - if rpc.GetServerStreaming() { - p.subscriptions = append(p.subscriptions, m) - } else { - switch p.getMethodType(rpc) { - case gql.Type_DEFAULT: - switch ttt := p.getServiceType(svc); ttt { - case gql.Type_DEFAULT, gql.Type_MUTATION: - p.mutations = append(p.mutations, m) - case gql.Type_QUERY: - p.queries = append(p.queries, m) - } - case gql.Type_MUTATION: - p.mutations = append(p.mutations, m) - case gql.Type_QUERY: - p.queries = append(p.queries, m) - } - } - p.inputs[rpc.GetInputType()] = &Type{} - p.types[rpc.GetOutputType()] = &Type{} - } - } -} - -func (p *Plugin) InitFile(file *desc.FileDescriptor) { - p.defineMethods(file.AsFileDescriptorProto()) - // get all input messages - for inputName := range p.inputs { - p.FillTypeMap(inputName, p.inputs, true) - } - - // get all type messages - for typeName := range p.types { - p.FillTypeMap(typeName, p.types, false) - } - gqlTypes := make(map[string]*Type) - - p.generateUniqueGraphqlSymbols(gqlTypes, p.enums) - p.generateUniqueGraphqlSymbols(gqlTypes, p.scalars) - p.generateUniqueGraphqlSymbols(gqlTypes, p.oneofs) - p.generateUniqueGraphqlSymbols(gqlTypes, p.inputs, "Input") - p.generateUniqueGraphqlSymbols(gqlTypes, p.types) -} diff --git a/protoc-gen-gogql/main.go b/protoc-gen-gogql/main.go new file mode 100644 index 0000000..1b08e6d --- /dev/null +++ b/protoc-gen-gogql/main.go @@ -0,0 +1,258 @@ +package main + +import ( + "fmt" + "strings" + + "google.golang.org/protobuf/compiler/protogen" + "google.golang.org/protobuf/reflect/protoreflect" + + "github.com/danielvladco/go-proto-gql/pkg/generator" +) + +func main() { + + protogen.Options{}.Run(Generate) +} + +var ( + ioPkg = protogen.GoImportPath("io") + fmtPkg = protogen.GoImportPath("fmt") + graphqlPkg = protogen.GoImportPath("github.com/99designs/gqlgen/graphql") + contextPkg = protogen.GoImportPath("context") +) + +func Generate(p *protogen.Plugin) error { + + for _, file := range p.Files { + if !file.Generate { + continue + } + g := p.NewGeneratedFile(file.GeneratedFilenamePrefix+".gqlgen.pb.go", file.GoImportPath) + g.P("package ", file.GoPackageName) + //InitFile(file) + for _, svc := range file.Services { + g.P(`type `, svc.GoName, `Resolvers struct { Service `, svc.GoName, `Server }`) + for _, rpc := range svc.Methods { + // TODO handle streaming + if rpc.Desc.IsStreamingClient() || rpc.Desc.IsStreamingServer() { + continue + } + + //TODO better logic + methodName := strings.Replace(generator.CamelCase(string(svc.Desc.Name())+string(rpc.Desc.Name())), "_", "", -1) + methodNameSplit := generator.SplitCamelCase(methodName) + var methodNameSplitNew []string + for _, m := range methodNameSplit { + if m == "id" || m == "Id" { + m = "ID" + } + methodNameSplitNew = append(methodNameSplitNew, m) + } + methodName = strings.Join(methodNameSplitNew, "") + + typeIn := g.QualifiedGoIdent(rpc.Input.GoIdent) + typeOut := g.QualifiedGoIdent(rpc.Output.GoIdent) + in, inref := ", in *"+typeIn, ", in" + if IsEmpty(rpc.Input) { + in, inref = "", ", &"+typeIn+"{}" + } + if IsEmpty(rpc.Output) { + g.P("func (s *", svc.GoName, "Resolvers) ", methodName, "(ctx ", contextPkg.Ident("Context"), in, ") (*bool, error) { _, err := s.Service.", rpc.GoName, "(ctx", inref, ")\n return nil, err }") + } else { + g.P("func (s *", svc.GoName, "Resolvers) ", methodName, "(ctx ", contextPkg.Ident("Context"), in, ") (*", typeOut, ", error) { return s.Service.", rpc.GoName, "(ctx", inref, ") }") + } + } + } + + generateMapsAndOneofs(g, file.Messages) + generateEnums(g, file.Enums) + } + return nil +} + +// TODO logic for generation in case the package is different than that of generated protobufs +// This is basically working code + +func generateEnums(g *protogen.GeneratedFile, enums []*protogen.Enum) { + for _, enum := range enums { + enumType := enum.GoIdent.GoName + g.P(` +func Marshal`, enumType, `(x `, enumType, `) `, graphqlPkg.Ident("Marshaler"), ` { + return `, graphqlPkg.Ident("WriterFunc"), `(func(w `, ioPkg.Ident("Writer"), `) { + _, _ = `, fmtPkg.Ident("Fprintf"), `(w, "%q", x.String()) + }) +} + +func Unmarshal`, enumType, ` (v interface{}) (`, enumType, `, error) { + code, ok := v.(string) + if ok { + return `, enumType, `(`, enumType, `_value[code]), nil + } + return 0, `, fmtPkg.Ident("Errorf"), `("cannot unmarshal `, enumType, ` enum") +} +`) + } +} + +func generateMapsAndOneofs(g *protogen.GeneratedFile, messages []*protogen.Message) { + //var resolvers []*protogen.Message + for _, msg := range messages { + if msg.Desc.IsMapEntry() { + var ( + //mapName = msg.Fields + //mapType = fieldGoType(g, protoreflect.MessageKind, msg, nil) + keyType, _ = fieldGoType(g, msg.Fields[0], true) + valType, _ = fieldGoType(g, msg.Fields[1], true) + ) + + g.P(` +type `, msg.GoIdent.GoName, `Input = `, msg.GoIdent.GoName, ` +type `, msg.GoIdent.GoName, ` struct { + Key `, keyType, ` + Value `, valType, ` +} +`) + } else { + g.P("type ", msg.GoIdent.GoName, "Input = ", msg.GoIdent) + } + var mapResolver bool + for _, f := range msg.Fields { + if f.Message == nil || !f.Message.Desc.IsMapEntry() { + continue + } + if !mapResolver { + g.P("type ", msg.GoIdent.GoName, "Resolvers struct{}") + g.P("type ", msg.GoIdent.GoName, "InputResolvers struct{}") + } + mapResolver = true + g.P(` + +func (r `, msg.GoIdent.GoName, `Resolvers) `, f.GoName, `(_ `, contextPkg.Ident("Context"), `, obj *`, msg.GoIdent, `) (list []*`, f.Message.GoIdent, `, _ error) { + for k,v := range obj.`, f.GoName, ` { + list = append(list, &`, f.Message.GoIdent, `{ + Key: k, + Value: v, + }) + } + return +} + +func (m `, msg.GoIdent.GoName, `InputResolvers) `, f.GoName, `(_ `, contextPkg.Ident("Context"), `, obj *`, msg.GoIdent, `, data []*`, f.Message.GoIdent, `) error { + for _, v := range data { + obj.`, f.GoName, `[v.Key] = v.Value + } + return nil +} +`) + } + + var oneofResolver bool + for _, oneof := range msg.Oneofs { + if !oneofResolver { + g.P("type ", msg.GoIdent.GoName, "Resolvers struct{}") + g.P("type ", msg.GoIdent.GoName, "InputResolvers struct{}") + } + oneofResolver = true + for _, f := range oneof.Fields { + goFieldType, isPointer := fieldGoType(g, f, false) + drawRef := "" + if !isPointer { + drawRef = "*" + } + g.P(` +func (o `, msg.GoIdent.GoName, `InputResolvers) `, f.GoName, `(_ `, contextPkg.Ident("Context"), `, obj *`, msg.GoIdent, `, data *`, goFieldType, `) error { + obj.`, oneof.GoName, ` = &`, f.GoIdent.GoName, `{`, f.GoName, `: `, drawRef, `data} + return nil +} +`) + } + g.P(` +func (o `, msg.GoIdent.GoName, `Resolvers) `, oneof.GoName, `(_ `, contextPkg.Ident("Context"), `, obj *`, msg.GoIdent, `) (`, oneof.GoIdent, `, error) { + return obj.`, oneof.GoName, `, nil +}`) + g.P(`type `, oneof.GoIdent, " interface{}") + } + generateEnums(g, msg.Enums) + generateMapsAndOneofs(g, msg.Messages) + } +} + +func noUnderscore(s string) string { + return strings.ReplaceAll(s, "_", "") +} + +// same isEmpty but for mortals +func IsEmpty(o *protogen.Message) bool { return isEmpty(o, generator.NewCallstack()) } + +// make sure objects are fulled with all objects +func isEmpty(o *protogen.Message, callstack generator.Callstack) bool { + callstack.Push(o) + defer callstack.Pop(o) + + if len(o.Fields) == 0 { + return true + } + for _, f := range o.Fields { + objType := f.Message + if objType == nil { + return false + } + + // check if the call stack already contains a reference to this type and prevent it from calling itself again + if callstack.Has(objType) { + return true + } + if !isEmpty(objType, callstack) { + return false + } + } + + return true +} + +func fieldGoType(g *protogen.GeneratedFile, field *protogen.Field, includePointer bool) (goType string, pointer bool) { + if field.Desc.IsWeak() { + return "struct{}", false + } + + //pointer = field.Desc.HasPresence() + switch field.Desc.Kind() { + case protoreflect.BoolKind: + goType = "bool" + case protoreflect.EnumKind: + goType = g.QualifiedGoIdent(field.Enum.GoIdent) + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + goType = "int32" + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + goType = "uint32" + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + goType = "int64" + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + goType = "uint64" + case protoreflect.FloatKind: + goType = "float32" + case protoreflect.DoubleKind: + goType = "float64" + case protoreflect.StringKind: + goType = "string" + case protoreflect.BytesKind: + goType = "[]byte" + pointer = false // rely on nullability of slices for presence + case protoreflect.MessageKind, protoreflect.GroupKind: + if includePointer { + goType = "*" + } + goType += g.QualifiedGoIdent(field.Message.GoIdent) + pointer = true + } + switch { + case field.Desc.IsList(): + return "[]" + goType, false + case field.Desc.IsMap(): + keyType, _ := fieldGoType(g, field.Message.Fields[0], includePointer) + valType, _ := fieldGoType(g, field.Message.Fields[1], includePointer) + return fmt.Sprintf("map[%v]%v", keyType, valType), false + } + return goType, pointer +} diff --git a/protoc-gen-gogqlgen/main.go b/protoc-gen-gogqlgen/main.go deleted file mode 100644 index 1d2a1f0..0000000 --- a/protoc-gen-gogqlgen/main.go +++ /dev/null @@ -1,178 +0,0 @@ -package main - -import ( - "fmt" - "io/ioutil" - "os" - "strings" - - gqlplugin "github.com/danielvladco/go-proto-gql/plugin" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/generator" -) - -func main() { - gen := generator.New() - - data, err := ioutil.ReadAll(os.Stdin) - if err != nil { - gen.Error(err, "reading input") - } - - if err := proto.Unmarshal(data, gen.Request); err != nil { - gen.Error(err, "parsing input proto") - } - - if len(gen.Request.FileToGenerate) == 0 { - gen.Fail("no files to generate") - } - - gen.CommandLineParameters(gen.Request.GetParameter()) - gen.WrapTypes() - gen.SetPackageNames() - gen.BuildTypeNameMap() - generator.RegisterPlugin(&plugin{ - enums: make(map[string]struct{}), - messages: make(map[string]struct{}), - Plugin: gqlplugin.NewPlugin(), - }) - gen.GenerateAllFiles() - - for i := 0; i < len(gen.Response.File); i++ { - gen.Response.File[i].Name = proto.String(strings.Replace(*gen.Response.File[i].Name, ".pb.go", ".gqlgen.pb.go", -1)) - } - - data, err = proto.Marshal(gen.Response) - if err != nil { - gen.Error(err, "failed to marshal output proto") - } - _, err = os.Stdout.Write(data) - if err != nil { - gen.Error(err, "failed to write output proto") - } -} - -type plugin struct { - *gqlplugin.Plugin - - enums map[string]struct{} - messages map[string]struct{} -} - -func (p *plugin) Name() string { return "gogqlgen" } -func (p *plugin) Init(g *generator.Generator) { p.Generator = g } -func (p *plugin) GenerateImports(file *generator.FileDescriptor) {} -func (p *plugin) Generate(file *generator.FileDescriptor) { - ioPkg := p.AddImport("io") - graphqlPkg := p.AddImport("github.com/danielvladco/go-proto-gql/pb") - jsonPkg := p.AddImport("encoding/json") - contextPkg := p.AddImport("context") - - p.Scalars() - for _, r := range p.Request.FileToGenerate { - if r == file.GetName() { - p.InitFile(file) - for _, svc := range file.GetService() { - p.Generator.P(`type `, svc.GetName(), `GQLServer struct { Service `, svc.GetName(), `Server }`) - for _, rpc := range svc.GetMethod() { - if rpc.GetClientStreaming() || rpc.GetServerStreaming() { - continue - } - methodName := strings.Replace(generator.CamelCase(svc.GetName()+rpc.GetName()), "_", "", -1) - methodNameSplit := gqlplugin.SplitCamelCase(methodName) - var methodNameSplitNew []string - for _, m := range methodNameSplit { - if m == "id" || m == "Id" { - m = "ID" - } - methodNameSplitNew = append(methodNameSplitNew, m) - } - methodName = strings.Join(methodNameSplitNew, "") - - p.RecordTypeUse(rpc.GetInputType()) - typeInObj := p.ObjectNamed(rpc.GetInputType()) - p.AddImport(typeInObj.GoImportPath()) - - p.RecordTypeUse(rpc.GetOutputType()) - typeOutObj := p.ObjectNamed(rpc.GetOutputType()) - typeIn := generator.CamelCaseSlice(typeInObj.TypeName()) - typeOut := generator.CamelCaseSlice(typeOutObj.TypeName()) - if p.DefaultPackageName(typeInObj) != "" { - typeIn = string(p.AddImport(typeInObj.GoImportPath())) + "." + typeIn - } - if p.DefaultPackageName(typeOutObj) != "" { - typeOut = string(p.AddImport(typeOutObj.GoImportPath())) + "." + typeOut - } - in, inref := ", in *"+typeIn, ", in" - if p.IsEmpty(p.Inputs()[rpc.GetInputType()]) { - in, inref = "", ", &"+typeIn+"{}" - } - if p.IsEmpty(p.Types()[rpc.GetOutputType()]) { - p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", contextPkg, ".Context", in, ") (*bool, error) { _, err := s.Service.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ")\n return nil, err }") - } else { - p.Generator.P("func (s *", svc.GetName(), "GQLServer) ", methodName, "(ctx ", contextPkg, ".Context", in, ") (*", typeOut, ", error) { return s.Service.", generator.CamelCase(rpc.GetName()), "(ctx", inref, ") }") - } - } - } - for _, msg := range file.GetMessageType() { - if msg.GetOptions().GetMapEntry() { - println("found a map!") - key, value := msg.GetField()[0], msg.GetField()[1] - - mapName := generator.CamelCaseSlice(msg.GetReservedName()) - keyType, _ := p.GoType(&generator.Descriptor{DescriptorProto: msg}, key) - valType, _ := p.GoType(&generator.Descriptor{DescriptorProto: msg}, value) - - mapType := fmt.Sprintf("map[%s]%s", keyType, valType) - p.Generator.P(` -func Marshal`, mapName, `(mp `, mapType, `) `, graphqlPkg, `.Marshaler { - return `, graphqlPkg, `.WriterFunc(func(w `, ioPkg, `.Writer) { - err := `, jsonPkg, `.NewEncoder(w).Encode(mp) - if err != nil { - panic("this map type is not supported") - } - }) -} - -func Unmarshal`, mapName, `(v interface{}) (mp `, mapType, `, err error) { - switch vv := v.(type) { - case []byte: - err = `, jsonPkg, `.Unmarshal(vv, &mp) - return mp, err - case `, jsonPkg, `.RawMessage: - err = `, jsonPkg, `.Unmarshal(vv, &mp) - return mp, err - default: - return nil, fmt.Errorf("%T is not `, mapType, `", v) - } -} -`) - } - for _, oneof := range msg.OneofDecl { - oneofName := append(msg.GetReservedName(), oneof.GetName()) - p.Generator.P(`type Is`, generator.CamelCaseSlice(oneofName), - " interface{\n\tis", generator.CamelCaseSlice(oneofName), "()\n}") - } - } - for _, enum := range file.GetEnumType() { - //log.Fatal(enum, enum.GetReservedName()) - enumType := generator.CamelCase(enum.GetName()) - p.Generator.P(` -func (c *`, enumType, `) UnmarshalGQL(v interface{}) error { - code, ok := v.(string) - if ok { - *c = `, enumType, `(`, enumType, `_value[code]) - return nil - } - return fmt.Errorf("cannot unmarshal `, enumType, ` enum") -} - -func (c `, enumType, `) MarshalGQL(w `, ioPkg, `.Writer) { - fmt.Fprintf(w, "%q", c.String()) -} -`) - } - - } - } -} diff --git a/protoc-gen-gql/main.go b/protoc-gen-gql/main.go index 8436f69..2e5dd0e 100644 --- a/protoc-gen-gql/main.go +++ b/protoc-gen-gql/main.go @@ -1,271 +1,114 @@ package main import ( - "fmt" + "bytes" "io/ioutil" + "log" "os" - "sort" + "path" + "path/filepath" "strconv" "strings" - . "github.com/danielvladco/go-proto-gql/plugin" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/generator" + "github.com/jhump/protoreflect/desc" + "github.com/vektah/gqlparser/v2/formatter" + "google.golang.org/protobuf/proto" + descriptor "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/pluginpb" + + "github.com/danielvladco/go-proto-gql/pkg/generator" ) func main() { - gen := generator.New() - - data, err := ioutil.ReadAll(os.Stdin) + in, err := ioutil.ReadAll(os.Stdin) if err != nil { - gen.Error(err, "reading input") + log.Fatal(err) } - - if err := proto.Unmarshal(data, gen.Request); err != nil { - gen.Error(err, "parsing input proto") + req := &pluginpb.CodeGeneratorRequest{} + if err := proto.Unmarshal(in, req); err != nil { + log.Fatal(err) } - serviceDirectives := false - if gogoimport, ok := Params(gen)["svcdir"]; ok { - serviceDirectives, err = strconv.ParseBool(gogoimport) - if err != nil { - gen.Error(err, "parsing svcdir option") - } - } - - p := &plugin{NewPlugin(), serviceDirectives} - - gen.CommandLineParameters(gen.Request.GetParameter()) - gen.WrapTypes() - gen.SetPackageNames() - gen.BuildTypeNameMap() - generator.RegisterPlugin(p) - gen.GenerateAllFiles() - - fileLen := len(gen.Response.GetFile()) - for i := 0; i < fileLen; i++ { - gen.Response.File[i].Name = proto.String(strings.Replace(gen.Response.File[i].GetName(), ".pb.go", ".pb.graphqls", -1)) - gen.Response.File[i].Content = proto.String(p.GetSchemaByIndex(i).String()) - } - data, err = proto.Marshal(gen.Response) + files, err := generate(req) + res := &pluginpb.CodeGeneratorResponse{File: files} if err != nil { - gen.Error(err, "failed to marshal output proto") + res.Error = proto.String(err.Error()) } - _, err = os.Stdout.Write(data) + + out, err := proto.Marshal(res) if err != nil { - gen.Error(err, "failed to write output proto") + log.Fatal(err) } -} - -type plugin struct { - *Plugin - serviceDirectives bool -} - -func (p *plugin) GenerateImports(file *generator.FileDescriptor) {} -func (p *plugin) Name() string { return "gql" } -func (p *plugin) Init(g *generator.Generator) { p.Generator = g } - -func (p *plugin) Generate(file *generator.FileDescriptor) { - for _, fileName := range p.Request.FileToGenerate { - if fileName == file.GetName() { - p.InitFile(file) - p.generate(file) - } + if _, err := os.Stdout.Write(out); err != nil { + log.Fatal(err) } } -func (p *plugin) generate(file *generator.FileDescriptor) { - p.P("# Code generated by protoc-gen-gogql. DO NOT EDIT") - p.P("# source: ", file.GetName(), "\n") - // TODO: add comments from proto to gql for documentation purposes to all elements. Currently are supported only a few - - if len(p.Oneofs()) > 0 { - p.P("directive @oneof(name: String) on INPUT_FIELD_DEFINITION\n") - } - - // Define a directive for each service, useful for service specific middleware - if p.serviceDirectives { - for _, svc := range file.Service { - p.P("directive @", svc.GetName(), "(name: String) on FIELD_DEFINITION\n") - } - } - - // scalars - for _, entry := range TypeMap2List(p.Scalars()) { - scalar := entry.Value - if !scalar.BuiltIn { - p.P("scalar ", p.GqlModelNames()[scalar], "\n") +func generate(req *pluginpb.CodeGeneratorRequest) (outFiles []*pluginpb.CodeGeneratorResponse_File, err error) { + var genServiceDesc bool + var merge bool + for _, param := range strings.Split(req.GetParameter(), ",") { + var value string + if i := strings.Index(param, "="); i >= 0 { + value, param = param[i+1:], param[0:i] } - } - - // maps - for _, entry := range TypeMap2List(p.Maps()) { - m := entry.Value - key, val := m.GetField()[0], m.GetField()[1] - - messagesIn := make(map[string]*Type) - if m.UsedAsInput { - messagesIn = p.Inputs() - } else { - messagesIn = p.Types() - } - p.P("# map with key: '", p.GraphQLType(key, nil), "' and value: '", p.GraphQLType(val, messagesIn), "'") - p.P("scalar ", p.GqlModelNames()[m], "\n") - } - - // render gql inputs - for _, entry := range TypeMap2List(p.Inputs()) { - protoTypeName, m := entry.Key, entry.Value - if p.IsEmpty(m) || p.IsAny(protoTypeName) { - continue - } - p.P("input ", p.GqlModelNames()[m], " {") - p.In() - for _, f := range m.GetField() { - opts := GetGqlFieldOptions(f) - if opts != nil { - if opts.Dirs != nil { - *opts.Dirs = strings.Trim(*opts.Dirs, " ") - } - } - - if typ, ok := p.Inputs()[f.GetTypeName()]; ok { - if p.IsEmpty(typ) { - continue - } + switch param { + case "svc": + if genServiceDesc, err = strconv.ParseBool(value); err != nil { + return nil, err } - oneof := "" - if f.OneofIndex != nil { - oneof = fmt.Sprintf("@oneof(name: %q)", p.GqlModelNames()[p.GetOneof(OneofRef{Parent: m, Index: f.GetOneofIndex()})]) + case "merge": + if merge, err = strconv.ParseBool(value); err != nil { + return nil, err } - p.P(p.GraphQLField(m.DescriptorProto, f), ": ", p.GraphQLType(f, p.Inputs()), " ", oneof, " ", opts.GetDirs()) } - p.Out() - p.P("}\n") } - - // render gql types - for _, entry := range TypeMap2List(p.Types()) { - protoTypeName, m := entry.Key, entry.Value - if p.IsEmpty(m) || p.IsAny(protoTypeName) { - continue - } - p.P("type ", p.GqlModelNames()[m], " {") - p.In() - oneofs := make(map[OneofRef]struct{}) - for _, f := range m.GetField() { - if f.OneofIndex != nil { - oneofRef := OneofRef{Parent: m, Index: *f.OneofIndex} - if _, ok := oneofs[oneofRef]; !ok { - p.P(p.GraphQLField(m, f), ": ", p.GqlModelNames()[p.GetOneof(oneofRef)]) - } - oneofs[oneofRef] = struct{}{} - continue - } - opts := GetGqlFieldOptions(f) - if opts != nil { - if opts.Params != nil { - *opts.Params = "(" + strings.Trim(*opts.Params, " ") + ")" - } - if opts.Dirs != nil { - *opts.Dirs = strings.Trim(*opts.Dirs, " ") - } - } - - if typ, ok := p.Types()[f.GetTypeName()]; ok { - if p.IsEmpty(typ) { - continue - } + dd, err := desc.CreateFileDescriptorsFromSet(&descriptor.FileDescriptorSet{ + File: req.GetProtoFile(), + }) + if err != nil { + return nil, err + } + var descs []*desc.FileDescriptor + for _, d := range dd { + for _, filename := range req.FileToGenerate { + if filename == d.GetName() { + descs = append(descs, d) } - - p.P(p.GraphQLField(m, f), opts.GetParams(), ": ", p.GraphQLType(f, p.Types()), " ", opts.GetDirs()) } - p.Out() - p.P("}\n") } - for _, entry := range TypeMap2List(p.Oneofs()) { - oneof := entry.Value - p.P("union ", p.GqlModelNames()[oneof], " = ", strings.Join(func() (ss []string) { - for typeName := range oneof.OneofTypes { - ss = append(ss, p.GqlModelNames()[p.Types()[typeName]]) - } - - sort.Sort(sort.StringSlice(ss)) - return ss - }(), " | "), "\n") + gqlDesc, err := generator.NewSchemas(descs, merge, genServiceDesc) + if err != nil { + return nil, err } + for _, schema := range gqlDesc { + buff := &bytes.Buffer{} + formatter.NewFormatter(buff).FormatSchema(schema.AsGraphql()) + protoFileName := schema.FileDescriptors[0].GetName() - // render enums - for _, entry := range TypeMap2List(p.Enums()) { - e := entry.Value - p.P("enum ", p.GqlModelNames()[e], " {") - p.In() - for _, v := range e.GetValue() { - p.P(v.GetName()) - } - p.Out() - p.P("}\n") + outFiles = append(outFiles, &pluginpb.CodeGeneratorResponse_File{ + Name: proto.String(resolveGraphqlFilename(protoFileName, merge)), + Content: proto.String(buff.String()), + }) } - if len(p.Mutations()) > 0 { - p.P("type Mutation {") - p.In() - p.renderMethod(p.Mutations()) - p.Out() - p.P("}\n") - } - if len(p.Queries()) > 0 { - p.P("type Query {") - p.In() - p.renderMethod(p.Queries()) - p.Out() - p.P("}\n") - } else { - p.P("type Query { dummy: Boolean }\n") - } - if len(p.Subscriptions()) > 0 { - p.P("type Subscription {") - p.In() - p.renderMethod(p.Subscriptions()) - p.Out() - p.P("}\n") - } + return } -func (p *plugin) renderMethod(methods []*Method) { - for _, m := range methods { - in, out := "", "Boolean" - - // some scalars can be used as inputs such as 'Any' - if scalar, ok := p.Scalars()[m.InputType]; ok { - if !p.IsEmpty(scalar) { - in = "(in: " + p.GqlModelNames()[scalar] + ")" - } - } else if input, ok := p.Inputs()[m.InputType]; ok { - if !p.IsEmpty(input) { - in = "(in: " + p.GqlModelNames()[input] + ")" +func resolveGraphqlFilename(protoFileName string, merge bool) string { + if merge { + gqlFileName := "schema.graphqls" + absProtoFileName, err := filepath.Abs(protoFileName) + if err == nil { + protoDirSlice := strings.Split(filepath.Dir(absProtoFileName), string(filepath.Separator)) + if len(protoDirSlice) > 0 { + gqlFileName = protoDirSlice[len(protoDirSlice)-1] + ".graphqls" } } - if scalar, ok := p.Scalars()[m.OutputType]; ok { - if !p.IsEmpty(scalar) { - in = "(in: " + p.GqlModelNames()[scalar] + ")" - } - } else if typ, ok := p.Types()[m.OutputType]; ok { - if !p.IsEmpty(typ) { - out = p.GqlModelNames()[typ] - } - } - - if m.Phony { - p.P("# See the Subscription with the same name") - } - // Define a directive for each service, useful for service specific middleware - serviceDirective := "" - if p.serviceDirectives { - serviceDirective = " @" + m.ServiceDescriptorProto.GetName() - } - p.P(m.Name, in, ": ", out, serviceDirective) + protoDir, _ := path.Split(protoFileName) + return path.Join(protoDir, gqlFileName) } + + return strings.TrimSuffix(protoFileName, path.Ext(protoFileName)) + ".graphqls" } diff --git a/protoc-gen-gqlgencfg/main.go b/protoc-gen-gqlgencfg/main.go deleted file mode 100644 index fcf0a57..0000000 --- a/protoc-gen-gqlgencfg/main.go +++ /dev/null @@ -1,120 +0,0 @@ -package main - -import ( - "errors" - "io/ioutil" - "os" - "path" - "strings" - - . "github.com/danielvladco/go-proto-gql/plugin" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/generator" - "gopkg.in/yaml.v2" -) - -func main() { - gen := generator.New() - - data, err := ioutil.ReadAll(os.Stdin) - if err != nil { - gen.Error(err, "reading input") - } - - if err := proto.Unmarshal(data, gen.Request); err != nil { - gen.Error(err, "parsing input proto") - } - - p := &plugin{Plugin: NewPlugin()} - gen.CommandLineParameters(gen.Request.GetParameter()) - gen.WrapTypes() - gen.SetPackageNames() - gen.BuildTypeNameMap() - generator.RegisterPlugin(p) - gen.GenerateAllFiles() - - fileLen := len(gen.Response.GetFile()) - for i := 0; i < fileLen; i++ { - gen.Response.File[i].Name = proto.String(strings.Replace(gen.Response.File[i].GetName(), ".pb.go", ".gqlgen.pb.yml", -1)) - _, file := path.Split(strings.Replace(gen.Response.File[i].GetName(), ".gqlgen.pb.yml", ".pb.graphqls", -1)) - p.config[i].SchemaFilename = []string{path.Join(".", file)} - b, err := yaml.Marshal(p.config[i]) - if err != nil { - p.Error(errors.New("cannot create codegen.yml")) - } - gen.Response.File[i].Content = proto.String(string(b)) - } - - data, err = proto.Marshal(gen.Response) - if err != nil { - gen.Error(err, "failed to marshal output proto") - } - _, err = os.Stdout.Write(data) - if err != nil { - gen.Error(err, "failed to write output proto") - } -} - -type plugin struct { - *Plugin - - config []*config -} - -func (p *plugin) GenerateImports(file *generator.FileDescriptor) {} -func (p *plugin) Name() string { return "gqlgencfg" } -func (p *plugin) Init(g *generator.Generator) { p.Generator = g } -func (p *plugin) Generate(file *generator.FileDescriptor) { - for _, fileName := range p.Request.FileToGenerate { - if fileName == file.GetName() { - p.InitFile(file) - - cfg := &config{ - SchemaFilename: []string{}, - Exec: packageConfig{Filename: "exec.go"}, - Model: packageConfig{Filename: "models.go"}, - Models: make(map[string]typeMapEntry), - } - - for typ, key := range p.GqlModelNames() { - if typ == nil || p.IsEmpty(typ) || key == "Input" || key == "" { // filter possible junk data - continue - } - - if m, ok := cfg.Models[key]; ok { - m.Model = []string{typ.PackageDir + "." + typ.TypeName} - cfg.Models[key] = m - } else { - cfg.Models[key] = typeMapEntry{Model: []string{typ.PackageDir + "." + typ.TypeName}} - } - } - p.config = append(p.config, cfg) - } - } -} - -type ( - config struct { - SchemaFilename []string `yaml:"schema,omitempty"` - Exec packageConfig `yaml:"exec"` - Model packageConfig `yaml:"model"` - Resolver packageConfig `yaml:"resolver,omitempty"` - Models map[string]typeMapEntry `yaml:"models,omitempty"` - StructTag string `yaml:"struct_tag,omitempty"` - } - - packageConfig struct { - Filename string `yaml:"filename,omitempty"` - Package string `yaml:"package,omitempty"` - Type string `yaml:"type,omitempty"` - } - - typeMapEntry struct { - Model []string `yaml:"model"` - Fields map[string]typeMapField `yaml:"fields,omitempty"` - } - typeMapField struct { - Resolver bool `yaml:"resolver"` - FieldName string `yaml:"fieldName"` - } -) diff --git a/reflect/examples/constructserver/main_test.go b/reflect/examples/constructserver/main_test.go deleted file mode 100644 index 9b790aa..0000000 --- a/reflect/examples/constructserver/main_test.go +++ /dev/null @@ -1,484 +0,0 @@ -package main_test - -import ( - "context" - "github.com/danielvladco/go-proto-gql/reflect/examples/constructserver/pb" - "github.com/golang/protobuf/proto" - "go/ast" - "golang.org/x/tools/go/loader" - "golang.org/x/tools/go/packages" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/descriptorpb" - "strconv" - "strings" - - //"github.com/danielvladco/go-proto-gql/reflect/examples/constructserver/pb" - "github.com/davecgh/go-spew/spew" - //"github.com/golang/protobuf/ptypes" - gr "github.com/jhump/protoreflect/grpcreflect" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" - "testing" -) - -// NewClient returns an instance of gRPC reflection client for gRPC protocol. -func NewClient(conn grpc.ClientConnInterface) *gr.Client { - return gr.NewClient(context.Background(), grpc_reflection_v1alpha.NewServerReflectionClient(conn)) -} -func TestAny(t *testing.T) { - //conn, err := grpc.Dial(":8082", grpc.WithInsecure()) - //if err != nil { - // t.Fatal(err) - //} - //c := NewClient(conn) - //res, err := c.ResolveMessage("google.protobuf.Timestamp") - //pb.Scalars{}.ProtoReflect().Descriptor().ParentFile() - println("2> ", pb.File_constructs_proto.(protoreflect.FileDescriptor).Path()) - - //desc.LoadFileDescriptor() - //pkg := gopoet.NewPackage("./pb") - //spew.Dump(pkg.Symbol("File_constructs_proto")) - - c := loader.Config{} - c.CreateFromFilenames("./pb") - p, err := c.Load() - if err != nil { - t.Fatal(err) - } - for _, pkg := range p.AllPackages { - println(pkg.Pkg.Name()) - for _, d := range pkg.Defs { - spew.Dump(d.Type()) - } - } - //ssautil.CreateProgram(). - pp, err := packages.Load(&packages.Config{ - Mode: packages.NeedSyntax, - Dir: "./pb", - }) - if err != nil { - t.Fatal(err) - } - maMen := []byte{} - for _, p := range pp { - for _, s := range p.Syntax { - for _, o := range s.Scope.Objects { - if o.Kind != ast.Var { - continue - } - if o.Name == "file_constructs_proto_rawDesc" { - //spew.Dump(o.Decl) - val, ok := o.Decl.(*ast.ValueSpec) - if !ok { - continue - } - - for _, val := range val.Values { - compz, ok := val.(*ast.CompositeLit) - if !ok { - continue - } - for _, el := range compz.Elts { - bl, ok := el.(*ast.BasicLit) - if !ok { - continue - } - //if bl.Kind != token.INT { - // t.Fatal("not int babe") - //} - //d, _ := hex.DecodeString(bl.Value) - //fmt.Println(bl.Value, d) - - b, err := strconv.ParseInt(strings.TrimPrefix(bl.Value, "0x"), 16, 0) - if err != nil { - t.Fatal(err) - } - maMen = append(maMen, byte(b)) - } - } - } - } - } - } - //spew.Dump(maMen) - - dd := &descriptorpb.FileDescriptorProto{} - err = proto.Unmarshal(raw, dd) - if err != nil { - t.Fatal(err) - } - println(dd.GetName()) - //spew.Dump(dd) - //gopoet.NewReceiverForType() - - // _______ - //res, err := c.FileContainingExtension("google.protobuf.MethodOptions", 65030) - //spew.Dump(res) - //spew.Dump(err) - // _______ - - //ctx := context.Background() - //conn, err := grpc.Dial(":8081", grpc.WithInsecure()) - //if err != nil { - // t.Log(err) - //} - // - //cc := pb.NewConstructsClient(conn) - - //proto.MessageReflect().Descriptor().FullName() - - //proto.Marshal(pb.Bar_BAR1) - //proto.Unmarshal() - //proto.GetExtension() - //bar := pb.Bar_BAR1 - //a, err := ptypes.MarshalAny(&bar) - //if err != nil { - // t.Fatal(err) - //} - //&any.Any{ - // TypeUrl: string(pb.Bar_BAR3.Type().Descriptor().FullName()), - // Value: []byte(strconv.FormatInt(int64(pb.Bar_BAR3), 10)), - //} - //&any.Any{ - // TypeUrl: "string", - // Value: []byte("test123"), - //} - //res, err := cc.Any_(ctx, a) - //if err != nil { - //t.Fatal(err) - //} - //spew.Dump(res) -} - -var raw = []byte{ - 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 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, 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, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x1e, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x47, 0x0a, 0x06, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x12, 0x1c, 0x0a, 0x01, 0x69, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x01, 0x69, 0x1a, 0x1f, 0x0a, 0x03, 0x49, 0x6e, 0x74, 0x12, 0x18, - 0x0a, 0x01, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x33, 0x52, 0x01, 0x65, 0x22, 0x55, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x1a, - 0x1e, 0x0a, 0x04, 0x46, 0x6f, 0x6f, 0x32, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, - 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x8e, - 0x03, 0x0a, 0x07, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x64, 0x6f, 0x75, 0x62, - 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x75, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x01, 0x28, 0x12, 0x52, 0x06, 0x73, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x18, - 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x06, 0x52, - 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x10, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, - 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, - 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0e, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, - 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x22, - 0xa8, 0x03, 0x0a, 0x08, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x01, 0x52, 0x06, 0x64, 0x6f, - 0x75, 0x62, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x02, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, - 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x06, - 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, 0x52, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x12, 0x52, 0x06, - 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x18, 0x09, 0x20, 0x03, 0x28, 0x07, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x03, 0x28, - 0x06, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0f, 0x52, 0x08, 0x73, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x36, 0x34, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x10, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x36, 0x34, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x08, - 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, - 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x62, - 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x03, 0x66, 0x6f, 0x6f, 0x18, 0x10, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x12, - 0x19, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, - 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x03, 0x62, 0x61, 0x72, 0x22, 0xaa, 0x11, 0x0a, 0x04, 0x4d, - 0x61, 0x70, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, - 0x70, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x39, - 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, 0x33, - 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, 0x69, - 0x6e, 0x74, 0x33, 0x32, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, 0x75, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x55, 0x69, 0x6e, 0x74, - 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x75, - 0x69, 0x6e, 0x74, 0x36, 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x3f, 0x0a, 0x0d, 0x73, - 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, - 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x3f, 0x0a, 0x0d, - 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x5f, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x69, - 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0c, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x45, 0x0a, - 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, - 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x12, 0x45, 0x0a, 0x0f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x5f, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0e, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x4b, 0x0a, 0x11, 0x73, - 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, - 0x2e, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, - 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, - 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x4b, 0x0a, 0x11, 0x73, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x36, 0x34, 0x5f, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x66, - 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x53, 0x66, 0x69, - 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x33, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x62, 0x6f, - 0x6f, 0x6c, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, - 0x70, 0x73, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x0a, 0x0c, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x3f, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x44, - 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x5f, 0x66, 0x6f, 0x6f, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, - 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, - 0x12, 0x36, 0x0a, 0x0a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x61, 0x72, 0x18, 0x0e, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x2e, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x73, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x33, - 0x32, 0x49, 0x6e, 0x74, 0x33, 0x32, 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, 0x1a, 0x3d, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x36, 0x34, - 0x49, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, - 0x55, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x55, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x55, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x74, - 0x33, 0x32, 0x53, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x69, 0x6e, - 0x74, 0x36, 0x34, 0x53, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, 0x13, 0x46, 0x69, - 0x78, 0x65, 0x64, 0x33, 0x32, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x07, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x41, 0x0a, - 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x06, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x53, 0x66, 0x69, 0x78, - 0x65, 0x64, 0x33, 0x32, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, - 0x34, 0x53, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x42, 0x6f, - 0x6f, 0x6c, 0x42, 0x6f, 0x6f, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x44, 0x6f, 0x75, 0x62, 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, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, - 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x45, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x42, 0x61, 0x72, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1d, 0x0a, 0x03, 0x41, 0x6e, 0x79, 0x12, 0x16, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x3a, 0x0a, 0x0e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, - 0x65, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, - 0x73, 0x69, 0x76, 0x65, 0x52, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xaa, 0x01, 0x0a, 0x0b, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x07, 0x6e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, - 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x31, 0x52, 0x07, 0x6e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x31, 0x1a, 0x63, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x31, 0x12, 0x43, 0x0a, 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, - 0x64, 0x31, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x52, - 0x07, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x1a, 0x0e, 0x0a, 0x0c, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x32, 0x22, 0x1f, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xd1, 0x06, 0x0a, 0x03, 0x52, 0x65, - 0x66, 0x12, 0x2e, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, - 0x32, 0x12, 0x36, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x0a, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, - 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x6c, 0x6f, - 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x42, 0x61, 0x7a, 0x52, 0x04, - 0x66, 0x69, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x52, - 0x07, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, - 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x07, 0x2e, 0x70, 0x62, - 0x2e, 0x42, 0x61, 0x72, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x21, - 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, - 0x6c, 0x12, 0x26, 0x0a, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x46, 0x6f, 0x6f, 0x32, - 0x52, 0x07, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, - 0x46, 0x6f, 0x6f, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, - 0x6e, 0x32, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, - 0x32, 0x12, 0x22, 0x0a, 0x02, 0x67, 0x7a, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x7a, 0x2e, 0x47, - 0x7a, 0x52, 0x02, 0x67, 0x7a, 0x1a, 0x1d, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x1a, 0xf6, 0x02, 0x0a, 0x03, 0x46, 0x6f, 0x6f, 0x12, 0x23, 0x0a, 0x04, - 0x62, 0x61, 0x72, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, - 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x52, 0x04, 0x62, 0x61, 0x72, - 0x31, 0x12, 0x2e, 0x0a, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x32, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, - 0x32, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x31, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x54, - 0x69, 0x6d, 0x65, 0x31, 0x12, 0x1f, 0x0a, 0x04, 0x62, 0x61, 0x72, 0x32, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x42, 0x61, 0x72, 0x52, - 0x04, 0x62, 0x61, 0x72, 0x32, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x6e, 0x31, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, 0x6f, 0x2e, - 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x31, 0x12, 0x24, 0x0a, 0x03, 0x65, 0x6e, 0x32, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x2e, 0x46, 0x6f, - 0x6f, 0x2e, 0x42, 0x61, 0x72, 0x2e, 0x45, 0x6e, 0x52, 0x03, 0x65, 0x6e, 0x32, 0x1a, 0x23, 0x0a, - 0x03, 0x42, 0x61, 0x7a, 0x1a, 0x1c, 0x0a, 0x02, 0x47, 0x7a, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x31, 0x1a, 0x33, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x31, 0x22, 0x14, 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, - 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, 0x01, 0x22, 0x14, 0x0a, 0x02, 0x45, 0x6e, 0x12, 0x06, 0x0a, - 0x02, 0x41, 0x30, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x31, 0x10, 0x01, 0x22, 0xbf, 0x01, - 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x31, 0x12, - 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x32, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x33, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x33, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x34, 0x12, 0x18, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x35, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x35, 0x12, 0x18, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x36, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x36, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x31, 0x42, 0x08, 0x0a, 0x06, 0x4f, - 0x6e, 0x65, 0x6f, 0x66, 0x32, 0x42, 0x08, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x33, 0x2a, - 0x23, 0x0a, 0x03, 0x42, 0x61, 0x72, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x31, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, 0x52, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x41, - 0x52, 0x33, 0x10, 0x02, 0x32, 0xff, 0x02, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, - 0x63, 0x74, 0x73, 0x12, 0x24, 0x0a, 0x08, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x5f, 0x12, - 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x1a, 0x0b, 0x2e, 0x70, - 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x09, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x12, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x05, 0x4d, 0x61, 0x70, 0x73, 0x5f, 0x12, 0x08, 0x2e, 0x70, 0x62, - 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x1a, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x61, 0x70, 0x73, 0x12, - 0x32, 0x0a, 0x04, 0x41, 0x6e, 0x79, 0x5f, 0x12, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x1a, 0x14, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x41, 0x6e, 0x79, 0x12, 0x20, 0x0a, 0x07, 0x41, 0x6e, 0x79, 0x77, 0x61, 0x79, 0x5f, 0x12, 0x0c, - 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6e, 0x79, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x07, 0x2e, 0x70, - 0x62, 0x2e, 0x41, 0x6e, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x32, 0x5f, - 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x63, 0x75, 0x72, - 0x73, 0x69, 0x76, 0x65, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x4e, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x07, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x5f, - 0x12, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x1a, 0x0a, 0x2e, 0x70, - 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x33, 0x12, 0x18, 0x0a, 0x04, 0x52, 0x65, 0x66, 0x5f, - 0x12, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x66, 0x1a, 0x07, 0x2e, 0x70, 0x62, 0x2e, 0x52, - 0x65, 0x66, 0x12, 0x1e, 0x0a, 0x06, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x12, 0x09, 0x2e, 0x70, - 0x62, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4f, 0x6e, 0x65, - 0x6f, 0x66, 0x12, 0x22, 0x0a, 0x0a, 0x43, 0x61, 0x6c, 0x6c, 0x57, 0x69, 0x74, 0x68, 0x49, 0x64, - 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x09, 0x2e, 0x70, 0x62, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x61, 0x6e, 0x69, 0x65, 0x6c, 0x76, 0x6c, 0x61, 0x64, 0x63, - 0x6f, 0x2f, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x67, 0x71, 0x6c, 0x2f, 0x72, - 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} diff --git a/reflect/examples/constructserver/pb/gen.go b/reflect/examples/constructserver/pb/gen.go deleted file mode 100644 index 5396a9c..0000000 --- a/reflect/examples/constructserver/pb/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package pb - -//go:generate bash -c "protoc --go_out=paths=source_relative,plugins=grpc:. *.proto -I=../../../ -I=." diff --git a/reflect/examples/optionsserver/pb/gen.go b/reflect/examples/optionsserver/pb/gen.go deleted file mode 100644 index 97d74c3..0000000 --- a/reflect/examples/optionsserver/pb/gen.go +++ /dev/null @@ -1,3 +0,0 @@ -package pb - -//go:generate bash -c "protoc --go_out=paths=source_relative,plugins=grpc:../../../../ ./*.proto -I=../../../../pb -I=." diff --git a/reflect/gateway/cmd/dumpproto/main.go b/reflect/gateway/cmd/dumpproto/main.go deleted file mode 100644 index e645a1b..0000000 --- a/reflect/gateway/cmd/dumpproto/main.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/server" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" - "google.golang.org/protobuf/types/pluginpb" - "log" - "os" -) - -func main() { - _, ss, fs, err := server.NewReflectCaller([]string{"localhost:8081", "localhost:8082"}) - if err != nil { - log.Fatal(err) - } - - //proto.Marshal() - sss := []*descriptor.FileDescriptorProto{} - for _, s := range ss { - sss = append(sss, s.AsFileDescriptorProto()) - } - generator := &pluginpb.CodeGeneratorRequest{ - FileToGenerate: fs, - ProtoFile: sss, - CompilerVersion: nil, - } - - b, err := proto.Marshal(generator) - if err != nil { - log.Fatal(err) - } - f, err := os.Create("testing_file.bytes") - if err != nil { - log.Fatal(err) - } - defer f.Close() - _, err = f.Write(b) - if err != nil { - log.Fatal(err) - } -} diff --git a/reflect/gateway/cmd/generatortest/main.go b/reflect/gateway/cmd/generatortest/main.go deleted file mode 100644 index c5ad84a..0000000 --- a/reflect/gateway/cmd/generatortest/main.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/generator" - "github.com/danielvladco/go-proto-gql/reflect/gateway/internal/server" - "github.com/vektah/gqlparser/v2/formatter" - "log" - "os" -) - -func main() { - //fs, err := protoparse.Parser{}.ParseFiles("../example/constructs.proto") - //if err != nil { - // log.Fatal(err) - //} - - // TODO - // 1. use `desc.CreateFileDescriptor()` instead of reflect call - // 2. resolve unique names - // 3. investigate why we don't receive source code info (required for comments) (guess it might be related to server refection) - - _, ss, _, err := server.NewReflectCaller([]string{"localhost:8081", "localhost:8082"}) - if err != nil { - log.Fatal(err) - } - - //proto.Marshal() - sch, err := generator.NewSchemas(ss, true) - if err != nil { - log.Fatal(err) - } - - src := sch.AsGraphql()[0] - - //desc.CreateFileDescriptor() - - f, err := os.Create("test.graphql") - if err != nil { - log.Fatal(err) - } - defer f.Close() - formatter.NewFormatter(f).FormatSchema(src) - -} diff --git a/reflect/gateway/config.json b/reflect/gateway/config.json deleted file mode 100644 index faa003d..0000000 --- a/reflect/gateway/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "endpoints": [ - "localhost:8081", - "localhost:8082" - ] -} \ No newline at end of file diff --git a/reflect/gateway/internal/generator/callstack.go b/reflect/gateway/internal/generator/callstack.go deleted file mode 100644 index 9984abb..0000000 --- a/reflect/gateway/internal/generator/callstack.go +++ /dev/null @@ -1,54 +0,0 @@ -package generator - -import "github.com/jhump/protoreflect/desc" - -type Callstack interface { - Push(entry desc.Descriptor) - Pop(entry desc.Descriptor) - Has(entry desc.Descriptor) bool - Free() - List() []desc.Descriptor - Len() int -} - -func NewCallstack() Callstack { - return &callstack{stack: make(map[desc.Descriptor]int), index: 0} -} - -type callstack struct { - stack map[desc.Descriptor]int - sorted []string - index int -} - -func (c *callstack) Free() { - c.stack = make(map[desc.Descriptor]int) - c.index = 0 -} - -func (c *callstack) Pop(entry desc.Descriptor) { - delete(c.stack, entry) - c.index-- -} - -func (c *callstack) Push(entry desc.Descriptor) { - c.stack[entry] = c.index - c.index++ -} - -func (c *callstack) List() []desc.Descriptor { - res := make([]desc.Descriptor, len(c.stack)) - for s, si := range c.stack { - res[si] = s - } - return res -} - -func (c *callstack) Has(entry desc.Descriptor) bool { - _, ok := c.stack[entry] - return ok -} - -func (c *callstack) Len() int { - return len(c.stack) -} diff --git a/reflect/gateway/internal/server/generate.go b/reflect/gateway/internal/server/generate.go deleted file mode 100644 index 3926bd0..0000000 --- a/reflect/gateway/internal/server/generate.go +++ /dev/null @@ -1,42 +0,0 @@ -package server - -import ( - "github.com/jhump/protoreflect/desc" - "github.com/vektah/gqlparser/v2/ast" - - "github.com/danielvladco/go-proto-gql/plugin" - "github.com/golang/protobuf/protoc-gen-go/descriptor" -) - -func GenerateGQLComponents(filesToGenerate []string, descs []*desc.FileDescriptor) GQLDescriptors { - p := plugin.NewPlugin(descs) - fnames := map[string]*desc.FileDescriptor{} - for _, f := range descs { - fnames[f.GetName()] = f - } - for _, fileName := range filesToGenerate { - if f, ok := fnames[fileName]; ok { - p.InitFile(f) - } - } - return p -} - -type GQLDescriptors interface { - GetOneof(ref plugin.OneofRef) *plugin.Type - Oneofs() map[string]*plugin.Type - Scalars() map[string]*plugin.Type - Enums() map[string]*plugin.Type - Types() map[string]*plugin.Type - Inputs() map[string]*plugin.Type - Subscriptions() plugin.Methods - Queries() plugin.Methods - Mutations() plugin.Methods - Fields() map[plugin.FieldKey]*descriptor.FieldDescriptorProto - FieldBack(t *descriptor.DescriptorProto, name string) *descriptor.FieldDescriptorProto - GraphQLField(t *descriptor.DescriptorProto, f *descriptor.FieldDescriptorProto) string - GraphQLType(field *descriptor.FieldDescriptorProto, input bool) *ast.Type - GqlModelNames() map[*plugin.Type]string - IsEmpty(t *plugin.Type) bool - IsAny(typeName string) bool -} diff --git a/reflect/gateway/internal/server/introspection.go b/reflect/gateway/internal/server/introspection.go deleted file mode 100644 index 5d80bd6..0000000 --- a/reflect/gateway/internal/server/introspection.go +++ /dev/null @@ -1,254 +0,0 @@ -package server - -import ( - "github.com/danielvladco/go-proto-gql/plugin" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/vektah/gqlparser/v2/ast" -) - -func GenerateSchema(p GQLDescriptors) (*ast.Schema, error) { - queries := p.Queries() - mutations := p.Mutations() - subscriptions := p.Subscriptions() - - queryDef := &ast.Definition{Kind: ast.Object, Name: "Query", Position: &ast.Position{}} - mutationDef := &ast.Definition{Kind: ast.Object, Name: "Mutation", Position: &ast.Position{}} - subscriptionsDef := &ast.Definition{Kind: ast.Object, Name: "Subscription", Position: &ast.Position{}} - schema := &ast.Schema{ - Query: queryDef, - Types: map[string]*ast.Definition{"Query": queryDef}, - Directives: map[string]*ast.DirectiveDefinition{}, - } - if len(mutations) > 0 { - schema.Mutation = mutationDef - schema.Types[mutationDef.Name] = mutationDef - } - if len(queries) == 0 { - //id := ast.NonNullNamedType("ID", &ast.Position{}) - //node := &ast.Definition{ - // Kind: ast.Interface, - // Name: "Node", - // Fields: []*ast.FieldDefinition{{Name: "id", Type: id}}, - //} - //schema.Types[node.Name] = node - schema.Query.Fields = append(schema.Query.Fields, &ast.FieldDefinition{ - Name: "dummy", - //Arguments: []*ast.ArgumentDefinition{{ - // Description: "", - // Name: "id", - // Type: id, - //}}, - Type: ast.NamedType("Boolean", &ast.Position{}), - }) - } - if len(subscriptions) > 0 { - schema.Subscription = subscriptionsDef - schema.Types[subscriptionsDef.Name] = subscriptionsDef - } - - oneofs := p.Oneofs() - for _, oo := range oneofs { - var types []string - if oo.TypeName == plugin.ScalarAny { - for _, t := range p.Types() { - types = append(types, p.GqlModelNames()[t]) - } - } else { - if len(oo.OneofTypes) == 0 { - continue - } - - types = oo.OneofTypes.Strings() - for i, v := range types { - typ := p.Types()[v] - if p.IsEmpty(typ) { - continue - } - types[i] = p.GqlModelNames()[typ] - } - - // if ti is not the special type Any, register it as a new directive - schema.Directives[p.GqlModelNames()[oo]] = &ast.DirectiveDefinition{ - Name: p.GqlModelNames()[oo], - Locations: []ast.DirectiveLocation{ast.LocationInputFieldDefinition}, - Position: &ast.Position{Src: &ast.Source{}}, - } - } - schema.Types[p.GqlModelNames()[oo]] = &ast.Definition{ - Kind: ast.Union, - Name: p.GqlModelNames()[oo], - Types: types, - Position: &ast.Position{}, - } - } - scalars := p.Scalars() - for _, tt := range scalars { - if p.GqlModelNames()[tt] == "" { - continue - } - schema.Types[p.GqlModelNames()[tt]] = &ast.Definition{ - Kind: ast.Scalar, - Name: p.GqlModelNames()[tt], - Position: &ast.Position{}, - } - } - - types := p.Types() - for _, tt := range types { - if p.IsEmpty(tt) { - continue - } - - oneofs := make(map[plugin.OneofRef]struct{}) - var fields ast.FieldList - for _, f := range tt.GetField() { - field := &ast.FieldDefinition{ - Position: &ast.Position{}, - } - if f.OneofIndex != nil { - oneofRef := plugin.OneofRef{Parent: tt, Index: *f.OneofIndex} - if _, ok := oneofs[oneofRef]; !ok { - //TODO find a better way - // these are fake types - //generator.CamelCase(m.OneofDecl[*f.OneofIndex].GetName())) - // use this just as workaround - p.GraphQLField(tt.DescriptorProto, f) - field.Name = plugin.ToLowerFirst(generator.CamelCase(tt.OneofDecl[*f.OneofIndex].GetName())) - field.Type = &ast.Type{NamedType: p.GqlModelNames()[p.GetOneof(oneofRef)], Position: &ast.Position{}} - } else { - oneofs[oneofRef] = struct{}{} - } - } else { - field.Name = p.GraphQLField(tt.DescriptorProto, f) - field.Type = p.GraphQLType(f, false) - } - - fields = append(fields, field) - } - - schema.Types[p.GqlModelNames()[tt]] = &ast.Definition{ - Kind: ast.Object, - Name: p.GqlModelNames()[tt], - Fields: fields, - Position: &ast.Position{}, - } - } - - // TODO do not repeat this - inputs := p.Inputs() - for _, tt := range inputs { - parent := &ast.Definition{ - Kind: ast.InputObject, - Name: p.GqlModelNames()[tt], - //Fields: fields, - Position: &ast.Position{}, - } - var fields ast.FieldList - for _, f := range tt.GetField() { - var dirs []*ast.Directive - if f.OneofIndex != nil { - oneofRef := plugin.OneofRef{Parent: tt, Index: *f.OneofIndex} - directiveName := p.GqlModelNames()[p.GetOneof(oneofRef)] - directiveDef := schema.Directives[directiveName] - dirs = []*ast.Directive{{Name: directiveName, ParentDefinition: parent, Definition: directiveDef, Location: directiveDef.Locations[0], Position: &ast.Position{}}} - } - fields = append(fields, &ast.FieldDefinition{ - Name: p.GraphQLField(tt.DescriptorProto, f), - Type: p.GraphQLType(f, true), - Directives: dirs, - Position: &ast.Position{}, - }) - } - - if p.IsEmpty(tt) { - continue - } - - parent.Fields = fields - schema.Types[p.GqlModelNames()[tt]] = parent - } - // TODO do not repeat this - enums := p.Enums() - for _, ee := range enums { - var enumValues ast.EnumValueList - for _, v := range ee.GetValue() { - enumValues = append(enumValues, &ast.EnumValueDefinition{ - Name: v.GetName(), - Position: &ast.Position{}, - }) - } - - schema.Types[p.GqlModelNames()[ee]] = &ast.Definition{ - Kind: ast.Enum, - Name: p.GqlModelNames()[ee], - EnumValues: enumValues, - Position: &ast.Position{}, - } - } - - if err := rangeMethods(queries, &schema.Query.Fields, p); err != nil { - return nil, err - } - if err := rangeMethods(mutations, &schema.Mutation.Fields, p); err != nil { - return nil, err - } - if err := rangeMethods(subscriptions, &schema.Subscription.Fields, p); err != nil { - return nil, err - } - - return schema, nil -} - -func rangeMethods(methods plugin.Methods, res *ast.FieldList, p GQLDescriptors) error { - for _, m := range methods { - var in *ast.Type - var out = &ast.Type{NamedType: "Boolean", Position: &ast.Position{}} - - // some scalars can be used as inputs such as 'Any' - if !m.MethodDescriptorProto.GetClientStreaming() || m.Phony { - if scalar, ok := p.Scalars()[m.InputType]; ok { - if !p.IsEmpty(scalar) { - in = &ast.Type{NamedType: p.GqlModelNames()[scalar], Position: &ast.Position{}} - } - - } else if input, ok := p.Inputs()[m.InputType]; ok { - if !p.IsEmpty(input) { - in = &ast.Type{NamedType: p.GqlModelNames()[input], Position: &ast.Position{}} - } - } - } - - if oneof, ok := p.Oneofs()[m.OutputType]; ok { - if !p.IsEmpty(oneof) { - out = &ast.Type{NamedType: p.GqlModelNames()[oneof], Position: &ast.Position{}} - } - } else if scalar, ok := p.Scalars()[m.OutputType]; ok { - if !p.IsEmpty(scalar) { - out = &ast.Type{NamedType: p.GqlModelNames()[scalar], Position: &ast.Position{}} - } - } else if typ, ok := p.Types()[m.OutputType]; ok { - if !p.IsEmpty(typ) { - out = &ast.Type{NamedType: p.GqlModelNames()[typ], Position: &ast.Position{}} - } - } - - var args ast.ArgumentDefinitionList - if in != nil { - args = append(args, &ast.ArgumentDefinition{ - Description: "", - DefaultValue: nil, - Name: "in", - Type: in, - Directives: nil, - Position: &ast.Position{}, - }) - } - *res = append(*res, &ast.FieldDefinition{ - Description: "", - Name: m.Name, - Arguments: args, - Type: out, - }) - } - return nil -} diff --git a/reflect/gateway/internal/server/introspection_test.go b/reflect/gateway/internal/server/introspection_test.go deleted file mode 100644 index d7685ac..0000000 --- a/reflect/gateway/internal/server/introspection_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package server - -import ( - "context" - "github.com/mitchellh/mapstructure" - "github.com/nautilus/gateway" - "github.com/nautilus/graphql" - "testing" -) - -func TestGenerateSchema(t *testing.T) { - schema, err := GenerateSchema(nil) // FIXME add test - if err != nil { - t.Fatal(err) - } - g, err := gateway.New([]*graphql.RemoteSchema{{Schema: schema, URL: ""}}) - - result := &graphql.IntrospectionQueryResult{} - err = schemaTestLoadQuery(g, graphql.IntrospectionQuery, result, map[string]interface{}{}) - if err != nil { - t.Fatal(err) - } -} - -func schemaTestLoadQuery(qw *gateway.Gateway, query string, target interface{}, variables map[string]interface{}) error { - reqCtx := &gateway.RequestContext{ - Context: context.Background(), - Query: query, - Variables: variables, - } - plan, err := qw.GetPlans(reqCtx) - if err != nil { - return err - } - - // executing the introspection query should return a full description of the schema - response, err := qw.Execute(reqCtx, plan) - if err != nil { - return err - } - - // massage the map into the structure - decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ - TagName: "json", - Result: target, - }) - if err != nil { - return err - } - err = decoder.Decode(response) - if err != nil { - return err - } - - return nil -} diff --git a/reflect/gateway/internal/server/mapping.go b/reflect/gateway/internal/server/mapping.go deleted file mode 100644 index a8d904c..0000000 --- a/reflect/gateway/internal/server/mapping.go +++ /dev/null @@ -1,142 +0,0 @@ -package server - -import ( - "fmt" - "github.com/danielvladco/go-proto-gql/plugin" - "github.com/gogo/protobuf/protoc-gen-gogo/generator" - "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/jhump/protoreflect/desc" -) - -func NewMapping(gqlDesc GQLDescriptors, descs []*desc.FileDescriptor) *GQLProtoMapping { - m := &GQLProtoMapping{ - inputs: make(map[*desc.MessageDescriptor]*plugin.Type), - objects: make(map[*desc.MessageDescriptor]*plugin.Type), - - messages: make(map[*descriptor.DescriptorProto]*desc.MessageDescriptor), - enums: make(map[*descriptor.EnumDescriptorProto]*desc.EnumDescriptor), - oneofs: make(map[OneofKey]*desc.OneOfDescriptor), - fields: make(map[*descriptor.FieldDescriptorProto]*desc.FieldDescriptor), - rpcs: make(map[string]*plugin.Method), - gqltypeToDesc: make(map[string]*desc.MessageDescriptor), - pbtypeToDesc: make(map[string]*plugin.Type), - gqlDesc: gqlDesc, - } - - // TODO use maps from the start - for _, q := range gqlDesc.Queries() { - m.rpcs[q.Name] = q - } - - for _, q := range gqlDesc.Mutations() { - m.rpcs[q.Name] = q - } - - for _, d := range descs { - m.getEnums(d.GetEnumTypes()) - } - - for _, d := range descs { - m.getMessages(d.GetMessageTypes()) - } - - for _, in := range gqlDesc.Inputs() { - dd := m.messages[in.DescriptorProto] - m.inputs[dd] = in - } - - for _, obj := range gqlDesc.Types() { - m.objects[m.messages[obj.DescriptorProto]] = obj - } - - for _, tt := range gqlDesc.Types() { - d, ok := m.messages[tt.DescriptorProto] - if !ok { - continue - } - - m.pbtypeToDesc[d.GetFullyQualifiedName()] = tt - } - for _, tt := range gqlDesc.Inputs() { - d, ok := m.messages[tt.DescriptorProto] - if !ok { - continue - } - m.gqltypeToDesc[gqlDesc.GqlModelNames()[tt]] = d - } - return m -} - -type OneofKey struct { - desc *descriptor.DescriptorProto - gqlFieldName string -} - -type GQLProtoMapping struct { - inputs map[*desc.MessageDescriptor]*plugin.Type - objects map[*desc.MessageDescriptor]*plugin.Type - - messages map[*descriptor.DescriptorProto]*desc.MessageDescriptor - enums map[*descriptor.EnumDescriptorProto]*desc.EnumDescriptor - oneofs map[OneofKey]*desc.OneOfDescriptor - fields map[*descriptor.FieldDescriptorProto]*desc.FieldDescriptor - - rpcs map[string]*plugin.Method - - gqlDesc GQLDescriptors - - gqltypeToDesc map[string]*desc.MessageDescriptor - pbtypeToDesc map[string]*plugin.Type -} - -func (c GQLProtoMapping) getEnums(enums []*desc.EnumDescriptor) { - for _, e := range enums { - c.enums[e.AsEnumDescriptorProto()] = e - } -} - -func (c GQLProtoMapping) getMessages(messages []*desc.MessageDescriptor) { - for _, e := range messages { - msg := e.AsDescriptorProto() - - for i, oo := range e.GetOneOfs() { - c.oneofs[OneofKey{ - desc: msg, - gqlFieldName: plugin.ToLowerFirst(generator.CamelCase(msg.OneofDecl[i].GetName())), - }] = oo - } - - c.getMessages(e.GetNestedMessageTypes()) - - c.getEnums(e.GetNestedEnumTypes()) - - for _, f := range e.GetFields() { - c.fields[f.AsFieldDescriptorProto()] = f - } - - c.messages[msg] = e - } -} - -func (c GQLProtoMapping) InputType(methodName string) (in *plugin.Type, err error) { - query, ok := c.rpcs[methodName] - if !ok { - return nil, fmt.Errorf("no item: %s", methodName) - } - - if input, ok := c.gqlDesc.Inputs()[query.InputType]; ok { - in = input - } else if scalar, ok := c.gqlDesc.Scalars()[query.InputType]; ok { - in = scalar - } - return in, err -} - -func (c GQLProtoMapping) GetMethod(methodName string) (in *plugin.Method, err error) { - m, ok := c.rpcs[methodName] - if !ok { - return nil, fmt.Errorf("no item: %s", methodName) - } - - return m, err -} diff --git a/reflect/gateway/internal/server/store.go b/reflect/gateway/internal/server/store.go deleted file mode 100644 index abb4e43..0000000 --- a/reflect/gateway/internal/server/store.go +++ /dev/null @@ -1 +0,0 @@ -package server diff --git a/reflect/go.mod b/reflect/go.mod deleted file mode 100644 index 337d23a..0000000 --- a/reflect/go.mod +++ /dev/null @@ -1,32 +0,0 @@ -module github.com/danielvladco/go-proto-gql/reflect - -go 1.14 - -require ( - github.com/99designs/gqlgen v0.11.3 - github.com/danielvladco/go-proto-gql v0.7.3 - github.com/danielvladco/go-proto-gql/pb v0.6.0 - github.com/davecgh/go-spew v1.1.1 - github.com/gogo/protobuf v1.2.1 - github.com/golang/protobuf v1.4.2 - github.com/jhump/gopoet v0.1.0 - github.com/jhump/goprotoc v0.2.0 // indirect - github.com/jhump/protoreflect v1.6.1 - github.com/mitchellh/mapstructure v1.3.0 - github.com/nautilus/gateway v0.1.4 - github.com/nautilus/graphql v0.0.9 - github.com/sirupsen/logrus v1.6.0 // indirect - github.com/vektah/gqlparser v1.1.0 - github.com/vektah/gqlparser/v2 v2.0.1 - golang.org/x/net v0.0.0-20200513185701-a91f0712d120 // indirect - golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 // indirect - golang.org/x/text v0.3.2 // indirect - golang.org/x/tools v0.0.0-20200604183345-4d5ea46c79fe - google.golang.org/genproto v0.0.0-20200514193133-8feb7f20f2a2 // indirect - google.golang.org/grpc v1.29.1 - google.golang.org/protobuf v1.23.0 -) - -replace github.com/danielvladco/go-proto-gql v0.7.3 => ../ - -replace github.com/danielvladco/go-proto-gql/pb => ../pb diff --git a/reflect/go.sum b/reflect/go.sum deleted file mode 100644 index c6064ee..0000000 --- a/reflect/go.sum +++ /dev/null @@ -1,303 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -github.com/99designs/gqlgen v0.11.3 h1:oFSxl1DFS9X///uHV3y6CEfpcXWrDUxVblR4Xib2bs4= -github.com/99designs/gqlgen v0.11.3/go.mod h1:RgX5GRRdDWNkh4pBrdzNpNPFVsdoUFY2+adM6nb1N+4= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/agnivade/levenshtein v1.0.3 h1:M5ZnqLOoZR8ygVq0FfkXsNOKzMCk0xRiow0R5+5VkQ0= -github.com/agnivade/levenshtein v1.0.3/go.mod h1:4SFRZbbXWLF4MU1T9Qg0pGgH3Pjs+t6ie5efyrwRJXs= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/carted/graphql v0.7.6 h1:1DAom3l7Irln/hHlPMBR6w/RirCXjopsCY9WCZc7WUc= -github.com/carted/graphql v0.7.6/go.mod h1:aIVByVaa4avHzEnahcnHbP48OrkT/+gTtxBT+dPV2R0= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/danielvladco/go-proto-gql/pb v0.6.0 h1:zEQZroAJx7kzzliJqHa+KfNMNneVK3caZx0juTxH6Oo= -github.com/danielvladco/go-proto-gql/pb v0.6.0/go.mod h1:wFJoFQotIm/We81vMxWcSPaxm3hngCr0Q+8VbHfbyAo= -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/dgryski/trifles v0.0.0-20190318185328-a8d75aae118c/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-chi/chi v3.3.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190723021845-34ac40c74b70/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/websocket v1.2.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= -github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= -github.com/graph-gophers/graphql-go v0.0.0-20190108123631-d5b7dc6be53b/go.mod h1:aRnZGurV3LlZ1Y+ygyx1mAV6OUfq+nu6OgpJ6jKgZ3g= -github.com/graphql-go/graphql v0.7.7/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= -github.com/graphql-go/graphql v0.7.8/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= -github.com/graphql-go/graphql v0.7.9 h1:5Va/Rt4l5g3YjwDnid3vFfn43faaQBq7rMcIZ0VnV34= -github.com/graphql-go/graphql v0.7.9/go.mod h1:k6yrAYQaSP59DC5UVxbgxESlmVyojThKdORUqGDGmrI= -github.com/graphql-go/handler v0.2.3/go.mod h1:leLF6RpV5uZMN1CdImAxuiayrYYhOk33bZciaUGaXeU= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jhump/gopoet v0.0.0-20190322174617-17282ff210b3/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/gopoet v0.1.0 h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg= -github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.2.0 h1:VFu8NxlzVAsHKStxwqFzoGLLySZ9rQc/E5Elpu4x91k= -github.com/jhump/goprotoc v0.2.0/go.mod h1:TM0lulZUNujIC+aepfTnT5KK1gpI15BcON2TTVBsWzI= -github.com/jhump/protoreflect v1.5.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jhump/protoreflect v1.6.1 h1:4/2yi5LyDPP7nN+Hiird1SAJ6YoxUm13/oxHGRnbPd8= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/lyft/protoc-gen-star v0.4.15/go.mod h1:mE8fbna26u7aEA2QCVvvfBU/ZrPgocG1206xAFPcs94= -github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/matryer/moq v0.0.0-20200125112110-7615cbe60268/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mitchellh/mapstructure v0.0.0-20180203102830-a4e142e9c047/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.3.0 h1:iDwIio/3gk2QtLLEsqU5lInaMzos0hDTz8a6lazSFVw= -github.com/mitchellh/mapstructure v1.3.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/nautilus/gateway v0.1.4 h1:vq2c8TtAECDMJYIlGk71NuiMwbNAjKaKmD7de3gJNLI= -github.com/nautilus/gateway v0.1.4/go.mod h1:RxuX3aApDc+xYY7FpS75o6wOSsJcOstS9tFgCwNKC+U= -github.com/nautilus/graphql v0.0.9 h1:si606oOgpARWH7STlA5NoTcCHOf7WfK5pH0AQjskKcE= -github.com/nautilus/graphql v0.0.9/go.mod h1:MQDucBpBRbhwZfeE59tS1DFg7VXS3NvwQpLkgHBmQkg= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20180121065927-ffb13db8def0/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/dataloaden v0.3.0/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/gqlparser v1.1.0 h1:3668p2gUlO+PiS81x957Rpr3/FPRWG6cxgCXAvTS1hw= -github.com/vektah/gqlparser v1.1.0/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/vektah/gqlparser/v2 v2.0.1 h1:xgl5abVnsd4hkN9rk65OJID9bfcLSMuTaTcZj777q1o= -github.com/vektah/gqlparser/v2 v2.0.1/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200320181102-891825fb96df/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190814143026-e8b3e6111d02/go.mod h1:z5wpDCy2wbnXyFdvEuY3LhY9gBUL86/IOILm+Hsjx+E= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120 h1:EZ3cVSzKOlJxAd8e8YAJ7no8nNypTxexh/YE/xW3ZEY= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200321134203-328b4cd54aae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9 h1:YTzHMGlqJu67/uEo1lBv0n3wBXhXNeUbB1XfN2vmTm0= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190515012406-7d7faa4812bd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190808195139-e713427fea3f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190815235612-5b08f89bfc0c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200114235610-7ae403b6b589/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200225022059-a0ec867d517c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200604183345-4d5ea46c79fe h1:nHJ3EpvC/Nk6Gc4FTwTQ3YOBAODRx412L5jEPjgJcEg= -golang.org/x/tools v0.0.0-20200604183345-4d5ea46c79fe/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200514193133-8feb7f20f2a2 h1:RwW6+LxyOQJ7oeoZ76GIJlwt/O0J5cN2fk+q/jK27kQ= -google.golang.org/genproto v0.0.0-20200514193133-8feb7f20f2a2/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1 h1:EC2SB8S04d2r73uptxphDSUG+kTKVgjRPF+N3xpxRB4= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.2/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -sourcegraph.com/sourcegraph/appdash v0.0.0-20180110180208-2cc67fd64755/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:L5q+DGLGOQFpo1snNEkLOJT2d1YTW66rWNzatr3He1k= diff --git a/scripts/install-protoc.sh b/scripts/install-protoc.sh new file mode 100755 index 0000000..ec3030d --- /dev/null +++ b/scripts/install-protoc.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +PROTOC_VERSION=${PROTOC_VERSION:-"3.13.0"} +OS="linux" +if [[ $(uname) == "Darwin" ]]; then + OS="osx" +fi + +ARCHIVE_NAME="protoc-$PROTOC_VERSION-$OS-$(uname -m)" +curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$ARCHIVE_NAME.zip" + +cleanup () { + rm -f "$ARCHIVE_NAME.zip" + rm -rf $ARCHIVE_NAME +} + +trap cleanup EXIT +unzip -o $ARCHIVE_NAME -d $ARCHIVE_NAME +GOPATH="$(go env GOPATH)" +mv $ARCHIVE_NAME/bin/protoc $GOPATH/bin +rm -rf $GOPATH/include +mv $ARCHIVE_NAME/include $GOPATH diff --git a/tools/tools.go b/tools/tools.go new file mode 100644 index 0000000..217833d --- /dev/null +++ b/tools/tools.go @@ -0,0 +1,9 @@ +// +build tools + +package tools + +import ( + _ "github.com/99designs/gqlgen" + _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" + _ "google.golang.org/protobuf/cmd/protoc-gen-go" +)