Best Keploy code snippet using generated.marshalNString2string
generated.go
Source:generated.go
...355 args := map[string]interface{}{}356 var arg0 string357 if tmp, ok := rawArgs["zone"]; ok {358 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("zone"))359 arg0, err = ec.unmarshalNString2string(ctx, tmp)360 if err != nil {361 return nil, err362 }363 }364 args["zone"] = arg0365 var arg1 int64366 if tmp, ok := rawArgs["id"]; ok {367 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))368 arg1, err = ec.unmarshalNID2int64(ctx, tmp)369 if err != nil {370 return nil, err371 }372 }373 args["id"] = arg1374 var arg2 *model.ShutdownOption375 if tmp, ok := rawArgs["option"]; ok {376 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("option"))377 arg2, err = ec.unmarshalOShutdownOption2ágithubácomásacloudágqlpágraphámodeláShutdownOption(ctx, tmp)378 if err != nil {379 return nil, err380 }381 }382 args["option"] = arg2383 return args, nil384}385func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {386 var err error387 args := map[string]interface{}{}388 var arg0 string389 if tmp, ok := rawArgs["name"]; ok {390 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))391 arg0, err = ec.unmarshalNString2string(ctx, tmp)392 if err != nil {393 return nil, err394 }395 }396 args["name"] = arg0397 return args, nil398}399func (ec *executionContext) field_Query_servers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {400 var err error401 args := map[string]interface{}{}402 var arg0 string403 if tmp, ok := rawArgs["zone"]; ok {404 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("zone"))405 arg0, err = ec.unmarshalNString2string(ctx, tmp)406 if err != nil {407 return nil, err408 }409 }410 args["zone"] = arg0411 return args, nil412}413func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {414 var err error415 args := map[string]interface{}{}416 var arg0 bool417 if tmp, ok := rawArgs["includeDeprecated"]; ok {418 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))419 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)420 if err != nil {421 return nil, err422 }423 }424 args["includeDeprecated"] = arg0425 return args, nil426}427func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {428 var err error429 args := map[string]interface{}{}430 var arg0 bool431 if tmp, ok := rawArgs["includeDeprecated"]; ok {432 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated"))433 arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp)434 if err != nil {435 return nil, err436 }437 }438 args["includeDeprecated"] = arg0439 return args, nil440}441// endregion ***************************** args.gotpl *****************************442// region ************************** directives.gotpl **************************443// endregion ************************** directives.gotpl **************************444// region **************************** field.gotpl *****************************445func (ec *executionContext) _Disk_id(ctx context.Context, field graphql.CollectedField, obj *model.Disk) (ret graphql.Marshaler) {446 defer func() {447 if r := recover(); r != nil {448 ec.Error(ctx, ec.Recover(ctx, r))449 ret = graphql.Null450 }451 }()452 fc := &graphql.FieldContext{453 Object: "Disk",454 Field: field,455 Args: nil,456 IsMethod: false,457 IsResolver: false,458 }459 ctx = graphql.WithFieldContext(ctx, fc)460 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {461 ctx = rctx // use context from middleware stack in children462 return obj.ID, nil463 })464 if err != nil {465 ec.Error(ctx, err)466 return graphql.Null467 }468 if resTmp == nil {469 if !graphql.HasFieldError(ctx, fc) {470 ec.Errorf(ctx, "must not be null")471 }472 return graphql.Null473 }474 res := resTmp.(int64)475 fc.Result = res476 return ec.marshalNID2int64(ctx, field.Selections, res)477}478func (ec *executionContext) _Disk_name(ctx context.Context, field graphql.CollectedField, obj *model.Disk) (ret graphql.Marshaler) {479 defer func() {480 if r := recover(); r != nil {481 ec.Error(ctx, ec.Recover(ctx, r))482 ret = graphql.Null483 }484 }()485 fc := &graphql.FieldContext{486 Object: "Disk",487 Field: field,488 Args: nil,489 IsMethod: false,490 IsResolver: false,491 }492 ctx = graphql.WithFieldContext(ctx, fc)493 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {494 ctx = rctx // use context from middleware stack in children495 return obj.Name, nil496 })497 if err != nil {498 ec.Error(ctx, err)499 return graphql.Null500 }501 if resTmp == nil {502 if !graphql.HasFieldError(ctx, fc) {503 ec.Errorf(ctx, "must not be null")504 }505 return graphql.Null506 }507 res := resTmp.(string)508 fc.Result = res509 return ec.marshalNString2string(ctx, field.Selections, res)510}511func (ec *executionContext) _Disk_tags(ctx context.Context, field graphql.CollectedField, obj *model.Disk) (ret graphql.Marshaler) {512 defer func() {513 if r := recover(); r != nil {514 ec.Error(ctx, ec.Recover(ctx, r))515 ret = graphql.Null516 }517 }()518 fc := &graphql.FieldContext{519 Object: "Disk",520 Field: field,521 Args: nil,522 IsMethod: false,523 IsResolver: false,524 }525 ctx = graphql.WithFieldContext(ctx, fc)526 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {527 ctx = rctx // use context from middleware stack in children528 return obj.Tags, nil529 })530 if err != nil {531 ec.Error(ctx, err)532 return graphql.Null533 }534 if resTmp == nil {535 if !graphql.HasFieldError(ctx, fc) {536 ec.Errorf(ctx, "must not be null")537 }538 return graphql.Null539 }540 res := resTmp.([]string)541 fc.Result = res542 return ec.marshalNString2ástringá(ctx, field.Selections, res)543}544func (ec *executionContext) _Disk_description(ctx context.Context, field graphql.CollectedField, obj *model.Disk) (ret graphql.Marshaler) {545 defer func() {546 if r := recover(); r != nil {547 ec.Error(ctx, ec.Recover(ctx, r))548 ret = graphql.Null549 }550 }()551 fc := &graphql.FieldContext{552 Object: "Disk",553 Field: field,554 Args: nil,555 IsMethod: false,556 IsResolver: false,557 }558 ctx = graphql.WithFieldContext(ctx, fc)559 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {560 ctx = rctx // use context from middleware stack in children561 return obj.Description, nil562 })563 if err != nil {564 ec.Error(ctx, err)565 return graphql.Null566 }567 if resTmp == nil {568 if !graphql.HasFieldError(ctx, fc) {569 ec.Errorf(ctx, "must not be null")570 }571 return graphql.Null572 }573 res := resTmp.(string)574 fc.Result = res575 return ec.marshalNString2string(ctx, field.Selections, res)576}577func (ec *executionContext) _Disk_size(ctx context.Context, field graphql.CollectedField, obj *model.Disk) (ret graphql.Marshaler) {578 defer func() {579 if r := recover(); r != nil {580 ec.Error(ctx, ec.Recover(ctx, r))581 ret = graphql.Null582 }583 }()584 fc := &graphql.FieldContext{585 Object: "Disk",586 Field: field,587 Args: nil,588 IsMethod: false,589 IsResolver: false,590 }591 ctx = graphql.WithFieldContext(ctx, fc)592 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {593 ctx = rctx // use context from middleware stack in children594 return obj.Size, nil595 })596 if err != nil {597 ec.Error(ctx, err)598 return graphql.Null599 }600 if resTmp == nil {601 if !graphql.HasFieldError(ctx, fc) {602 ec.Errorf(ctx, "must not be null")603 }604 return graphql.Null605 }606 res := resTmp.(int)607 fc.Result = res608 return ec.marshalNInt2int(ctx, field.Selections, res)609}610func (ec *executionContext) _Mutation_shutdownServer(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {611 defer func() {612 if r := recover(); r != nil {613 ec.Error(ctx, ec.Recover(ctx, r))614 ret = graphql.Null615 }616 }()617 fc := &graphql.FieldContext{618 Object: "Mutation",619 Field: field,620 Args: nil,621 IsMethod: true,622 IsResolver: true,623 }624 ctx = graphql.WithFieldContext(ctx, fc)625 rawArgs := field.ArgumentMap(ec.Variables)626 args, err := ec.field_Mutation_shutdownServer_args(ctx, rawArgs)627 if err != nil {628 ec.Error(ctx, err)629 return graphql.Null630 }631 fc.Args = args632 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {633 ctx = rctx // use context from middleware stack in children634 return ec.resolvers.Mutation().ShutdownServer(rctx, args["zone"].(string), args["id"].(int64), args["option"].(*model.ShutdownOption))635 })636 if err != nil {637 ec.Error(ctx, err)638 return graphql.Null639 }640 if resTmp == nil {641 if !graphql.HasFieldError(ctx, fc) {642 ec.Errorf(ctx, "must not be null")643 }644 return graphql.Null645 }646 res := resTmp.(*model.MutationResult)647 fc.Result = res648 return ec.marshalNMutationResult2ágithubácomásacloudágqlpágraphámodeláMutationResult(ctx, field.Selections, res)649}650func (ec *executionContext) _MutationResult_success(ctx context.Context, field graphql.CollectedField, obj *model.MutationResult) (ret graphql.Marshaler) {651 defer func() {652 if r := recover(); r != nil {653 ec.Error(ctx, ec.Recover(ctx, r))654 ret = graphql.Null655 }656 }()657 fc := &graphql.FieldContext{658 Object: "MutationResult",659 Field: field,660 Args: nil,661 IsMethod: false,662 IsResolver: false,663 }664 ctx = graphql.WithFieldContext(ctx, fc)665 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {666 ctx = rctx // use context from middleware stack in children667 return obj.Success, nil668 })669 if err != nil {670 ec.Error(ctx, err)671 return graphql.Null672 }673 if resTmp == nil {674 if !graphql.HasFieldError(ctx, fc) {675 ec.Errorf(ctx, "must not be null")676 }677 return graphql.Null678 }679 res := resTmp.(bool)680 fc.Result = res681 return ec.marshalNBoolean2bool(ctx, field.Selections, res)682}683func (ec *executionContext) _Query_servers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {684 defer func() {685 if r := recover(); r != nil {686 ec.Error(ctx, ec.Recover(ctx, r))687 ret = graphql.Null688 }689 }()690 fc := &graphql.FieldContext{691 Object: "Query",692 Field: field,693 Args: nil,694 IsMethod: true,695 IsResolver: true,696 }697 ctx = graphql.WithFieldContext(ctx, fc)698 rawArgs := field.ArgumentMap(ec.Variables)699 args, err := ec.field_Query_servers_args(ctx, rawArgs)700 if err != nil {701 ec.Error(ctx, err)702 return graphql.Null703 }704 fc.Args = args705 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {706 ctx = rctx // use context from middleware stack in children707 return ec.resolvers.Query().Servers(rctx, args["zone"].(string))708 })709 if err != nil {710 ec.Error(ctx, err)711 return graphql.Null712 }713 if resTmp == nil {714 if !graphql.HasFieldError(ctx, fc) {715 ec.Errorf(ctx, "must not be null")716 }717 return graphql.Null718 }719 res := resTmp.([]*model.Server)720 fc.Result = res721 return ec.marshalNServer2áágithubácomásacloudágqlpágraphámodeláServerá(ctx, field.Selections, res)722}723func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {724 defer func() {725 if r := recover(); r != nil {726 ec.Error(ctx, ec.Recover(ctx, r))727 ret = graphql.Null728 }729 }()730 fc := &graphql.FieldContext{731 Object: "Query",732 Field: field,733 Args: nil,734 IsMethod: true,735 IsResolver: false,736 }737 ctx = graphql.WithFieldContext(ctx, fc)738 rawArgs := field.ArgumentMap(ec.Variables)739 args, err := ec.field_Query___type_args(ctx, rawArgs)740 if err != nil {741 ec.Error(ctx, err)742 return graphql.Null743 }744 fc.Args = args745 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {746 ctx = rctx // use context from middleware stack in children747 return ec.introspectType(args["name"].(string))748 })749 if err != nil {750 ec.Error(ctx, err)751 return graphql.Null752 }753 if resTmp == nil {754 return graphql.Null755 }756 res := resTmp.(*introspection.Type)757 fc.Result = res758 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)759}760func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {761 defer func() {762 if r := recover(); r != nil {763 ec.Error(ctx, ec.Recover(ctx, r))764 ret = graphql.Null765 }766 }()767 fc := &graphql.FieldContext{768 Object: "Query",769 Field: field,770 Args: nil,771 IsMethod: true,772 IsResolver: false,773 }774 ctx = graphql.WithFieldContext(ctx, fc)775 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {776 ctx = rctx // use context from middleware stack in children777 return ec.introspectSchema()778 })779 if err != nil {780 ec.Error(ctx, err)781 return graphql.Null782 }783 if resTmp == nil {784 return graphql.Null785 }786 res := resTmp.(*introspection.Schema)787 fc.Result = res788 return ec.marshalO__Schema2ágithubácomá99designságqlgenágraphqláintrospectionáSchema(ctx, field.Selections, res)789}790func (ec *executionContext) _Server_id(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {791 defer func() {792 if r := recover(); r != nil {793 ec.Error(ctx, ec.Recover(ctx, r))794 ret = graphql.Null795 }796 }()797 fc := &graphql.FieldContext{798 Object: "Server",799 Field: field,800 Args: nil,801 IsMethod: false,802 IsResolver: false,803 }804 ctx = graphql.WithFieldContext(ctx, fc)805 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {806 ctx = rctx // use context from middleware stack in children807 return obj.ID, nil808 })809 if err != nil {810 ec.Error(ctx, err)811 return graphql.Null812 }813 if resTmp == nil {814 if !graphql.HasFieldError(ctx, fc) {815 ec.Errorf(ctx, "must not be null")816 }817 return graphql.Null818 }819 res := resTmp.(int64)820 fc.Result = res821 return ec.marshalNID2int64(ctx, field.Selections, res)822}823func (ec *executionContext) _Server_name(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {824 defer func() {825 if r := recover(); r != nil {826 ec.Error(ctx, ec.Recover(ctx, r))827 ret = graphql.Null828 }829 }()830 fc := &graphql.FieldContext{831 Object: "Server",832 Field: field,833 Args: nil,834 IsMethod: false,835 IsResolver: false,836 }837 ctx = graphql.WithFieldContext(ctx, fc)838 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {839 ctx = rctx // use context from middleware stack in children840 return obj.Name, nil841 })842 if err != nil {843 ec.Error(ctx, err)844 return graphql.Null845 }846 if resTmp == nil {847 if !graphql.HasFieldError(ctx, fc) {848 ec.Errorf(ctx, "must not be null")849 }850 return graphql.Null851 }852 res := resTmp.(string)853 fc.Result = res854 return ec.marshalNString2string(ctx, field.Selections, res)855}856func (ec *executionContext) _Server_tags(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {857 defer func() {858 if r := recover(); r != nil {859 ec.Error(ctx, ec.Recover(ctx, r))860 ret = graphql.Null861 }862 }()863 fc := &graphql.FieldContext{864 Object: "Server",865 Field: field,866 Args: nil,867 IsMethod: false,868 IsResolver: false,869 }870 ctx = graphql.WithFieldContext(ctx, fc)871 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {872 ctx = rctx // use context from middleware stack in children873 return obj.Tags, nil874 })875 if err != nil {876 ec.Error(ctx, err)877 return graphql.Null878 }879 if resTmp == nil {880 if !graphql.HasFieldError(ctx, fc) {881 ec.Errorf(ctx, "must not be null")882 }883 return graphql.Null884 }885 res := resTmp.([]string)886 fc.Result = res887 return ec.marshalNString2ástringá(ctx, field.Selections, res)888}889func (ec *executionContext) _Server_description(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {890 defer func() {891 if r := recover(); r != nil {892 ec.Error(ctx, ec.Recover(ctx, r))893 ret = graphql.Null894 }895 }()896 fc := &graphql.FieldContext{897 Object: "Server",898 Field: field,899 Args: nil,900 IsMethod: false,901 IsResolver: false,902 }903 ctx = graphql.WithFieldContext(ctx, fc)904 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {905 ctx = rctx // use context from middleware stack in children906 return obj.Description, nil907 })908 if err != nil {909 ec.Error(ctx, err)910 return graphql.Null911 }912 if resTmp == nil {913 if !graphql.HasFieldError(ctx, fc) {914 ec.Errorf(ctx, "must not be null")915 }916 return graphql.Null917 }918 res := resTmp.(string)919 fc.Result = res920 return ec.marshalNString2string(ctx, field.Selections, res)921}922func (ec *executionContext) _Server_availability(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {923 defer func() {924 if r := recover(); r != nil {925 ec.Error(ctx, ec.Recover(ctx, r))926 ret = graphql.Null927 }928 }()929 fc := &graphql.FieldContext{930 Object: "Server",931 Field: field,932 Args: nil,933 IsMethod: false,934 IsResolver: false,935 }936 ctx = graphql.WithFieldContext(ctx, fc)937 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {938 ctx = rctx // use context from middleware stack in children939 return obj.Availability, nil940 })941 if err != nil {942 ec.Error(ctx, err)943 return graphql.Null944 }945 if resTmp == nil {946 if !graphql.HasFieldError(ctx, fc) {947 ec.Errorf(ctx, "must not be null")948 }949 return graphql.Null950 }951 res := resTmp.(string)952 fc.Result = res953 return ec.marshalNString2string(ctx, field.Selections, res)954}955func (ec *executionContext) _Server_hostName(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {956 defer func() {957 if r := recover(); r != nil {958 ec.Error(ctx, ec.Recover(ctx, r))959 ret = graphql.Null960 }961 }()962 fc := &graphql.FieldContext{963 Object: "Server",964 Field: field,965 Args: nil,966 IsMethod: false,967 IsResolver: false,968 }969 ctx = graphql.WithFieldContext(ctx, fc)970 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {971 ctx = rctx // use context from middleware stack in children972 return obj.HostName, nil973 })974 if err != nil {975 ec.Error(ctx, err)976 return graphql.Null977 }978 if resTmp == nil {979 if !graphql.HasFieldError(ctx, fc) {980 ec.Errorf(ctx, "must not be null")981 }982 return graphql.Null983 }984 res := resTmp.(string)985 fc.Result = res986 return ec.marshalNString2string(ctx, field.Selections, res)987}988func (ec *executionContext) _Server_interfaceDriver(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {989 defer func() {990 if r := recover(); r != nil {991 ec.Error(ctx, ec.Recover(ctx, r))992 ret = graphql.Null993 }994 }()995 fc := &graphql.FieldContext{996 Object: "Server",997 Field: field,998 Args: nil,999 IsMethod: false,1000 IsResolver: false,1001 }1002 ctx = graphql.WithFieldContext(ctx, fc)1003 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1004 ctx = rctx // use context from middleware stack in children1005 return obj.InterfaceDriver, nil1006 })1007 if err != nil {1008 ec.Error(ctx, err)1009 return graphql.Null1010 }1011 if resTmp == nil {1012 if !graphql.HasFieldError(ctx, fc) {1013 ec.Errorf(ctx, "must not be null")1014 }1015 return graphql.Null1016 }1017 res := resTmp.(string)1018 fc.Result = res1019 return ec.marshalNString2string(ctx, field.Selections, res)1020}1021func (ec *executionContext) _Server_planID(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1022 defer func() {1023 if r := recover(); r != nil {1024 ec.Error(ctx, ec.Recover(ctx, r))1025 ret = graphql.Null1026 }1027 }()1028 fc := &graphql.FieldContext{1029 Object: "Server",1030 Field: field,1031 Args: nil,1032 IsMethod: false,1033 IsResolver: false,1034 }1035 ctx = graphql.WithFieldContext(ctx, fc)1036 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1037 ctx = rctx // use context from middleware stack in children1038 return obj.PlanID, nil1039 })1040 if err != nil {1041 ec.Error(ctx, err)1042 return graphql.Null1043 }1044 if resTmp == nil {1045 if !graphql.HasFieldError(ctx, fc) {1046 ec.Errorf(ctx, "must not be null")1047 }1048 return graphql.Null1049 }1050 res := resTmp.(int64)1051 fc.Result = res1052 return ec.marshalNID2int64(ctx, field.Selections, res)1053}1054func (ec *executionContext) _Server_planName(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1055 defer func() {1056 if r := recover(); r != nil {1057 ec.Error(ctx, ec.Recover(ctx, r))1058 ret = graphql.Null1059 }1060 }()1061 fc := &graphql.FieldContext{1062 Object: "Server",1063 Field: field,1064 Args: nil,1065 IsMethod: false,1066 IsResolver: false,1067 }1068 ctx = graphql.WithFieldContext(ctx, fc)1069 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1070 ctx = rctx // use context from middleware stack in children1071 return obj.PlanName, nil1072 })1073 if err != nil {1074 ec.Error(ctx, err)1075 return graphql.Null1076 }1077 if resTmp == nil {1078 if !graphql.HasFieldError(ctx, fc) {1079 ec.Errorf(ctx, "must not be null")1080 }1081 return graphql.Null1082 }1083 res := resTmp.(string)1084 fc.Result = res1085 return ec.marshalNString2string(ctx, field.Selections, res)1086}1087func (ec *executionContext) _Server_cpu(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1088 defer func() {1089 if r := recover(); r != nil {1090 ec.Error(ctx, ec.Recover(ctx, r))1091 ret = graphql.Null1092 }1093 }()1094 fc := &graphql.FieldContext{1095 Object: "Server",1096 Field: field,1097 Args: nil,1098 IsMethod: false,1099 IsResolver: false,1100 }1101 ctx = graphql.WithFieldContext(ctx, fc)1102 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1103 ctx = rctx // use context from middleware stack in children1104 return obj.CPU, nil1105 })1106 if err != nil {1107 ec.Error(ctx, err)1108 return graphql.Null1109 }1110 if resTmp == nil {1111 if !graphql.HasFieldError(ctx, fc) {1112 ec.Errorf(ctx, "must not be null")1113 }1114 return graphql.Null1115 }1116 res := resTmp.(int)1117 fc.Result = res1118 return ec.marshalNInt2int(ctx, field.Selections, res)1119}1120func (ec *executionContext) _Server_memory(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1121 defer func() {1122 if r := recover(); r != nil {1123 ec.Error(ctx, ec.Recover(ctx, r))1124 ret = graphql.Null1125 }1126 }()1127 fc := &graphql.FieldContext{1128 Object: "Server",1129 Field: field,1130 Args: nil,1131 IsMethod: false,1132 IsResolver: false,1133 }1134 ctx = graphql.WithFieldContext(ctx, fc)1135 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1136 ctx = rctx // use context from middleware stack in children1137 return obj.Memory, nil1138 })1139 if err != nil {1140 ec.Error(ctx, err)1141 return graphql.Null1142 }1143 if resTmp == nil {1144 if !graphql.HasFieldError(ctx, fc) {1145 ec.Errorf(ctx, "must not be null")1146 }1147 return graphql.Null1148 }1149 res := resTmp.(int)1150 fc.Result = res1151 return ec.marshalNInt2int(ctx, field.Selections, res)1152}1153func (ec *executionContext) _Server_commitment(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1154 defer func() {1155 if r := recover(); r != nil {1156 ec.Error(ctx, ec.Recover(ctx, r))1157 ret = graphql.Null1158 }1159 }()1160 fc := &graphql.FieldContext{1161 Object: "Server",1162 Field: field,1163 Args: nil,1164 IsMethod: false,1165 IsResolver: false,1166 }1167 ctx = graphql.WithFieldContext(ctx, fc)1168 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1169 ctx = rctx // use context from middleware stack in children1170 return obj.Commitment, nil1171 })1172 if err != nil {1173 ec.Error(ctx, err)1174 return graphql.Null1175 }1176 if resTmp == nil {1177 if !graphql.HasFieldError(ctx, fc) {1178 ec.Errorf(ctx, "must not be null")1179 }1180 return graphql.Null1181 }1182 res := resTmp.(string)1183 fc.Result = res1184 return ec.marshalNString2string(ctx, field.Selections, res)1185}1186func (ec *executionContext) _Server_planGeneration(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1187 defer func() {1188 if r := recover(); r != nil {1189 ec.Error(ctx, ec.Recover(ctx, r))1190 ret = graphql.Null1191 }1192 }()1193 fc := &graphql.FieldContext{1194 Object: "Server",1195 Field: field,1196 Args: nil,1197 IsMethod: false,1198 IsResolver: false,1199 }1200 ctx = graphql.WithFieldContext(ctx, fc)1201 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1202 ctx = rctx // use context from middleware stack in children1203 return obj.PlanGeneration, nil1204 })1205 if err != nil {1206 ec.Error(ctx, err)1207 return graphql.Null1208 }1209 if resTmp == nil {1210 if !graphql.HasFieldError(ctx, fc) {1211 ec.Errorf(ctx, "must not be null")1212 }1213 return graphql.Null1214 }1215 res := resTmp.(int)1216 fc.Result = res1217 return ec.marshalNInt2int(ctx, field.Selections, res)1218}1219func (ec *executionContext) _Server_instanceHostName(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1220 defer func() {1221 if r := recover(); r != nil {1222 ec.Error(ctx, ec.Recover(ctx, r))1223 ret = graphql.Null1224 }1225 }()1226 fc := &graphql.FieldContext{1227 Object: "Server",1228 Field: field,1229 Args: nil,1230 IsMethod: false,1231 IsResolver: false,1232 }1233 ctx = graphql.WithFieldContext(ctx, fc)1234 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1235 ctx = rctx // use context from middleware stack in children1236 return obj.InstanceHostName, nil1237 })1238 if err != nil {1239 ec.Error(ctx, err)1240 return graphql.Null1241 }1242 if resTmp == nil {1243 if !graphql.HasFieldError(ctx, fc) {1244 ec.Errorf(ctx, "must not be null")1245 }1246 return graphql.Null1247 }1248 res := resTmp.(string)1249 fc.Result = res1250 return ec.marshalNString2string(ctx, field.Selections, res)1251}1252func (ec *executionContext) _Server_instanceStatus(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1253 defer func() {1254 if r := recover(); r != nil {1255 ec.Error(ctx, ec.Recover(ctx, r))1256 ret = graphql.Null1257 }1258 }()1259 fc := &graphql.FieldContext{1260 Object: "Server",1261 Field: field,1262 Args: nil,1263 IsMethod: false,1264 IsResolver: false,1265 }1266 ctx = graphql.WithFieldContext(ctx, fc)1267 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1268 ctx = rctx // use context from middleware stack in children1269 return obj.InstanceStatus, nil1270 })1271 if err != nil {1272 ec.Error(ctx, err)1273 return graphql.Null1274 }1275 if resTmp == nil {1276 if !graphql.HasFieldError(ctx, fc) {1277 ec.Errorf(ctx, "must not be null")1278 }1279 return graphql.Null1280 }1281 res := resTmp.(string)1282 fc.Result = res1283 return ec.marshalNString2string(ctx, field.Selections, res)1284}1285func (ec *executionContext) _Server_disks(ctx context.Context, field graphql.CollectedField, obj *model.Server) (ret graphql.Marshaler) {1286 defer func() {1287 if r := recover(); r != nil {1288 ec.Error(ctx, ec.Recover(ctx, r))1289 ret = graphql.Null1290 }1291 }()1292 fc := &graphql.FieldContext{1293 Object: "Server",1294 Field: field,1295 Args: nil,1296 IsMethod: true,1297 IsResolver: true,1298 }1299 ctx = graphql.WithFieldContext(ctx, fc)1300 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1301 ctx = rctx // use context from middleware stack in children1302 return ec.resolvers.Server().Disks(rctx, obj)1303 })1304 if err != nil {1305 ec.Error(ctx, err)1306 return graphql.Null1307 }1308 if resTmp == nil {1309 return graphql.Null1310 }1311 res := resTmp.([]*model.Disk)1312 fc.Result = res1313 return ec.marshalODisk2áágithubácomásacloudágqlpágraphámodeláDiská(ctx, field.Selections, res)1314}1315func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {1316 defer func() {1317 if r := recover(); r != nil {1318 ec.Error(ctx, ec.Recover(ctx, r))1319 ret = graphql.Null1320 }1321 }()1322 fc := &graphql.FieldContext{1323 Object: "__Directive",1324 Field: field,1325 Args: nil,1326 IsMethod: false,1327 IsResolver: false,1328 }1329 ctx = graphql.WithFieldContext(ctx, fc)1330 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1331 ctx = rctx // use context from middleware stack in children1332 return obj.Name, nil1333 })1334 if err != nil {1335 ec.Error(ctx, err)1336 return graphql.Null1337 }1338 if resTmp == nil {1339 if !graphql.HasFieldError(ctx, fc) {1340 ec.Errorf(ctx, "must not be null")1341 }1342 return graphql.Null1343 }1344 res := resTmp.(string)1345 fc.Result = res1346 return ec.marshalNString2string(ctx, field.Selections, res)1347}1348func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {1349 defer func() {1350 if r := recover(); r != nil {1351 ec.Error(ctx, ec.Recover(ctx, r))1352 ret = graphql.Null1353 }1354 }()1355 fc := &graphql.FieldContext{1356 Object: "__Directive",1357 Field: field,1358 Args: nil,1359 IsMethod: false,1360 IsResolver: false,1361 }1362 ctx = graphql.WithFieldContext(ctx, fc)1363 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1364 ctx = rctx // use context from middleware stack in children1365 return obj.Description, nil1366 })1367 if err != nil {1368 ec.Error(ctx, err)1369 return graphql.Null1370 }1371 if resTmp == nil {1372 return graphql.Null1373 }1374 res := resTmp.(string)1375 fc.Result = res1376 return ec.marshalOString2string(ctx, field.Selections, res)1377}1378func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {1379 defer func() {1380 if r := recover(); r != nil {1381 ec.Error(ctx, ec.Recover(ctx, r))1382 ret = graphql.Null1383 }1384 }()1385 fc := &graphql.FieldContext{1386 Object: "__Directive",1387 Field: field,1388 Args: nil,1389 IsMethod: false,1390 IsResolver: false,1391 }1392 ctx = graphql.WithFieldContext(ctx, fc)1393 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1394 ctx = rctx // use context from middleware stack in children1395 return obj.Locations, nil1396 })1397 if err != nil {1398 ec.Error(ctx, err)1399 return graphql.Null1400 }1401 if resTmp == nil {1402 if !graphql.HasFieldError(ctx, fc) {1403 ec.Errorf(ctx, "must not be null")1404 }1405 return graphql.Null1406 }1407 res := resTmp.([]string)1408 fc.Result = res1409 return ec.marshalN__DirectiveLocation2ástringá(ctx, field.Selections, res)1410}1411func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {1412 defer func() {1413 if r := recover(); r != nil {1414 ec.Error(ctx, ec.Recover(ctx, r))1415 ret = graphql.Null1416 }1417 }()1418 fc := &graphql.FieldContext{1419 Object: "__Directive",1420 Field: field,1421 Args: nil,1422 IsMethod: false,1423 IsResolver: false,1424 }1425 ctx = graphql.WithFieldContext(ctx, fc)1426 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1427 ctx = rctx // use context from middleware stack in children1428 return obj.Args, nil1429 })1430 if err != nil {1431 ec.Error(ctx, err)1432 return graphql.Null1433 }1434 if resTmp == nil {1435 if !graphql.HasFieldError(ctx, fc) {1436 ec.Errorf(ctx, "must not be null")1437 }1438 return graphql.Null1439 }1440 res := resTmp.([]introspection.InputValue)1441 fc.Result = res1442 return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)1443}1444func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {1445 defer func() {1446 if r := recover(); r != nil {1447 ec.Error(ctx, ec.Recover(ctx, r))1448 ret = graphql.Null1449 }1450 }()1451 fc := &graphql.FieldContext{1452 Object: "__EnumValue",1453 Field: field,1454 Args: nil,1455 IsMethod: false,1456 IsResolver: false,1457 }1458 ctx = graphql.WithFieldContext(ctx, fc)1459 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1460 ctx = rctx // use context from middleware stack in children1461 return obj.Name, nil1462 })1463 if err != nil {1464 ec.Error(ctx, err)1465 return graphql.Null1466 }1467 if resTmp == nil {1468 if !graphql.HasFieldError(ctx, fc) {1469 ec.Errorf(ctx, "must not be null")1470 }1471 return graphql.Null1472 }1473 res := resTmp.(string)1474 fc.Result = res1475 return ec.marshalNString2string(ctx, field.Selections, res)1476}1477func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {1478 defer func() {1479 if r := recover(); r != nil {1480 ec.Error(ctx, ec.Recover(ctx, r))1481 ret = graphql.Null1482 }1483 }()1484 fc := &graphql.FieldContext{1485 Object: "__EnumValue",1486 Field: field,1487 Args: nil,1488 IsMethod: false,1489 IsResolver: false,1490 }1491 ctx = graphql.WithFieldContext(ctx, fc)1492 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1493 ctx = rctx // use context from middleware stack in children1494 return obj.Description, nil1495 })1496 if err != nil {1497 ec.Error(ctx, err)1498 return graphql.Null1499 }1500 if resTmp == nil {1501 return graphql.Null1502 }1503 res := resTmp.(string)1504 fc.Result = res1505 return ec.marshalOString2string(ctx, field.Selections, res)1506}1507func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {1508 defer func() {1509 if r := recover(); r != nil {1510 ec.Error(ctx, ec.Recover(ctx, r))1511 ret = graphql.Null1512 }1513 }()1514 fc := &graphql.FieldContext{1515 Object: "__EnumValue",1516 Field: field,1517 Args: nil,1518 IsMethod: true,1519 IsResolver: false,1520 }1521 ctx = graphql.WithFieldContext(ctx, fc)1522 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1523 ctx = rctx // use context from middleware stack in children1524 return obj.IsDeprecated(), nil1525 })1526 if err != nil {1527 ec.Error(ctx, err)1528 return graphql.Null1529 }1530 if resTmp == nil {1531 if !graphql.HasFieldError(ctx, fc) {1532 ec.Errorf(ctx, "must not be null")1533 }1534 return graphql.Null1535 }1536 res := resTmp.(bool)1537 fc.Result = res1538 return ec.marshalNBoolean2bool(ctx, field.Selections, res)1539}1540func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {1541 defer func() {1542 if r := recover(); r != nil {1543 ec.Error(ctx, ec.Recover(ctx, r))1544 ret = graphql.Null1545 }1546 }()1547 fc := &graphql.FieldContext{1548 Object: "__EnumValue",1549 Field: field,1550 Args: nil,1551 IsMethod: true,1552 IsResolver: false,1553 }1554 ctx = graphql.WithFieldContext(ctx, fc)1555 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1556 ctx = rctx // use context from middleware stack in children1557 return obj.DeprecationReason(), nil1558 })1559 if err != nil {1560 ec.Error(ctx, err)1561 return graphql.Null1562 }1563 if resTmp == nil {1564 return graphql.Null1565 }1566 res := resTmp.(*string)1567 fc.Result = res1568 return ec.marshalOString2ástring(ctx, field.Selections, res)1569}1570func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1571 defer func() {1572 if r := recover(); r != nil {1573 ec.Error(ctx, ec.Recover(ctx, r))1574 ret = graphql.Null1575 }1576 }()1577 fc := &graphql.FieldContext{1578 Object: "__Field",1579 Field: field,1580 Args: nil,1581 IsMethod: false,1582 IsResolver: false,1583 }1584 ctx = graphql.WithFieldContext(ctx, fc)1585 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1586 ctx = rctx // use context from middleware stack in children1587 return obj.Name, nil1588 })1589 if err != nil {1590 ec.Error(ctx, err)1591 return graphql.Null1592 }1593 if resTmp == nil {1594 if !graphql.HasFieldError(ctx, fc) {1595 ec.Errorf(ctx, "must not be null")1596 }1597 return graphql.Null1598 }1599 res := resTmp.(string)1600 fc.Result = res1601 return ec.marshalNString2string(ctx, field.Selections, res)1602}1603func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1604 defer func() {1605 if r := recover(); r != nil {1606 ec.Error(ctx, ec.Recover(ctx, r))1607 ret = graphql.Null1608 }1609 }()1610 fc := &graphql.FieldContext{1611 Object: "__Field",1612 Field: field,1613 Args: nil,1614 IsMethod: false,1615 IsResolver: false,1616 }1617 ctx = graphql.WithFieldContext(ctx, fc)1618 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1619 ctx = rctx // use context from middleware stack in children1620 return obj.Description, nil1621 })1622 if err != nil {1623 ec.Error(ctx, err)1624 return graphql.Null1625 }1626 if resTmp == nil {1627 return graphql.Null1628 }1629 res := resTmp.(string)1630 fc.Result = res1631 return ec.marshalOString2string(ctx, field.Selections, res)1632}1633func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1634 defer func() {1635 if r := recover(); r != nil {1636 ec.Error(ctx, ec.Recover(ctx, r))1637 ret = graphql.Null1638 }1639 }()1640 fc := &graphql.FieldContext{1641 Object: "__Field",1642 Field: field,1643 Args: nil,1644 IsMethod: false,1645 IsResolver: false,1646 }1647 ctx = graphql.WithFieldContext(ctx, fc)1648 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1649 ctx = rctx // use context from middleware stack in children1650 return obj.Args, nil1651 })1652 if err != nil {1653 ec.Error(ctx, err)1654 return graphql.Null1655 }1656 if resTmp == nil {1657 if !graphql.HasFieldError(ctx, fc) {1658 ec.Errorf(ctx, "must not be null")1659 }1660 return graphql.Null1661 }1662 res := resTmp.([]introspection.InputValue)1663 fc.Result = res1664 return ec.marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)1665}1666func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1667 defer func() {1668 if r := recover(); r != nil {1669 ec.Error(ctx, ec.Recover(ctx, r))1670 ret = graphql.Null1671 }1672 }()1673 fc := &graphql.FieldContext{1674 Object: "__Field",1675 Field: field,1676 Args: nil,1677 IsMethod: false,1678 IsResolver: false,1679 }1680 ctx = graphql.WithFieldContext(ctx, fc)1681 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1682 ctx = rctx // use context from middleware stack in children1683 return obj.Type, nil1684 })1685 if err != nil {1686 ec.Error(ctx, err)1687 return graphql.Null1688 }1689 if resTmp == nil {1690 if !graphql.HasFieldError(ctx, fc) {1691 ec.Errorf(ctx, "must not be null")1692 }1693 return graphql.Null1694 }1695 res := resTmp.(*introspection.Type)1696 fc.Result = res1697 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1698}1699func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1700 defer func() {1701 if r := recover(); r != nil {1702 ec.Error(ctx, ec.Recover(ctx, r))1703 ret = graphql.Null1704 }1705 }()1706 fc := &graphql.FieldContext{1707 Object: "__Field",1708 Field: field,1709 Args: nil,1710 IsMethod: true,1711 IsResolver: false,1712 }1713 ctx = graphql.WithFieldContext(ctx, fc)1714 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1715 ctx = rctx // use context from middleware stack in children1716 return obj.IsDeprecated(), nil1717 })1718 if err != nil {1719 ec.Error(ctx, err)1720 return graphql.Null1721 }1722 if resTmp == nil {1723 if !graphql.HasFieldError(ctx, fc) {1724 ec.Errorf(ctx, "must not be null")1725 }1726 return graphql.Null1727 }1728 res := resTmp.(bool)1729 fc.Result = res1730 return ec.marshalNBoolean2bool(ctx, field.Selections, res)1731}1732func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {1733 defer func() {1734 if r := recover(); r != nil {1735 ec.Error(ctx, ec.Recover(ctx, r))1736 ret = graphql.Null1737 }1738 }()1739 fc := &graphql.FieldContext{1740 Object: "__Field",1741 Field: field,1742 Args: nil,1743 IsMethod: true,1744 IsResolver: false,1745 }1746 ctx = graphql.WithFieldContext(ctx, fc)1747 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1748 ctx = rctx // use context from middleware stack in children1749 return obj.DeprecationReason(), nil1750 })1751 if err != nil {1752 ec.Error(ctx, err)1753 return graphql.Null1754 }1755 if resTmp == nil {1756 return graphql.Null1757 }1758 res := resTmp.(*string)1759 fc.Result = res1760 return ec.marshalOString2ástring(ctx, field.Selections, res)1761}1762func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1763 defer func() {1764 if r := recover(); r != nil {1765 ec.Error(ctx, ec.Recover(ctx, r))1766 ret = graphql.Null1767 }1768 }()1769 fc := &graphql.FieldContext{1770 Object: "__InputValue",1771 Field: field,1772 Args: nil,1773 IsMethod: false,1774 IsResolver: false,1775 }1776 ctx = graphql.WithFieldContext(ctx, fc)1777 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1778 ctx = rctx // use context from middleware stack in children1779 return obj.Name, nil1780 })1781 if err != nil {1782 ec.Error(ctx, err)1783 return graphql.Null1784 }1785 if resTmp == nil {1786 if !graphql.HasFieldError(ctx, fc) {1787 ec.Errorf(ctx, "must not be null")1788 }1789 return graphql.Null1790 }1791 res := resTmp.(string)1792 fc.Result = res1793 return ec.marshalNString2string(ctx, field.Selections, res)1794}1795func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1796 defer func() {1797 if r := recover(); r != nil {1798 ec.Error(ctx, ec.Recover(ctx, r))1799 ret = graphql.Null1800 }1801 }()1802 fc := &graphql.FieldContext{1803 Object: "__InputValue",1804 Field: field,1805 Args: nil,1806 IsMethod: false,1807 IsResolver: false,1808 }1809 ctx = graphql.WithFieldContext(ctx, fc)1810 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1811 ctx = rctx // use context from middleware stack in children1812 return obj.Description, nil1813 })1814 if err != nil {1815 ec.Error(ctx, err)1816 return graphql.Null1817 }1818 if resTmp == nil {1819 return graphql.Null1820 }1821 res := resTmp.(string)1822 fc.Result = res1823 return ec.marshalOString2string(ctx, field.Selections, res)1824}1825func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1826 defer func() {1827 if r := recover(); r != nil {1828 ec.Error(ctx, ec.Recover(ctx, r))1829 ret = graphql.Null1830 }1831 }()1832 fc := &graphql.FieldContext{1833 Object: "__InputValue",1834 Field: field,1835 Args: nil,1836 IsMethod: false,1837 IsResolver: false,1838 }1839 ctx = graphql.WithFieldContext(ctx, fc)1840 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1841 ctx = rctx // use context from middleware stack in children1842 return obj.Type, nil1843 })1844 if err != nil {1845 ec.Error(ctx, err)1846 return graphql.Null1847 }1848 if resTmp == nil {1849 if !graphql.HasFieldError(ctx, fc) {1850 ec.Errorf(ctx, "must not be null")1851 }1852 return graphql.Null1853 }1854 res := resTmp.(*introspection.Type)1855 fc.Result = res1856 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1857}1858func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {1859 defer func() {1860 if r := recover(); r != nil {1861 ec.Error(ctx, ec.Recover(ctx, r))1862 ret = graphql.Null1863 }1864 }()1865 fc := &graphql.FieldContext{1866 Object: "__InputValue",1867 Field: field,1868 Args: nil,1869 IsMethod: false,1870 IsResolver: false,1871 }1872 ctx = graphql.WithFieldContext(ctx, fc)1873 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1874 ctx = rctx // use context from middleware stack in children1875 return obj.DefaultValue, nil1876 })1877 if err != nil {1878 ec.Error(ctx, err)1879 return graphql.Null1880 }1881 if resTmp == nil {1882 return graphql.Null1883 }1884 res := resTmp.(*string)1885 fc.Result = res1886 return ec.marshalOString2ástring(ctx, field.Selections, res)1887}1888func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1889 defer func() {1890 if r := recover(); r != nil {1891 ec.Error(ctx, ec.Recover(ctx, r))1892 ret = graphql.Null1893 }1894 }()1895 fc := &graphql.FieldContext{1896 Object: "__Schema",1897 Field: field,1898 Args: nil,1899 IsMethod: true,1900 IsResolver: false,1901 }1902 ctx = graphql.WithFieldContext(ctx, fc)1903 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1904 ctx = rctx // use context from middleware stack in children1905 return obj.Types(), nil1906 })1907 if err != nil {1908 ec.Error(ctx, err)1909 return graphql.Null1910 }1911 if resTmp == nil {1912 if !graphql.HasFieldError(ctx, fc) {1913 ec.Errorf(ctx, "must not be null")1914 }1915 return graphql.Null1916 }1917 res := resTmp.([]introspection.Type)1918 fc.Result = res1919 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)1920}1921func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1922 defer func() {1923 if r := recover(); r != nil {1924 ec.Error(ctx, ec.Recover(ctx, r))1925 ret = graphql.Null1926 }1927 }()1928 fc := &graphql.FieldContext{1929 Object: "__Schema",1930 Field: field,1931 Args: nil,1932 IsMethod: true,1933 IsResolver: false,1934 }1935 ctx = graphql.WithFieldContext(ctx, fc)1936 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1937 ctx = rctx // use context from middleware stack in children1938 return obj.QueryType(), nil1939 })1940 if err != nil {1941 ec.Error(ctx, err)1942 return graphql.Null1943 }1944 if resTmp == nil {1945 if !graphql.HasFieldError(ctx, fc) {1946 ec.Errorf(ctx, "must not be null")1947 }1948 return graphql.Null1949 }1950 res := resTmp.(*introspection.Type)1951 fc.Result = res1952 return ec.marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1953}1954func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1955 defer func() {1956 if r := recover(); r != nil {1957 ec.Error(ctx, ec.Recover(ctx, r))1958 ret = graphql.Null1959 }1960 }()1961 fc := &graphql.FieldContext{1962 Object: "__Schema",1963 Field: field,1964 Args: nil,1965 IsMethod: true,1966 IsResolver: false,1967 }1968 ctx = graphql.WithFieldContext(ctx, fc)1969 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {1970 ctx = rctx // use context from middleware stack in children1971 return obj.MutationType(), nil1972 })1973 if err != nil {1974 ec.Error(ctx, err)1975 return graphql.Null1976 }1977 if resTmp == nil {1978 return graphql.Null1979 }1980 res := resTmp.(*introspection.Type)1981 fc.Result = res1982 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)1983}1984func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {1985 defer func() {1986 if r := recover(); r != nil {1987 ec.Error(ctx, ec.Recover(ctx, r))1988 ret = graphql.Null1989 }1990 }()1991 fc := &graphql.FieldContext{1992 Object: "__Schema",1993 Field: field,1994 Args: nil,1995 IsMethod: true,1996 IsResolver: false,1997 }1998 ctx = graphql.WithFieldContext(ctx, fc)1999 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2000 ctx = rctx // use context from middleware stack in children2001 return obj.SubscriptionType(), nil2002 })2003 if err != nil {2004 ec.Error(ctx, err)2005 return graphql.Null2006 }2007 if resTmp == nil {2008 return graphql.Null2009 }2010 res := resTmp.(*introspection.Type)2011 fc.Result = res2012 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)2013}2014func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {2015 defer func() {2016 if r := recover(); r != nil {2017 ec.Error(ctx, ec.Recover(ctx, r))2018 ret = graphql.Null2019 }2020 }()2021 fc := &graphql.FieldContext{2022 Object: "__Schema",2023 Field: field,2024 Args: nil,2025 IsMethod: true,2026 IsResolver: false,2027 }2028 ctx = graphql.WithFieldContext(ctx, fc)2029 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2030 ctx = rctx // use context from middleware stack in children2031 return obj.Directives(), nil2032 })2033 if err != nil {2034 ec.Error(ctx, err)2035 return graphql.Null2036 }2037 if resTmp == nil {2038 if !graphql.HasFieldError(ctx, fc) {2039 ec.Errorf(ctx, "must not be null")2040 }2041 return graphql.Null2042 }2043 res := resTmp.([]introspection.Directive)2044 fc.Result = res2045 return ec.marshalN__Directive2ágithubácomá99designságqlgenágraphqláintrospectionáDirectiveá(ctx, field.Selections, res)2046}2047func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2048 defer func() {2049 if r := recover(); r != nil {2050 ec.Error(ctx, ec.Recover(ctx, r))2051 ret = graphql.Null2052 }2053 }()2054 fc := &graphql.FieldContext{2055 Object: "__Type",2056 Field: field,2057 Args: nil,2058 IsMethod: true,2059 IsResolver: false,2060 }2061 ctx = graphql.WithFieldContext(ctx, fc)2062 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2063 ctx = rctx // use context from middleware stack in children2064 return obj.Kind(), nil2065 })2066 if err != nil {2067 ec.Error(ctx, err)2068 return graphql.Null2069 }2070 if resTmp == nil {2071 if !graphql.HasFieldError(ctx, fc) {2072 ec.Errorf(ctx, "must not be null")2073 }2074 return graphql.Null2075 }2076 res := resTmp.(string)2077 fc.Result = res2078 return ec.marshalN__TypeKind2string(ctx, field.Selections, res)2079}2080func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2081 defer func() {2082 if r := recover(); r != nil {2083 ec.Error(ctx, ec.Recover(ctx, r))2084 ret = graphql.Null2085 }2086 }()2087 fc := &graphql.FieldContext{2088 Object: "__Type",2089 Field: field,2090 Args: nil,2091 IsMethod: true,2092 IsResolver: false,2093 }2094 ctx = graphql.WithFieldContext(ctx, fc)2095 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2096 ctx = rctx // use context from middleware stack in children2097 return obj.Name(), nil2098 })2099 if err != nil {2100 ec.Error(ctx, err)2101 return graphql.Null2102 }2103 if resTmp == nil {2104 return graphql.Null2105 }2106 res := resTmp.(*string)2107 fc.Result = res2108 return ec.marshalOString2ástring(ctx, field.Selections, res)2109}2110func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2111 defer func() {2112 if r := recover(); r != nil {2113 ec.Error(ctx, ec.Recover(ctx, r))2114 ret = graphql.Null2115 }2116 }()2117 fc := &graphql.FieldContext{2118 Object: "__Type",2119 Field: field,2120 Args: nil,2121 IsMethod: true,2122 IsResolver: false,2123 }2124 ctx = graphql.WithFieldContext(ctx, fc)2125 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2126 ctx = rctx // use context from middleware stack in children2127 return obj.Description(), nil2128 })2129 if err != nil {2130 ec.Error(ctx, err)2131 return graphql.Null2132 }2133 if resTmp == nil {2134 return graphql.Null2135 }2136 res := resTmp.(string)2137 fc.Result = res2138 return ec.marshalOString2string(ctx, field.Selections, res)2139}2140func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2141 defer func() {2142 if r := recover(); r != nil {2143 ec.Error(ctx, ec.Recover(ctx, r))2144 ret = graphql.Null2145 }2146 }()2147 fc := &graphql.FieldContext{2148 Object: "__Type",2149 Field: field,2150 Args: nil,2151 IsMethod: true,2152 IsResolver: false,2153 }2154 ctx = graphql.WithFieldContext(ctx, fc)2155 rawArgs := field.ArgumentMap(ec.Variables)2156 args, err := ec.field___Type_fields_args(ctx, rawArgs)2157 if err != nil {2158 ec.Error(ctx, err)2159 return graphql.Null2160 }2161 fc.Args = args2162 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2163 ctx = rctx // use context from middleware stack in children2164 return obj.Fields(args["includeDeprecated"].(bool)), nil2165 })2166 if err != nil {2167 ec.Error(ctx, err)2168 return graphql.Null2169 }2170 if resTmp == nil {2171 return graphql.Null2172 }2173 res := resTmp.([]introspection.Field)2174 fc.Result = res2175 return ec.marshalO__Field2ágithubácomá99designságqlgenágraphqláintrospectionáFieldá(ctx, field.Selections, res)2176}2177func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2178 defer func() {2179 if r := recover(); r != nil {2180 ec.Error(ctx, ec.Recover(ctx, r))2181 ret = graphql.Null2182 }2183 }()2184 fc := &graphql.FieldContext{2185 Object: "__Type",2186 Field: field,2187 Args: nil,2188 IsMethod: true,2189 IsResolver: false,2190 }2191 ctx = graphql.WithFieldContext(ctx, fc)2192 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2193 ctx = rctx // use context from middleware stack in children2194 return obj.Interfaces(), nil2195 })2196 if err != nil {2197 ec.Error(ctx, err)2198 return graphql.Null2199 }2200 if resTmp == nil {2201 return graphql.Null2202 }2203 res := resTmp.([]introspection.Type)2204 fc.Result = res2205 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)2206}2207func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2208 defer func() {2209 if r := recover(); r != nil {2210 ec.Error(ctx, ec.Recover(ctx, r))2211 ret = graphql.Null2212 }2213 }()2214 fc := &graphql.FieldContext{2215 Object: "__Type",2216 Field: field,2217 Args: nil,2218 IsMethod: true,2219 IsResolver: false,2220 }2221 ctx = graphql.WithFieldContext(ctx, fc)2222 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2223 ctx = rctx // use context from middleware stack in children2224 return obj.PossibleTypes(), nil2225 })2226 if err != nil {2227 ec.Error(ctx, err)2228 return graphql.Null2229 }2230 if resTmp == nil {2231 return graphql.Null2232 }2233 res := resTmp.([]introspection.Type)2234 fc.Result = res2235 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx, field.Selections, res)2236}2237func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2238 defer func() {2239 if r := recover(); r != nil {2240 ec.Error(ctx, ec.Recover(ctx, r))2241 ret = graphql.Null2242 }2243 }()2244 fc := &graphql.FieldContext{2245 Object: "__Type",2246 Field: field,2247 Args: nil,2248 IsMethod: true,2249 IsResolver: false,2250 }2251 ctx = graphql.WithFieldContext(ctx, fc)2252 rawArgs := field.ArgumentMap(ec.Variables)2253 args, err := ec.field___Type_enumValues_args(ctx, rawArgs)2254 if err != nil {2255 ec.Error(ctx, err)2256 return graphql.Null2257 }2258 fc.Args = args2259 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2260 ctx = rctx // use context from middleware stack in children2261 return obj.EnumValues(args["includeDeprecated"].(bool)), nil2262 })2263 if err != nil {2264 ec.Error(ctx, err)2265 return graphql.Null2266 }2267 if resTmp == nil {2268 return graphql.Null2269 }2270 res := resTmp.([]introspection.EnumValue)2271 fc.Result = res2272 return ec.marshalO__EnumValue2ágithubácomá99designságqlgenágraphqláintrospectionáEnumValueá(ctx, field.Selections, res)2273}2274func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2275 defer func() {2276 if r := recover(); r != nil {2277 ec.Error(ctx, ec.Recover(ctx, r))2278 ret = graphql.Null2279 }2280 }()2281 fc := &graphql.FieldContext{2282 Object: "__Type",2283 Field: field,2284 Args: nil,2285 IsMethod: true,2286 IsResolver: false,2287 }2288 ctx = graphql.WithFieldContext(ctx, fc)2289 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2290 ctx = rctx // use context from middleware stack in children2291 return obj.InputFields(), nil2292 })2293 if err != nil {2294 ec.Error(ctx, err)2295 return graphql.Null2296 }2297 if resTmp == nil {2298 return graphql.Null2299 }2300 res := resTmp.([]introspection.InputValue)2301 fc.Result = res2302 return ec.marshalO__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx, field.Selections, res)2303}2304func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {2305 defer func() {2306 if r := recover(); r != nil {2307 ec.Error(ctx, ec.Recover(ctx, r))2308 ret = graphql.Null2309 }2310 }()2311 fc := &graphql.FieldContext{2312 Object: "__Type",2313 Field: field,2314 Args: nil,2315 IsMethod: true,2316 IsResolver: false,2317 }2318 ctx = graphql.WithFieldContext(ctx, fc)2319 resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {2320 ctx = rctx // use context from middleware stack in children2321 return obj.OfType(), nil2322 })2323 if err != nil {2324 ec.Error(ctx, err)2325 return graphql.Null2326 }2327 if resTmp == nil {2328 return graphql.Null2329 }2330 res := resTmp.(*introspection.Type)2331 fc.Result = res2332 return ec.marshalO__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx, field.Selections, res)2333}2334// endregion **************************** field.gotpl *****************************2335// region **************************** input.gotpl *****************************2336func (ec *executionContext) unmarshalInputShutdownOption(ctx context.Context, obj interface{}) (model.ShutdownOption, error) {2337 var it model.ShutdownOption2338 var asMap = obj.(map[string]interface{})2339 for k, v := range asMap {2340 switch k {2341 case "force":2342 var err error2343 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("force"))2344 it.Force, err = ec.unmarshalNBoolean2bool(ctx, v)2345 if err != nil {2346 return it, err2347 }2348 }2349 }2350 return it, nil2351}2352// endregion **************************** input.gotpl *****************************2353// region ************************** interface.gotpl ***************************2354// endregion ************************** interface.gotpl ***************************2355// region **************************** object.gotpl ****************************2356var diskImplementors = []string{"Disk"}2357func (ec *executionContext) _Disk(ctx context.Context, sel ast.SelectionSet, obj *model.Disk) graphql.Marshaler {2358 fields := graphql.CollectFields(ec.OperationContext, sel, diskImplementors)2359 out := graphql.NewFieldSet(fields)2360 var invalids uint322361 for i, field := range fields {2362 switch field.Name {2363 case "__typename":2364 out.Values[i] = graphql.MarshalString("Disk")2365 case "id":2366 out.Values[i] = ec._Disk_id(ctx, field, obj)2367 if out.Values[i] == graphql.Null {2368 invalids++2369 }2370 case "name":2371 out.Values[i] = ec._Disk_name(ctx, field, obj)2372 if out.Values[i] == graphql.Null {2373 invalids++2374 }2375 case "tags":2376 out.Values[i] = ec._Disk_tags(ctx, field, obj)2377 if out.Values[i] == graphql.Null {2378 invalids++2379 }2380 case "description":2381 out.Values[i] = ec._Disk_description(ctx, field, obj)2382 if out.Values[i] == graphql.Null {2383 invalids++2384 }2385 case "size":2386 out.Values[i] = ec._Disk_size(ctx, field, obj)2387 if out.Values[i] == graphql.Null {2388 invalids++2389 }2390 default:2391 panic("unknown field " + strconv.Quote(field.Name))2392 }2393 }2394 out.Dispatch()2395 if invalids > 0 {2396 return graphql.Null2397 }2398 return out2399}2400var mutationImplementors = []string{"Mutation"}2401func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {2402 fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)2403 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{2404 Object: "Mutation",2405 })2406 out := graphql.NewFieldSet(fields)2407 var invalids uint322408 for i, field := range fields {2409 switch field.Name {2410 case "__typename":2411 out.Values[i] = graphql.MarshalString("Mutation")2412 case "shutdownServer":2413 out.Values[i] = ec._Mutation_shutdownServer(ctx, field)2414 if out.Values[i] == graphql.Null {2415 invalids++2416 }2417 default:2418 panic("unknown field " + strconv.Quote(field.Name))2419 }2420 }2421 out.Dispatch()2422 if invalids > 0 {2423 return graphql.Null2424 }2425 return out2426}2427var mutationResultImplementors = []string{"MutationResult"}2428func (ec *executionContext) _MutationResult(ctx context.Context, sel ast.SelectionSet, obj *model.MutationResult) graphql.Marshaler {2429 fields := graphql.CollectFields(ec.OperationContext, sel, mutationResultImplementors)2430 out := graphql.NewFieldSet(fields)2431 var invalids uint322432 for i, field := range fields {2433 switch field.Name {2434 case "__typename":2435 out.Values[i] = graphql.MarshalString("MutationResult")2436 case "success":2437 out.Values[i] = ec._MutationResult_success(ctx, field, obj)2438 if out.Values[i] == graphql.Null {2439 invalids++2440 }2441 default:2442 panic("unknown field " + strconv.Quote(field.Name))2443 }2444 }2445 out.Dispatch()2446 if invalids > 0 {2447 return graphql.Null2448 }2449 return out2450}2451var queryImplementors = []string{"Query"}2452func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {2453 fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)2454 ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{2455 Object: "Query",2456 })2457 out := graphql.NewFieldSet(fields)2458 var invalids uint322459 for i, field := range fields {2460 switch field.Name {2461 case "__typename":2462 out.Values[i] = graphql.MarshalString("Query")2463 case "servers":2464 field := field2465 out.Concurrently(i, func() (res graphql.Marshaler) {2466 defer func() {2467 if r := recover(); r != nil {2468 ec.Error(ctx, ec.Recover(ctx, r))2469 }2470 }()2471 res = ec._Query_servers(ctx, field)2472 if res == graphql.Null {2473 atomic.AddUint32(&invalids, 1)2474 }2475 return res2476 })2477 case "__type":2478 out.Values[i] = ec._Query___type(ctx, field)2479 case "__schema":2480 out.Values[i] = ec._Query___schema(ctx, field)2481 default:2482 panic("unknown field " + strconv.Quote(field.Name))2483 }2484 }2485 out.Dispatch()2486 if invalids > 0 {2487 return graphql.Null2488 }2489 return out2490}2491var serverImplementors = []string{"Server"}2492func (ec *executionContext) _Server(ctx context.Context, sel ast.SelectionSet, obj *model.Server) graphql.Marshaler {2493 fields := graphql.CollectFields(ec.OperationContext, sel, serverImplementors)2494 out := graphql.NewFieldSet(fields)2495 var invalids uint322496 for i, field := range fields {2497 switch field.Name {2498 case "__typename":2499 out.Values[i] = graphql.MarshalString("Server")2500 case "id":2501 out.Values[i] = ec._Server_id(ctx, field, obj)2502 if out.Values[i] == graphql.Null {2503 atomic.AddUint32(&invalids, 1)2504 }2505 case "name":2506 out.Values[i] = ec._Server_name(ctx, field, obj)2507 if out.Values[i] == graphql.Null {2508 atomic.AddUint32(&invalids, 1)2509 }2510 case "tags":2511 out.Values[i] = ec._Server_tags(ctx, field, obj)2512 if out.Values[i] == graphql.Null {2513 atomic.AddUint32(&invalids, 1)2514 }2515 case "description":2516 out.Values[i] = ec._Server_description(ctx, field, obj)2517 if out.Values[i] == graphql.Null {2518 atomic.AddUint32(&invalids, 1)2519 }2520 case "availability":2521 out.Values[i] = ec._Server_availability(ctx, field, obj)2522 if out.Values[i] == graphql.Null {2523 atomic.AddUint32(&invalids, 1)2524 }2525 case "hostName":2526 out.Values[i] = ec._Server_hostName(ctx, field, obj)2527 if out.Values[i] == graphql.Null {2528 atomic.AddUint32(&invalids, 1)2529 }2530 case "interfaceDriver":2531 out.Values[i] = ec._Server_interfaceDriver(ctx, field, obj)2532 if out.Values[i] == graphql.Null {2533 atomic.AddUint32(&invalids, 1)2534 }2535 case "planID":2536 out.Values[i] = ec._Server_planID(ctx, field, obj)2537 if out.Values[i] == graphql.Null {2538 atomic.AddUint32(&invalids, 1)2539 }2540 case "planName":2541 out.Values[i] = ec._Server_planName(ctx, field, obj)2542 if out.Values[i] == graphql.Null {2543 atomic.AddUint32(&invalids, 1)2544 }2545 case "cpu":2546 out.Values[i] = ec._Server_cpu(ctx, field, obj)2547 if out.Values[i] == graphql.Null {2548 atomic.AddUint32(&invalids, 1)2549 }2550 case "memory":2551 out.Values[i] = ec._Server_memory(ctx, field, obj)2552 if out.Values[i] == graphql.Null {2553 atomic.AddUint32(&invalids, 1)2554 }2555 case "commitment":2556 out.Values[i] = ec._Server_commitment(ctx, field, obj)2557 if out.Values[i] == graphql.Null {2558 atomic.AddUint32(&invalids, 1)2559 }2560 case "planGeneration":2561 out.Values[i] = ec._Server_planGeneration(ctx, field, obj)2562 if out.Values[i] == graphql.Null {2563 atomic.AddUint32(&invalids, 1)2564 }2565 case "instanceHostName":2566 out.Values[i] = ec._Server_instanceHostName(ctx, field, obj)2567 if out.Values[i] == graphql.Null {2568 atomic.AddUint32(&invalids, 1)2569 }2570 case "instanceStatus":2571 out.Values[i] = ec._Server_instanceStatus(ctx, field, obj)2572 if out.Values[i] == graphql.Null {2573 atomic.AddUint32(&invalids, 1)2574 }2575 case "disks":2576 field := field2577 out.Concurrently(i, func() (res graphql.Marshaler) {2578 defer func() {2579 if r := recover(); r != nil {2580 ec.Error(ctx, ec.Recover(ctx, r))2581 }2582 }()2583 res = ec._Server_disks(ctx, field, obj)2584 return res2585 })2586 default:2587 panic("unknown field " + strconv.Quote(field.Name))2588 }2589 }2590 out.Dispatch()2591 if invalids > 0 {2592 return graphql.Null2593 }2594 return out2595}2596var __DirectiveImplementors = []string{"__Directive"}2597func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {2598 fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)2599 out := graphql.NewFieldSet(fields)2600 var invalids uint322601 for i, field := range fields {2602 switch field.Name {2603 case "__typename":2604 out.Values[i] = graphql.MarshalString("__Directive")2605 case "name":2606 out.Values[i] = ec.___Directive_name(ctx, field, obj)2607 if out.Values[i] == graphql.Null {2608 invalids++2609 }2610 case "description":2611 out.Values[i] = ec.___Directive_description(ctx, field, obj)2612 case "locations":2613 out.Values[i] = ec.___Directive_locations(ctx, field, obj)2614 if out.Values[i] == graphql.Null {2615 invalids++2616 }2617 case "args":2618 out.Values[i] = ec.___Directive_args(ctx, field, obj)2619 if out.Values[i] == graphql.Null {2620 invalids++2621 }2622 default:2623 panic("unknown field " + strconv.Quote(field.Name))2624 }2625 }2626 out.Dispatch()2627 if invalids > 0 {2628 return graphql.Null2629 }2630 return out2631}2632var __EnumValueImplementors = []string{"__EnumValue"}2633func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {2634 fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)2635 out := graphql.NewFieldSet(fields)2636 var invalids uint322637 for i, field := range fields {2638 switch field.Name {2639 case "__typename":2640 out.Values[i] = graphql.MarshalString("__EnumValue")2641 case "name":2642 out.Values[i] = ec.___EnumValue_name(ctx, field, obj)2643 if out.Values[i] == graphql.Null {2644 invalids++2645 }2646 case "description":2647 out.Values[i] = ec.___EnumValue_description(ctx, field, obj)2648 case "isDeprecated":2649 out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)2650 if out.Values[i] == graphql.Null {2651 invalids++2652 }2653 case "deprecationReason":2654 out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)2655 default:2656 panic("unknown field " + strconv.Quote(field.Name))2657 }2658 }2659 out.Dispatch()2660 if invalids > 0 {2661 return graphql.Null2662 }2663 return out2664}2665var __FieldImplementors = []string{"__Field"}2666func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {2667 fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)2668 out := graphql.NewFieldSet(fields)2669 var invalids uint322670 for i, field := range fields {2671 switch field.Name {2672 case "__typename":2673 out.Values[i] = graphql.MarshalString("__Field")2674 case "name":2675 out.Values[i] = ec.___Field_name(ctx, field, obj)2676 if out.Values[i] == graphql.Null {2677 invalids++2678 }2679 case "description":2680 out.Values[i] = ec.___Field_description(ctx, field, obj)2681 case "args":2682 out.Values[i] = ec.___Field_args(ctx, field, obj)2683 if out.Values[i] == graphql.Null {2684 invalids++2685 }2686 case "type":2687 out.Values[i] = ec.___Field_type(ctx, field, obj)2688 if out.Values[i] == graphql.Null {2689 invalids++2690 }2691 case "isDeprecated":2692 out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)2693 if out.Values[i] == graphql.Null {2694 invalids++2695 }2696 case "deprecationReason":2697 out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)2698 default:2699 panic("unknown field " + strconv.Quote(field.Name))2700 }2701 }2702 out.Dispatch()2703 if invalids > 0 {2704 return graphql.Null2705 }2706 return out2707}2708var __InputValueImplementors = []string{"__InputValue"}2709func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {2710 fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)2711 out := graphql.NewFieldSet(fields)2712 var invalids uint322713 for i, field := range fields {2714 switch field.Name {2715 case "__typename":2716 out.Values[i] = graphql.MarshalString("__InputValue")2717 case "name":2718 out.Values[i] = ec.___InputValue_name(ctx, field, obj)2719 if out.Values[i] == graphql.Null {2720 invalids++2721 }2722 case "description":2723 out.Values[i] = ec.___InputValue_description(ctx, field, obj)2724 case "type":2725 out.Values[i] = ec.___InputValue_type(ctx, field, obj)2726 if out.Values[i] == graphql.Null {2727 invalids++2728 }2729 case "defaultValue":2730 out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)2731 default:2732 panic("unknown field " + strconv.Quote(field.Name))2733 }2734 }2735 out.Dispatch()2736 if invalids > 0 {2737 return graphql.Null2738 }2739 return out2740}2741var __SchemaImplementors = []string{"__Schema"}2742func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {2743 fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)2744 out := graphql.NewFieldSet(fields)2745 var invalids uint322746 for i, field := range fields {2747 switch field.Name {2748 case "__typename":2749 out.Values[i] = graphql.MarshalString("__Schema")2750 case "types":2751 out.Values[i] = ec.___Schema_types(ctx, field, obj)2752 if out.Values[i] == graphql.Null {2753 invalids++2754 }2755 case "queryType":2756 out.Values[i] = ec.___Schema_queryType(ctx, field, obj)2757 if out.Values[i] == graphql.Null {2758 invalids++2759 }2760 case "mutationType":2761 out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)2762 case "subscriptionType":2763 out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)2764 case "directives":2765 out.Values[i] = ec.___Schema_directives(ctx, field, obj)2766 if out.Values[i] == graphql.Null {2767 invalids++2768 }2769 default:2770 panic("unknown field " + strconv.Quote(field.Name))2771 }2772 }2773 out.Dispatch()2774 if invalids > 0 {2775 return graphql.Null2776 }2777 return out2778}2779var __TypeImplementors = []string{"__Type"}2780func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {2781 fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)2782 out := graphql.NewFieldSet(fields)2783 var invalids uint322784 for i, field := range fields {2785 switch field.Name {2786 case "__typename":2787 out.Values[i] = graphql.MarshalString("__Type")2788 case "kind":2789 out.Values[i] = ec.___Type_kind(ctx, field, obj)2790 if out.Values[i] == graphql.Null {2791 invalids++2792 }2793 case "name":2794 out.Values[i] = ec.___Type_name(ctx, field, obj)2795 case "description":2796 out.Values[i] = ec.___Type_description(ctx, field, obj)2797 case "fields":2798 out.Values[i] = ec.___Type_fields(ctx, field, obj)2799 case "interfaces":2800 out.Values[i] = ec.___Type_interfaces(ctx, field, obj)2801 case "possibleTypes":2802 out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)2803 case "enumValues":2804 out.Values[i] = ec.___Type_enumValues(ctx, field, obj)2805 case "inputFields":2806 out.Values[i] = ec.___Type_inputFields(ctx, field, obj)2807 case "ofType":2808 out.Values[i] = ec.___Type_ofType(ctx, field, obj)2809 default:2810 panic("unknown field " + strconv.Quote(field.Name))2811 }2812 }2813 out.Dispatch()2814 if invalids > 0 {2815 return graphql.Null2816 }2817 return out2818}2819// endregion **************************** object.gotpl ****************************2820// region ***************************** type.gotpl *****************************2821func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {2822 res, err := graphql.UnmarshalBoolean(v)2823 return res, graphql.ErrorOnPath(ctx, err)2824}2825func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {2826 res := graphql.MarshalBoolean(v)2827 if res == graphql.Null {2828 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2829 ec.Errorf(ctx, "must not be null")2830 }2831 }2832 return res2833}2834func (ec *executionContext) marshalNDisk2ágithubácomásacloudágqlpágraphámodeláDisk(ctx context.Context, sel ast.SelectionSet, v *model.Disk) graphql.Marshaler {2835 if v == nil {2836 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2837 ec.Errorf(ctx, "must not be null")2838 }2839 return graphql.Null2840 }2841 return ec._Disk(ctx, sel, v)2842}2843func (ec *executionContext) unmarshalNID2int64(ctx context.Context, v interface{}) (int64, error) {2844 res, err := graphql.UnmarshalInt64(v)2845 return res, graphql.ErrorOnPath(ctx, err)2846}2847func (ec *executionContext) marshalNID2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler {2848 res := graphql.MarshalInt64(v)2849 if res == graphql.Null {2850 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2851 ec.Errorf(ctx, "must not be null")2852 }2853 }2854 return res2855}2856func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) {2857 res, err := graphql.UnmarshalInt(v)2858 return res, graphql.ErrorOnPath(ctx, err)2859}2860func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {2861 res := graphql.MarshalInt(v)2862 if res == graphql.Null {2863 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2864 ec.Errorf(ctx, "must not be null")2865 }2866 }2867 return res2868}2869func (ec *executionContext) marshalNMutationResult2githubácomásacloudágqlpágraphámodeláMutationResult(ctx context.Context, sel ast.SelectionSet, v model.MutationResult) graphql.Marshaler {2870 return ec._MutationResult(ctx, sel, &v)2871}2872func (ec *executionContext) marshalNMutationResult2ágithubácomásacloudágqlpágraphámodeláMutationResult(ctx context.Context, sel ast.SelectionSet, v *model.MutationResult) graphql.Marshaler {2873 if v == nil {2874 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2875 ec.Errorf(ctx, "must not be null")2876 }2877 return graphql.Null2878 }2879 return ec._MutationResult(ctx, sel, v)2880}2881func (ec *executionContext) marshalNServer2áágithubácomásacloudágqlpágraphámodeláServerá(ctx context.Context, sel ast.SelectionSet, v []*model.Server) graphql.Marshaler {2882 ret := make(graphql.Array, len(v))2883 var wg sync.WaitGroup2884 isLen1 := len(v) == 12885 if !isLen1 {2886 wg.Add(len(v))2887 }2888 for i := range v {2889 i := i2890 fc := &graphql.FieldContext{2891 Index: &i,2892 Result: &v[i],2893 }2894 ctx := graphql.WithFieldContext(ctx, fc)2895 f := func(i int) {2896 defer func() {2897 if r := recover(); r != nil {2898 ec.Error(ctx, ec.Recover(ctx, r))2899 ret = nil2900 }2901 }()2902 if !isLen1 {2903 defer wg.Done()2904 }2905 ret[i] = ec.marshalNServer2ágithubácomásacloudágqlpágraphámodeláServer(ctx, sel, v[i])2906 }2907 if isLen1 {2908 f(i)2909 } else {2910 go f(i)2911 }2912 }2913 wg.Wait()2914 return ret2915}2916func (ec *executionContext) marshalNServer2ágithubácomásacloudágqlpágraphámodeláServer(ctx context.Context, sel ast.SelectionSet, v *model.Server) graphql.Marshaler {2917 if v == nil {2918 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2919 ec.Errorf(ctx, "must not be null")2920 }2921 return graphql.Null2922 }2923 return ec._Server(ctx, sel, v)2924}2925func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {2926 res, err := graphql.UnmarshalString(v)2927 return res, graphql.ErrorOnPath(ctx, err)2928}2929func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {2930 res := graphql.MarshalString(v)2931 if res == graphql.Null {2932 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {2933 ec.Errorf(ctx, "must not be null")2934 }2935 }2936 return res2937}2938func (ec *executionContext) unmarshalNString2ástringá(ctx context.Context, v interface{}) ([]string, error) {2939 var vSlice []interface{}2940 if v != nil {2941 if tmp1, ok := v.([]interface{}); ok {2942 vSlice = tmp12943 } else {2944 vSlice = []interface{}{v}2945 }2946 }2947 var err error2948 res := make([]string, len(vSlice))2949 for i := range vSlice {2950 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))2951 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])2952 if err != nil {2953 return nil, err2954 }2955 }2956 return res, nil2957}2958func (ec *executionContext) marshalNString2ástringá(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {2959 ret := make(graphql.Array, len(v))2960 for i := range v {2961 ret[i] = ec.marshalNString2string(ctx, sel, v[i])2962 }2963 return ret2964}2965func (ec *executionContext) marshalN__Directive2githubácomá99designságqlgenágraphqláintrospectionáDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler {2966 return ec.___Directive(ctx, sel, &v)2967}2968func (ec *executionContext) marshalN__Directive2ágithubácomá99designságqlgenágraphqláintrospectionáDirectiveá(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler {2969 ret := make(graphql.Array, len(v))2970 var wg sync.WaitGroup2971 isLen1 := len(v) == 12972 if !isLen1 {2973 wg.Add(len(v))2974 }2975 for i := range v {2976 i := i2977 fc := &graphql.FieldContext{2978 Index: &i,2979 Result: &v[i],2980 }2981 ctx := graphql.WithFieldContext(ctx, fc)2982 f := func(i int) {2983 defer func() {2984 if r := recover(); r != nil {2985 ec.Error(ctx, ec.Recover(ctx, r))2986 ret = nil2987 }2988 }()2989 if !isLen1 {2990 defer wg.Done()2991 }2992 ret[i] = ec.marshalN__Directive2githubácomá99designságqlgenágraphqláintrospectionáDirective(ctx, sel, v[i])2993 }2994 if isLen1 {2995 f(i)2996 } else {2997 go f(i)2998 }2999 }3000 wg.Wait()3001 return ret3002}3003func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {3004 res, err := graphql.UnmarshalString(v)3005 return res, graphql.ErrorOnPath(ctx, err)3006}3007func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {3008 res := graphql.MarshalString(v)3009 if res == graphql.Null {3010 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {3011 ec.Errorf(ctx, "must not be null")3012 }3013 }3014 return res3015}3016func (ec *executionContext) unmarshalN__DirectiveLocation2ástringá(ctx context.Context, v interface{}) ([]string, error) {3017 var vSlice []interface{}3018 if v != nil {3019 if tmp1, ok := v.([]interface{}); ok {3020 vSlice = tmp13021 } else {3022 vSlice = []interface{}{v}3023 }3024 }3025 var err error3026 res := make([]string, len(vSlice))3027 for i := range vSlice {3028 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))3029 res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])3030 if err != nil {3031 return nil, err3032 }3033 }3034 return res, nil3035}3036func (ec *executionContext) marshalN__DirectiveLocation2ástringá(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {3037 ret := make(graphql.Array, len(v))3038 var wg sync.WaitGroup3039 isLen1 := len(v) == 13040 if !isLen1 {3041 wg.Add(len(v))3042 }3043 for i := range v {3044 i := i3045 fc := &graphql.FieldContext{3046 Index: &i,3047 Result: &v[i],3048 }3049 ctx := graphql.WithFieldContext(ctx, fc)3050 f := func(i int) {3051 defer func() {3052 if r := recover(); r != nil {3053 ec.Error(ctx, ec.Recover(ctx, r))3054 ret = nil3055 }3056 }()3057 if !isLen1 {3058 defer wg.Done()3059 }3060 ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])3061 }3062 if isLen1 {3063 f(i)3064 } else {3065 go f(i)3066 }3067 }3068 wg.Wait()3069 return ret3070}3071func (ec *executionContext) marshalN__EnumValue2githubácomá99designságqlgenágraphqláintrospectionáEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {3072 return ec.___EnumValue(ctx, sel, &v)3073}3074func (ec *executionContext) marshalN__Field2githubácomá99designságqlgenágraphqláintrospectionáField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {3075 return ec.___Field(ctx, sel, &v)3076}3077func (ec *executionContext) marshalN__InputValue2githubácomá99designságqlgenágraphqláintrospectionáInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {3078 return ec.___InputValue(ctx, sel, &v)3079}3080func (ec *executionContext) marshalN__InputValue2ágithubácomá99designságqlgenágraphqláintrospectionáInputValueá(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {3081 ret := make(graphql.Array, len(v))3082 var wg sync.WaitGroup3083 isLen1 := len(v) == 13084 if !isLen1 {3085 wg.Add(len(v))3086 }3087 for i := range v {3088 i := i3089 fc := &graphql.FieldContext{3090 Index: &i,3091 Result: &v[i],3092 }3093 ctx := graphql.WithFieldContext(ctx, fc)3094 f := func(i int) {3095 defer func() {3096 if r := recover(); r != nil {3097 ec.Error(ctx, ec.Recover(ctx, r))3098 ret = nil3099 }3100 }()3101 if !isLen1 {3102 defer wg.Done()3103 }3104 ret[i] = ec.marshalN__InputValue2githubácomá99designságqlgenágraphqláintrospectionáInputValue(ctx, sel, v[i])3105 }3106 if isLen1 {3107 f(i)3108 } else {3109 go f(i)3110 }3111 }3112 wg.Wait()3113 return ret3114}3115func (ec *executionContext) marshalN__Type2githubácomá99designságqlgenágraphqláintrospectionáType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {3116 return ec.___Type(ctx, sel, &v)3117}3118func (ec *executionContext) marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáTypeá(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {3119 ret := make(graphql.Array, len(v))3120 var wg sync.WaitGroup3121 isLen1 := len(v) == 13122 if !isLen1 {3123 wg.Add(len(v))3124 }3125 for i := range v {3126 i := i3127 fc := &graphql.FieldContext{3128 Index: &i,3129 Result: &v[i],3130 }3131 ctx := graphql.WithFieldContext(ctx, fc)3132 f := func(i int) {3133 defer func() {3134 if r := recover(); r != nil {3135 ec.Error(ctx, ec.Recover(ctx, r))3136 ret = nil3137 }3138 }()3139 if !isLen1 {3140 defer wg.Done()3141 }3142 ret[i] = ec.marshalN__Type2githubácomá99designságqlgenágraphqláintrospectionáType(ctx, sel, v[i])3143 }3144 if isLen1 {3145 f(i)3146 } else {3147 go f(i)3148 }3149 }3150 wg.Wait()3151 return ret3152}3153func (ec *executionContext) marshalN__Type2ágithubácomá99designságqlgenágraphqláintrospectionáType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {3154 if v == nil {3155 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {3156 ec.Errorf(ctx, "must not be null")3157 }3158 return graphql.Null3159 }3160 return ec.___Type(ctx, sel, v)3161}3162func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {3163 res, err := graphql.UnmarshalString(v)3164 return res, graphql.ErrorOnPath(ctx, err)3165}3166func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {3167 res := graphql.MarshalString(v)3168 if res == graphql.Null {3169 if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {3170 ec.Errorf(ctx, "must not be null")3171 }3172 }3173 return res3174}3175func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {3176 res, err := graphql.UnmarshalBoolean(v)3177 return res, graphql.ErrorOnPath(ctx, err)3178}3179func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {3180 return graphql.MarshalBoolean(v)3181}3182func (ec *executionContext) unmarshalOBoolean2ábool(ctx context.Context, v interface{}) (*bool, error) {3183 if v == nil {3184 return nil, nil3185 }3186 res, err := graphql.UnmarshalBoolean(v)3187 return &res, graphql.ErrorOnPath(ctx, err)3188}3189func (ec *executionContext) marshalOBoolean2ábool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {3190 if v == nil {3191 return graphql.Null3192 }3193 return graphql.MarshalBoolean(*v)3194}3195func (ec *executionContext) marshalODisk2áágithubácomásacloudágqlpágraphámodeláDiská(ctx context.Context, sel ast.SelectionSet, v []*model.Disk) graphql.Marshaler {3196 if v == nil {3197 return graphql.Null3198 }3199 ret := make(graphql.Array, len(v))3200 var wg sync.WaitGroup3201 isLen1 := len(v) == 13202 if !isLen1 {3203 wg.Add(len(v))3204 }3205 for i := range v {3206 i := i3207 fc := &graphql.FieldContext{3208 Index: &i,3209 Result: &v[i],3210 }3211 ctx := graphql.WithFieldContext(ctx, fc)3212 f := func(i int) {3213 defer func() {3214 if r := recover(); r != nil {3215 ec.Error(ctx, ec.Recover(ctx, r))3216 ret = nil3217 }3218 }()3219 if !isLen1 {3220 defer wg.Done()3221 }3222 ret[i] = ec.marshalNDisk2ágithubácomásacloudágqlpágraphámodeláDisk(ctx, sel, v[i])3223 }3224 if isLen1 {3225 f(i)3226 } else {3227 go f(i)3228 }3229 }3230 wg.Wait()3231 return ret3232}3233func (ec *executionContext) unmarshalOShutdownOption2ágithubácomásacloudágqlpágraphámodeláShutdownOption(ctx context.Context, v interface{}) (*model.ShutdownOption, error) {3234 if v == nil {3235 return nil, nil3236 }3237 res, err := ec.unmarshalInputShutdownOption(ctx, v)3238 return &res, graphql.ErrorOnPath(ctx, err)3239}3240func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {3241 res, err := graphql.UnmarshalString(v)3242 return res, graphql.ErrorOnPath(ctx, err)3243}3244func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {3245 return graphql.MarshalString(v)3246}3247func (ec *executionContext) unmarshalOString2ástringá(ctx context.Context, v interface{}) ([]string, error) {3248 if v == nil {3249 return nil, nil3250 }3251 var vSlice []interface{}3252 if v != nil {3253 if tmp1, ok := v.([]interface{}); ok {3254 vSlice = tmp13255 } else {3256 vSlice = []interface{}{v}3257 }3258 }3259 var err error3260 res := make([]string, len(vSlice))3261 for i := range vSlice {3262 ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))3263 res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])3264 if err != nil {3265 return nil, err3266 }3267 }3268 return res, nil3269}3270func (ec *executionContext) marshalOString2ástringá(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {3271 if v == nil {3272 return graphql.Null3273 }3274 ret := make(graphql.Array, len(v))3275 for i := range v {3276 ret[i] = ec.marshalNString2string(ctx, sel, v[i])3277 }3278 return ret3279}3280func (ec *executionContext) unmarshalOString2ástring(ctx context.Context, v interface{}) (*string, error) {3281 if v == nil {3282 return nil, nil3283 }3284 res, err := graphql.UnmarshalString(v)3285 return &res, graphql.ErrorOnPath(ctx, err)3286}3287func (ec *executionContext) marshalOString2ástring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {3288 if v == nil {3289 return graphql.Null3290 }...
marshalNString2string
Using AI Code Generation
1import (2func main() {3 x := test.NewX()4 x.SetName("test")5 fmt.Println(x.MarshalNString2string())6}
marshalNString2string
Using AI Code Generation
1import (2func main() {3 m := gen.NewMarshalNString2string()4 m.MarshalNString2string("hello world", 10)5 fmt.Println(m.GetM())6}7import (8func main() {9 m := gen.NewMarshalNString2string()10 m.UnmarshalNString2string("hello world", 10)11 fmt.Println(m.GetM())12}13import (14func main() {15 m := gen.NewMarshalNString2string()16 m.MarshalNString2string("hello world", 10)17 fmt.Println(m.GetM())18}19import (20func main() {21 m := gen.NewMarshalNString2string()22 m.UnmarshalNString2string("hello world", 10)23 fmt.Println(m.GetM())24}25import (26func main() {27 m := gen.NewMarshalNString2string()28 m.MarshalNString2string("hello world", 10)29 fmt.Println(m.GetM())30}31import (32func main() {33 m := gen.NewMarshalNString2string()34 m.UnmarshalNString2string("hello world", 10)35 fmt.Println(m.GetM())36}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!