diff --git a/.tools/nvim/__http__/iot/app.graphql.yml b/.tools/nvim/__http__/iot/app.graphql.yml new file mode 100644 index 000000000..0baa5a86b --- /dev/null +++ b/.tools/nvim/__http__/iot/app.graphql.yml @@ -0,0 +1,119 @@ +--- +label: "Create App" +query: |+ + mutation Iot_createApp($projectName: String!, $envName: String!, $deviceBlueprintName: String!, $app: IOTAppIn!) { + iot_createApp(projectName: $projectName, envName: $envName, deviceBlueprintName: $deviceBlueprintName, app: $app) { + displayName + id + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprintName": "sample-device-blueprint", + "app": { + "displayName": "sample app", + "spec": { + "containers": [ + { + "image": "nginx:latest", + "imagePullPolicy": "always", + "name": "container-0" + } + ] + }, + "metadata": { + "name": "sample-app" + } + } + } + +--- + +label: "update App" +query: |+ + mutation Iot_updateApp($projectName: String!, $envName: String!, $deviceBlueprintName: String!, $app: IOTAppIn!) { + iot_updateApp(projectName: $projectName, envName: $envName, deviceBlueprintName: $deviceBlueprintName, app: $app) { + accountName + id + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprintName": "sample-device-blueprint", + "app": { + "displayName": "sample app", + "spec": { + "containers": [ + { + "image": "nginx:latest", + "imagePullPolicy": "always", + "name": "container-0" + } + ] + }, + "metadata": { + "name": "sample-app" + } + } + } + +--- + +label: "delete App" +query: |+ + mutation Iot_deleteApp($projectName: String!, $envName: String!, $deviceBlueprintName: String!, $name: String!) { + iot_deleteApp(projectName: $projectName, envName: $envName, deviceBlueprintName: $deviceBlueprintName, name: $name) + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprintName": "sample-device-blueprint", + "name": "sample-app" + } + +--- + +label: "get App" +query: |+ + query Iot_getApp($projectName: String!, $envName: String!, $deviceBlueprintName: String!, $name: String!) { + iot_getApp(projectName: $projectName, envName: $envName, deviceBlueprintName: $deviceBlueprintName, name: $name) { + id + displayName + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprintName": "sample-device-blueprint", + "name": "sample-app" + } + +--- + +label: "list App" +query: |+ + query Iot_listApps($projectName: String!, $envName: String!, $deviceBlueprintName: String!) { + iot_listApps(projectName: $projectName, envName: $envName, deviceBlueprintName: $deviceBlueprintName) { + totalCount + edges { + node { + displayName + id + } + } + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprintName": "sample-device-blueprint", + } + +--- diff --git a/.tools/nvim/__http__/iot/deployments.graphql.yml b/.tools/nvim/__http__/iot/deployments.graphql.yml new file mode 100644 index 000000000..54f9fb649 --- /dev/null +++ b/.tools/nvim/__http__/iot/deployments.graphql.yml @@ -0,0 +1,112 @@ +--- +label: "Create Deployment" +query: |+ + mutation Iot_createDeployment($projectName: String!, $envName: String!, $deployment: IOTDeploymentIn!) { + iot_createDeployment(projectName: $projectName, envName: $envName, deployment: $deployment) { + CIDR + displayName + id + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deployment": { + "CIDR": "10.0.0.0/16", + "displayName": "sample deployment", + "name": "sample-deployment", + "exposedServices": [ + { + "ip": "sample-ip", + "name": "10.21.32.4" + } + ] + } + } + +--- + +label: "update deployment" +query: |+ + mutation Iot_updateDeployment($projectName: String!, $envName: String!, $deployment: IOTDeploymentIn!) { + iot_updateDeployment(projectName: $projectName, envName: $envName, deployment: $deployment) { + CIDR + displayName + id + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deployment": { + "displayName": "sample depl one", + "CIDR": "10.0.0.1", + "name": "sample-deployment", + "exposedServices": [ + { + "ip": "sample-ip-one", + "name": "10.12.13.4" + } + ] + } + } + +--- + +label: "delete deployment" +query: |+ + mutation Iot_deleteDeployment($projectName: String!, $envName: String!, $name: String!) { + iot_deleteDeployment(projectName: $projectName, envName: $envName, name: $name) + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "name": "sample-deployment" + } + +--- + +label: "get deployment" +query: |+ + query Iot_getDeployment($projectName: String!, $envName: String!, $name: String!) { + iot_getDeployment(projectName: $projectName, envName: $envName, name: $name) { + CIDR + displayName + id + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "name": "sample-deployment" + } + +--- + +label: "list deployments" +query: |+ + query Iot_listDeployments($projectName: String!, $envName: String!) { + iot_listDeployments(projectName: $projectName, envName: $envName) { + totalCount + edges { + node { + CIDR + displayName + name + } + } + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env" + } + +--- + + diff --git a/.tools/nvim/__http__/iot/device-blueprint.graphql.yml b/.tools/nvim/__http__/iot/device-blueprint.graphql.yml new file mode 100644 index 000000000..e2e648968 --- /dev/null +++ b/.tools/nvim/__http__/iot/device-blueprint.graphql.yml @@ -0,0 +1,98 @@ +--- +label: "Create Device Blueprint" +query: |+ + mutation Iot_createDeviceBlueprint($projectName: String!, $envName: String!, $deviceBlueprint: IOTDeviceBlueprintIn!) { + iot_createDeviceBlueprint(projectName: $projectName, envName: $envName, deviceBlueprint: $deviceBlueprint) { + displayName + id + name + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprint": { + "bluePrintType": "singleton_blueprint", + "displayName": "sample device blueprint", + "name": "sample-device-blueprint", + "version": "1" + } + } + +--- + +label: "update Device Blueprint" +query: |+ + mutation Iot_updateDeviceBlueprint($projectName: String!, $envName: String!, $deviceBlueprint: IOTDeviceBlueprintIn!) { + iot_updateDeviceBlueprint(projectName: $projectName, envName: $envName, deviceBlueprint: $deviceBlueprint) { + bluePrintType + name + displayName + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "deviceBlueprint": { + "bluePrintType": "group____blueprint", + "displayName": "sample device blueprint", + "name": "sample-device-blueprint-one", + "version": 1 + } + } + +--- + +label: "delete Device Blueprint" +query: |+ + mutation Iot_deleteDeviceBlueprint($projectName: String!, $envName: String!, $name: String!) { + iot_deleteDeviceBlueprint(projectName: $projectName, envName: $envName, name: $name) + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "name": "sample-device-blueprint" + } + +--- + +label: "get Device Blueprint" +query: |+ + query Iot_getDeviceBlueprint($projectName: String!, $envName: String!, $name: String!) { + iot_getDeviceBlueprint(projectName: $projectName, envName: $envName, name: $name) { + displayName + id + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "name": "sample-device-blueprint" + } + +--- + +label: "list Device Blueprint" +query: |+ + query Iot_listDeployments($projectName: String!, $envName: String!) { + iot_listDeployments(projectName: $projectName, envName: $envName) { + totalCount + edges { + node { + displayName + accountName + } + } + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env" + } + +--- diff --git a/.tools/nvim/__http__/iot/devices.graphql.yml b/.tools/nvim/__http__/iot/devices.graphql.yml new file mode 100644 index 000000000..089697e66 --- /dev/null +++ b/.tools/nvim/__http__/iot/devices.graphql.yml @@ -0,0 +1,113 @@ +--- +label: "Create Device" +query: |+ + mutation Iot_createDevice($projectName: String!, $envName: String!, $device: IOTDeviceIn!) { + iot_createDevice(projectName: $projectName, envName: $envName, device: $device) { + id + deployment + name + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "device": { + "blueprint": "sample-device-blueprint-one", + "deployment": "sample-deployment", + "displayName": "sample device", + "ip": "10.10.11.4", + "name": "sample-device", + "podCIDR": "10.1.1.1", + "publicKey": "10.2.2.2", + "serviceCIDR": "10.3.3.3", + "version": "1" + } + } + +--- + +label: "update Device" +query: |+ + mutation Iot_updateDevice($projectName: String!, $envName: String!, $device: IOTDeviceIn!) { + iot_updateDevice(projectName: $projectName, envName: $envName, device: $device) { + blueprint + id + name + } + } +variables: + { + "projectName": "sample-project", + "envName": "sample-env", + "device": { + "blueprint": "sample-device-blueprint-one", + "deployment": "sample-deployment", + "displayName": "sample device", + "ip": "10.10.11.4", + "name": "sample-device", + "podCIDR": "10.1.1.1", + "publicKey": "10.2.2.2", + "serviceCIDR": "10.3.3.3", + "version": "1" + } + } + +--- + +label: "delete Device" +query: |+ + mutation Iot_deleteDevice($projectName: String!, $envName: String!, $name: String!) { + iot_deleteDevice(projectName: $projectName, envName: $envName, name: $name) + } +variables: + { + "projectName": null, + "envName": null, + "name": null + } + +--- + +label: "get Device" +query: |+ + query Iot_getDevice($projectName: String!, $envName: String!, $name: String!) { + iot_getDevice(projectName: $projectName, envName: $envName, name: $name) { + accountName + displayName + id + name + } + } +variables: + { + "projectName": null, + "envName": null, + "name": null + } + +--- + +label: "list Device" +query: |+ + query Iot_listDevices($projectName: String!, $envName: String!) { + iot_listDevices(projectName: $projectName, envName: $envName) { + totalCount + edges { + node { + deployment + id + name + } + } + } + } +variables: + { + "projectName": null, + "envName": null + } + +--- + + diff --git a/.tools/nvim/__http__/iot/environments.graphql.yml b/.tools/nvim/__http__/iot/environments.graphql.yml new file mode 100644 index 000000000..dc9f93add --- /dev/null +++ b/.tools/nvim/__http__/iot/environments.graphql.yml @@ -0,0 +1,93 @@ +--- +label: "Create Environment" +query: |+ + mutation Iot_createEnvironment($projectName: String!, $env: IOTEnvironmentIn!) { + iot_createEnvironment(projectName: $projectName, env: $env) { + displayName + id + name + } + } +variables: + { + "projectName": sample-project, + "env": { + "displayName": "sample env one", + "name": "sample-env-one" + } + } + +--- + +label: "update Environment" +query: |+ + mutation Iot_updateEnvironment($projectName: String!, $env: IOTEnvironmentIn!) { + iot_updateEnvironment(projectName: $projectName, env: $env) { + displayName + id + name + } + } +variables: + { + "projectName": null, + "env": { + "displayName": null, + "name": null + } + } + +--- + +label: "delete Environment" +query: |+ + mutation Iot_deleteEnvironment($projectName: String!, $name: String!) { + iot_deleteEnvironment(projectName: $projectName, name: $name) + } +variables: + { + "projectName": null, + "name": null + } + +--- + +label: "get Environment" +query: |+ + query Iot_getEnvironment($projectName: String!, $name: String!) { + iot_getEnvironment(projectName: $projectName, name: $name) { + accountName + displayName + name + } + } +variables: + { + "projectName": "sample-project", + "name": "sample-env" + } + +--- + +label: "list Environment" +query: |+ + query Iot_listEnvironments($projectName: String!) { + iot_listEnvironments(projectName: $projectName) { + edges { + node { + name + id + accountName + } + } + totalCount + } + } +variables: + { + "projectName": "sample-project" + } + +--- + + diff --git a/.tools/nvim/__http__/iot/projects.graphql.yml b/.tools/nvim/__http__/iot/projects.graphql.yml new file mode 100644 index 000000000..154feb145 --- /dev/null +++ b/.tools/nvim/__http__/iot/projects.graphql.yml @@ -0,0 +1,84 @@ +--- +label: "Create Project" +query: |+ + mutation Iot_createProject($project: IOTProjectIn!) { + iot_createProject(project: $project) { + displayName + id + name + } + } +variables: + { + "project": { + "name": "sample-project", + "displayName": "sample project" + } + } + +--- + +label: "update Project" +query: |+ + mutation Iot_updateProject($project: IOTProjectIn!) { + iot_updateProject(project: $project) { + displayName + id + name + } + } +variables: + { + "project": { + "name": null, + "displayName": null + } + } + +--- + +label: "delete Project" +query: |+ + mutation Iot_deleteProject($name: String!) { + iot_deleteProject(name: $name) + } +variables: + { + "name": null + } + +--- + +label: "get Project" +query: |+ + query Iot_getProject($name: String!) { + iot_getProject(name: $name) { + displayName + id + name + } + } +variables: + { + "name": "sample-project" + } + +--- + +label: "list Project" +query: |+ + query Iot_listProjects { + iot_listProjects { + edges { + node { + displayName + name + accountName + } + } + } + } + +--- + + diff --git a/apps/console/internal/app/graph/generated/generated.go b/apps/console/internal/app/graph/generated/generated.go index 874a46293..94047f2d8 100644 --- a/apps/console/internal/app/graph/generated/generated.go +++ b/apps/console/internal/app/graph/generated/generated.go @@ -6260,6 +6260,7 @@ enum Github__com___kloudlite___api___pkg___types__SyncState { enum Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret { config + pvc secret } diff --git a/apps/console/internal/app/graph/model/models_gen.go b/apps/console/internal/app/graph/model/models_gen.go index a72b03169..c89517a91 100644 --- a/apps/console/internal/app/graph/model/models_gen.go +++ b/apps/console/internal/app/graph/model/models_gen.go @@ -810,17 +810,19 @@ type GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret string const ( GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = "config" + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretPvc GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = "pvc" GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = "secret" ) var AllGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = []GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret{ GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig, + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretPvc, GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret, } func (e GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) IsValid() bool { switch e { - case GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig, GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret: + case GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig, GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretPvc, GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret: return true } return false diff --git a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls index 8e367a0bf..10f76a2d2 100644 --- a/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls +++ b/apps/console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -608,6 +608,7 @@ enum Github__com___kloudlite___api___pkg___types__SyncState { enum Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret { config + pvc secret } diff --git a/apps/gateway/Taskfile.yml b/apps/gateway/Taskfile.yml index d96b133a5..dd5a5e70f 100644 --- a/apps/gateway/Taskfile.yml +++ b/apps/gateway/Taskfile.yml @@ -20,9 +20,10 @@ tasks: msg: "var Image must have a value, of format 'image_repository:image_tag'" vars: push: "{{.push | default false}}" + SupergraphSchemaFile: "./supergraph.graphqls" cmds: - - task generate-schema - - nerdctl build -t {{.Image}} . --cache-from=type=local,src=/tmp/buildx-cache --cache-to=type=local,dest=/tmp/buildx-cache + - task: generate-schema + - podman build -t {{.Image}} . --cache-from=type=local,src=/tmp/buildx-cache --cache-to=type=local,dest=/tmp/buildx-cache container:build-and-push: preconditions: diff --git a/apps/gateway/generate-schema.sh b/apps/gateway/generate-schema.sh index c75a2fa30..f125eb675 100644 --- a/apps/gateway/generate-schema.sh +++ b/apps/gateway/generate-schema.sh @@ -19,4 +19,7 @@ cat ../infra/internal/app/graph/struct-to-graphql/*.graphqls >>./schemas/infra-a cat ../auth/internal/app/graph/*.graphqls >./schemas/auth-api.schema cat ../message-office/internal/app/graph/*.graphqls >./schemas/message-office-api.schema +cat ../iot-console/internal/app/graph/*.graphqls >./schemas/iot-console-api.schema +cat ../iot-console/internal/app/graph/struct-to-graphql/*.graphqls >>./schemas/iot-console-api.schema + rover supergraph compose --config ./supergraph.yml --output "$out" --elv2-license accept diff --git a/apps/gateway/supergraph.graphqls b/apps/gateway/supergraph.graphqls index cc587ef1b..f9888ebcf 100644 --- a/apps/gateway/supergraph.graphqls +++ b/apps/gateway/supergraph.graphqls @@ -78,6 +78,7 @@ scalar Any @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) type App @join__type(graph: CONSOLE_API) @@ -605,6 +606,7 @@ type CursorPagination @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { after: String before: String @@ -618,6 +620,7 @@ input CursorPaginationIn @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { after: String before: String @@ -631,9 +634,10 @@ enum CursorPaginationSortDirection @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { - ASC @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) - DESC @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) + ASC @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + DESC @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) } scalar Date @@ -642,6 +646,7 @@ scalar Date @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) type Digest @join__type(graph: CONTAINER_REGISTRY_API) @@ -1010,11 +1015,33 @@ type Github__com___kloudlite___api___apps___infra___internal___entities__OutputF name: String! } +enum Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType + @join__type(graph: IOT_CONSOLE_API) +{ + group_blueprint @join__enumValue(graph: IOT_CONSOLE_API) + singleton_blueprint @join__enumValue(graph: IOT_CONSOLE_API) +} + +type Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService + @join__type(graph: IOT_CONSOLE_API) +{ + ip: String! + name: String! +} + +input Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn + @join__type(graph: IOT_CONSOLE_API) +{ + ip: String! + name: String! +} + type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @join__type(graph: ACCOUNT_API) @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { userEmail: String! userId: String! @@ -1410,6 +1437,7 @@ input Github__com___kloudlite___operator___apis___common____types__SecretRefIn type Github__com___kloudlite___operator___apis___crds___v1__AppContainer @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { args: [String!] command: [String!] @@ -1427,6 +1455,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__AppContainer input Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { args: [String!] command: [String!] @@ -1444,6 +1473,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn type Github__com___kloudlite___operator___apis___crds___v1__AppSpec @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { containers: [Github__com___kloudlite___operator___apis___crds___v1__AppContainer!]! displayName: String @@ -1461,6 +1491,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__AppSpec input Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { containers: [Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn!]! displayName: String @@ -1478,6 +1509,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn type Github__com___kloudlite___operator___apis___crds___v1__AppSvc @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { name: String port: Int! @@ -1487,6 +1519,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__AppSvc input Github__com___kloudlite___operator___apis___crds___v1__AppSvcIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { name: String port: Int! @@ -1526,13 +1559,16 @@ input Github__com___kloudlite___operator___apis___crds___v1__ClusterManagedServi enum Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { - config @join__enumValue(graph: CONSOLE_API) - secret @join__enumValue(graph: CONSOLE_API) + config @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: IOT_CONSOLE_API) + pvc @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: IOT_CONSOLE_API) + secret @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: IOT_CONSOLE_API) } type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { key: String! optional: Boolean @@ -1544,6 +1580,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv input Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { key: String! optional: Boolean @@ -1555,6 +1592,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn type Github__com___kloudlite___operator___apis___crds___v1__ContainerResource @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { max: String min: String @@ -1562,6 +1600,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__ContainerResource input Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { max: String min: String @@ -1569,6 +1608,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { items: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem!] mountPath: String! @@ -1578,6 +1618,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { items: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn!] mountPath: String! @@ -1587,6 +1628,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { fileName: String key: String! @@ -1594,6 +1636,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { fileName: String key: String! @@ -1617,6 +1660,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__CorsIn type Github__com___kloudlite___operator___apis___crds___v1__EnvFrom @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { refName: String! type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! @@ -1624,6 +1668,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__EnvFrom input Github__com___kloudlite___operator___apis___crds___v1__EnvFromIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { refName: String! type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! @@ -1711,6 +1756,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__HelmChartStatus type Github__com___kloudlite___operator___apis___crds___v1__HPA @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { enabled: Boolean! maxReplicas: Int @@ -1721,6 +1767,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__HPA input Github__com___kloudlite___operator___apis___crds___v1__HPAIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { enabled: Boolean! maxReplicas: Int @@ -1731,6 +1778,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__HPAIn type Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { httpHeaders: Map path: String! @@ -1739,6 +1787,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe input Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { httpHeaders: Map path: String! @@ -1763,6 +1812,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__HttpsIn type Github__com___kloudlite___operator___apis___crds___v1__Intercept @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { enabled: Boolean! toDevice: String! @@ -1770,6 +1820,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__Intercept input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { enabled: Boolean! toDevice: String! @@ -1863,6 +1914,7 @@ input Github__com___kloudlite___operator___apis___crds___v1__MsvcNamedRefIn type Github__com___kloudlite___operator___apis___crds___v1__Probe @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { failureThreshold: Int httpGet: Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe @@ -1875,6 +1927,7 @@ type Github__com___kloudlite___operator___apis___crds___v1__Probe input Github__com___kloudlite___operator___apis___crds___v1__ProbeIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { failureThreshold: Int httpGet: Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn @@ -1995,24 +2048,28 @@ input Github__com___kloudlite___operator___apis___crds___v1__ServiceTemplateIn type Github__com___kloudlite___operator___apis___crds___v1__ShellProbe @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { command: [String!] } input Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { command: [String!] } type Github__com___kloudlite___operator___apis___crds___v1__TcpProbe @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { port: Int! } input Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { port: Int! } @@ -2163,6 +2220,7 @@ type Github__com___kloudlite___operator___pkg___operator__Check @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { debug: String error: String @@ -2191,6 +2249,7 @@ type Github__com___kloudlite___operator___pkg___operator__CheckMeta @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { debug: Boolean description: String @@ -2211,6 +2270,7 @@ type Github__com___kloudlite___operator___pkg___operator__ResourceRef @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { apiVersion: String! kind: String! @@ -2231,17 +2291,19 @@ enum Github__com___kloudlite___operator___pkg___operator__State @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { - errored____during____reconcilation @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) - finished____reconcilation @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) - under____reconcilation @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) - yet____to____be____reconciled @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) + errored____during____reconcilation @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + finished____reconcilation @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + under____reconcilation @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + yet____to____be____reconciled @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) } type Github__com___kloudlite___operator___pkg___operator__Status @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { checkList: [Github__com___kloudlite___operator___pkg___operator__CheckMeta!] checks: Map @@ -2268,6 +2330,7 @@ type Github__com___kloudlite___operator___pkg___raw____json__RawJson @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { RawMessage: Any } @@ -2479,6 +2542,269 @@ input InvitationIn userRole: Github__com___kloudlite___api___apps___iam___types__Role! } +type IOTApp + @join__type(graph: IOT_CONSOLE_API) +{ + accountName: String! + apiVersion: String + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + deviceBlueprintName: String! + displayName: String! + enabled: Boolean + environmentName: String! + id: ID! + kind: String + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + metadata: Metadata + projectName: String! + recordVersion: Int! + spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpec! + status: Github__com___kloudlite___operator___pkg___operator__Status + updateTime: Date! +} + +type IOTAppEdge + @join__type(graph: IOT_CONSOLE_API) +{ + cursor: String! + node: IOTApp! +} + +input IOTAppIn + @join__type(graph: IOT_CONSOLE_API) +{ + apiVersion: String + displayName: String! + enabled: Boolean + kind: String + metadata: MetadataIn + spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn! +} + +type IOTAppPaginatedRecords + @join__type(graph: IOT_CONSOLE_API) +{ + edges: [IOTAppEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IOTDeployment + @join__type(graph: IOT_CONSOLE_API) +{ + accountName: String! + CIDR: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + environmentName: String! + exposedServices: [Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService!]! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTDeploymentEdge + @join__type(graph: IOT_CONSOLE_API) +{ + cursor: String! + node: IOTDeployment! +} + +input IOTDeploymentIn + @join__type(graph: IOT_CONSOLE_API) +{ + CIDR: String! + displayName: String! + exposedServices: [Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn!]! + name: String! +} + +type IOTDeploymentPaginatedRecords + @join__type(graph: IOT_CONSOLE_API) +{ + edges: [IOTDeploymentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IOTDevice + @join__type(graph: IOT_CONSOLE_API) +{ + accountName: String! + blueprint: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + deployment: String! + displayName: String! + environmentName: String! + id: ID! + ip: String! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + podCIDR: String! + projectName: String! + publicKey: String! + recordVersion: Int! + serviceCIDR: String! + updateTime: Date! + version: String! +} + +type IOTDeviceBlueprint + @join__type(graph: IOT_CONSOLE_API) +{ + accountName: String! + bluePrintType: Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + environmentName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! + version: String! +} + +type IOTDeviceBlueprintEdge + @join__type(graph: IOT_CONSOLE_API) +{ + cursor: String! + node: IOTDeviceBlueprint! +} + +input IOTDeviceBlueprintIn + @join__type(graph: IOT_CONSOLE_API) +{ + bluePrintType: Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType! + displayName: String! + name: String! + version: String! +} + +type IOTDeviceBlueprintPaginatedRecords + @join__type(graph: IOT_CONSOLE_API) +{ + edges: [IOTDeviceBlueprintEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IOTDeviceEdge + @join__type(graph: IOT_CONSOLE_API) +{ + cursor: String! + node: IOTDevice! +} + +input IOTDeviceIn + @join__type(graph: IOT_CONSOLE_API) +{ + blueprint: String! + deployment: String! + displayName: String! + ip: String! + name: String! + podCIDR: String! + publicKey: String! + serviceCIDR: String! + version: String! +} + +type IOTDevicePaginatedRecords + @join__type(graph: IOT_CONSOLE_API) +{ + edges: [IOTDeviceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IOTEnvironment + @join__type(graph: IOT_CONSOLE_API) +{ + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTEnvironmentEdge + @join__type(graph: IOT_CONSOLE_API) +{ + cursor: String! + node: IOTEnvironment! +} + +input IOTEnvironmentIn + @join__type(graph: IOT_CONSOLE_API) +{ + displayName: String! + name: String! +} + +type IOTEnvironmentPaginatedRecords + @join__type(graph: IOT_CONSOLE_API) +{ + edges: [IOTEnvironmentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +type IOTProject + @join__type(graph: IOT_CONSOLE_API) +{ + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTProjectEdge + @join__type(graph: IOT_CONSOLE_API) +{ + cursor: String! + node: IOTProject! +} + +input IOTProjectIn + @join__type(graph: IOT_CONSOLE_API) +{ + displayName: String! + name: String! +} + +type IOTProjectPaginatedRecords + @join__type(graph: IOT_CONSOLE_API) +{ + edges: [IOTProjectEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + scalar join__FieldSet enum join__Graph { @@ -2487,6 +2813,7 @@ enum join__Graph { CONSOLE_API @join__graph(name: "console-api", url: "http://console-api/query") CONTAINER_REGISTRY_API @join__graph(name: "container-registry-api", url: "http://container-registry-api/query") INFRA_API @join__graph(name: "infra-api", url: "http://infra-api/query") + IOT_CONSOLE_API @join__graph(name: "iot-console-api", url: "http://iot-console-api/query") } scalar Json @@ -2495,6 +2822,7 @@ scalar Json @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) type K8s__io___api___core___v1__Affinity @join__type(graph: INFRA_API) @@ -3426,10 +3754,11 @@ type K8s__io___api___core___v1__Taint enum K8s__io___api___core___v1__TaintEffect @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { - NoExecute @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) - NoSchedule @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) - PreferNoSchedule @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) + NoExecute @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + NoSchedule @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + PreferNoSchedule @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) } input K8s__io___api___core___v1__TaintIn @@ -3444,6 +3773,7 @@ input K8s__io___api___core___v1__TaintIn type K8s__io___api___core___v1__Toleration @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { effect: K8s__io___api___core___v1__TaintEffect key: String @@ -3455,6 +3785,7 @@ type K8s__io___api___core___v1__Toleration input K8s__io___api___core___v1__TolerationIn @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { effect: K8s__io___api___core___v1__TaintEffect key: String @@ -3466,13 +3797,15 @@ input K8s__io___api___core___v1__TolerationIn enum K8s__io___api___core___v1__TolerationOperator @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { - Equal @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) - Exists @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) + Equal @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + Exists @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) } type K8s__io___api___core___v1__TopologySpreadConstraint @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector matchLabelKeys: [String!] @@ -3486,6 +3819,7 @@ type K8s__io___api___core___v1__TopologySpreadConstraint input K8s__io___api___core___v1__TopologySpreadConstraintIn @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn matchLabelKeys: [String!] @@ -3533,9 +3867,10 @@ input K8s__io___api___core___v1__TypedObjectReferenceIn enum K8s__io___api___core___v1__UnsatisfiableConstraintAction @join__type(graph: CONSOLE_API) + @join__type(graph: IOT_CONSOLE_API) { - DoNotSchedule @join__enumValue(graph: CONSOLE_API) - ScheduleAnyway @join__enumValue(graph: CONSOLE_API) + DoNotSchedule @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: IOT_CONSOLE_API) + ScheduleAnyway @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: IOT_CONSOLE_API) } type K8s__io___api___core___v1__VolumeNodeAffinity @@ -3667,6 +4002,7 @@ input K8s__io___apimachinery___pkg___api___resource__QuantityIn type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { matchExpressions: [K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement!] matchLabels: Map @@ -3675,6 +4011,7 @@ type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { matchExpressions: [K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn!] matchLabels: Map @@ -3683,16 +4020,18 @@ input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn enum K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { - DoesNotExist @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) - Exists @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) - In @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) - NotIn @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) + DoesNotExist @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + Exists @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + In @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + NotIn @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) } type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { key: String! operator: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator! @@ -3702,6 +4041,7 @@ type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn @join__type(graph: CONSOLE_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { key: String! operator: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator! @@ -3807,11 +4147,13 @@ scalar Map @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) type MatchFilter @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { array: [Any!] exact: Any @@ -3823,6 +4165,7 @@ input MatchFilterIn @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { array: [Any!] exact: Any @@ -3834,10 +4177,11 @@ enum MatchFilterMatchType @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { - array @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) - exact @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) - regex @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) + array @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + exact @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) + regex @join__enumValue(graph: CONSOLE_API) @join__enumValue(graph: CONTAINER_REGISTRY_API) @join__enumValue(graph: INFRA_API) @join__enumValue(graph: IOT_CONSOLE_API) } type Metadata @@ -3845,6 +4189,7 @@ type Metadata @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { annotations: Map creationTimestamp: Date! @@ -3860,6 +4205,7 @@ input MetadataIn @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { annotations: Map labels: Map @@ -3881,6 +4227,7 @@ type Mutation @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { accounts_createAccount(account: AccountIn!): Account! @join__field(graph: ACCOUNT_API) accounts_updateAccount(account: AccountIn!): Account! @join__field(graph: ACCOUNT_API) @@ -3974,6 +4321,24 @@ type Mutation infra_updateHelmRelease(clusterName: String!, release: HelmReleaseIn!): HelmRelease @join__field(graph: INFRA_API) infra_deleteHelmRelease(clusterName: String!, releaseName: String!): Boolean! @join__field(graph: INFRA_API) infra_deletePV(clusterName: String!, pvName: String!): Boolean! @join__field(graph: INFRA_API) + iot_createProject(project: IOTProjectIn!): IOTProject @join__field(graph: IOT_CONSOLE_API) + iot_updateProject(project: IOTProjectIn!): IOTProject @join__field(graph: IOT_CONSOLE_API) + iot_deleteProject(name: String!): Boolean! @join__field(graph: IOT_CONSOLE_API) + iot_createEnvironment(projectName: String!, env: IOTEnvironmentIn!): IOTEnvironment @join__field(graph: IOT_CONSOLE_API) + iot_updateEnvironment(projectName: String!, env: IOTEnvironmentIn!): IOTEnvironment @join__field(graph: IOT_CONSOLE_API) + iot_deleteEnvironment(projectName: String!, name: String!): Boolean! @join__field(graph: IOT_CONSOLE_API) + iot_createDevice(projectName: String!, envName: String!, device: IOTDeviceIn!): IOTDevice @join__field(graph: IOT_CONSOLE_API) + iot_updateDevice(projectName: String!, envName: String!, device: IOTDeviceIn!): IOTDevice @join__field(graph: IOT_CONSOLE_API) + iot_deleteDevice(projectName: String!, envName: String!, name: String!): Boolean! @join__field(graph: IOT_CONSOLE_API) + iot_createDeviceBlueprint(projectName: String!, envName: String!, deviceBlueprint: IOTDeviceBlueprintIn!): IOTDeviceBlueprint @join__field(graph: IOT_CONSOLE_API) + iot_updateDeviceBlueprint(projectName: String!, envName: String!, deviceBlueprint: IOTDeviceBlueprintIn!): IOTDeviceBlueprint @join__field(graph: IOT_CONSOLE_API) + iot_deleteDeviceBlueprint(projectName: String!, envName: String!, name: String!): Boolean! @join__field(graph: IOT_CONSOLE_API) + iot_createDeployment(projectName: String!, envName: String!, deployment: IOTDeploymentIn!): IOTDeployment @join__field(graph: IOT_CONSOLE_API) + iot_updateDeployment(projectName: String!, envName: String!, deployment: IOTDeploymentIn!): IOTDeployment @join__field(graph: IOT_CONSOLE_API) + iot_deleteDeployment(projectName: String!, envName: String!, name: String!): Boolean! @join__field(graph: IOT_CONSOLE_API) + iot_createApp(projectName: String!, envName: String!, deviceBlueprintName: String!, app: IOTAppIn!): IOTApp @join__field(graph: IOT_CONSOLE_API) + iot_updateApp(projectName: String!, envName: String!, deviceBlueprintName: String!, app: IOTAppIn!): IOTApp @join__field(graph: IOT_CONSOLE_API) + iot_deleteApp(projectName: String!, envName: String!, deviceBlueprintName: String!, name: String!): Boolean! @join__field(graph: IOT_CONSOLE_API) } type Namespace @@ -4122,6 +4487,7 @@ type PageInfo @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { endCursor: String hasNextPage: Boolean @@ -4341,6 +4707,7 @@ type Query @join__type(graph: CONSOLE_API) @join__type(graph: CONTAINER_REGISTRY_API) @join__type(graph: INFRA_API) + @join__type(graph: IOT_CONSOLE_API) { accounts_listAccounts: [Account] @join__field(graph: ACCOUNT_API) accounts_getAccount(accountName: String!): Account @join__field(graph: ACCOUNT_API) @@ -4435,6 +4802,18 @@ type Query infra_getPV(clusterName: String!, name: String!): PersistentVolume @join__field(graph: INFRA_API) infra_listVolumeAttachments(clusterName: String!, search: SearchVolumeAttachments, pq: CursorPaginationIn): VolumeAttachmentPaginatedRecords @join__field(graph: INFRA_API) infra_getVolumeAttachment(clusterName: String!, name: String!): VolumeAttachment @join__field(graph: INFRA_API) + iot_listProjects(search: SearchIOTProjects, pq: CursorPaginationIn): IOTProjectPaginatedRecords @join__field(graph: IOT_CONSOLE_API) + iot_getProject(name: String!): IOTProject @join__field(graph: IOT_CONSOLE_API) + iot_listEnvironments(projectName: String!, search: SearchIOTEnvironments, pq: CursorPaginationIn): IOTEnvironmentPaginatedRecords @join__field(graph: IOT_CONSOLE_API) + iot_getEnvironment(projectName: String!, name: String!): IOTEnvironment @join__field(graph: IOT_CONSOLE_API) + iot_listDevices(projectName: String!, envName: String!, search: SearchIOTDevices, pq: CursorPaginationIn): IOTDevicePaginatedRecords @join__field(graph: IOT_CONSOLE_API) + iot_getDevice(projectName: String!, envName: String!, name: String!): IOTDevice @join__field(graph: IOT_CONSOLE_API) + iot_listDeviceBlueprints(projectName: String!, envName: String!, search: SearchIOTDeviceBlueprints, pq: CursorPaginationIn): IOTDeviceBlueprintPaginatedRecords @join__field(graph: IOT_CONSOLE_API) + iot_getDeviceBlueprint(projectName: String!, envName: String!, name: String!): IOTDeviceBlueprint @join__field(graph: IOT_CONSOLE_API) + iot_listDeployments(projectName: String!, envName: String!, search: SearchIOTDeployments, pq: CursorPaginationIn): IOTDeploymentPaginatedRecords @join__field(graph: IOT_CONSOLE_API) + iot_getDeployment(projectName: String!, envName: String!, name: String!): IOTDeployment @join__field(graph: IOT_CONSOLE_API) + iot_listApps(projectName: String!, envName: String!, deviceBlueprintName: String!, search: SearchIOTApps, pq: CursorPaginationIn): IOTAppPaginatedRecords @join__field(graph: IOT_CONSOLE_API) + iot_getApp(projectName: String!, envName: String!, deviceBlueprintName: String!, name: String!): IOTApp @join__field(graph: IOT_CONSOLE_API) } type RemoteLogin @@ -4619,6 +4998,55 @@ input SearchImagePullSecrets markedForDeletion: MatchFilterIn } +input SearchIOTApps + @join__type(graph: IOT_CONSOLE_API) +{ + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDeployments + @join__type(graph: IOT_CONSOLE_API) +{ + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDeviceBlueprints + @join__type(graph: IOT_CONSOLE_API) +{ + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDevices + @join__type(graph: IOT_CONSOLE_API) +{ + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTEnvironments + @join__type(graph: IOT_CONSOLE_API) +{ + text: MatchFilterIn + projectName: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTProjects + @join__type(graph: IOT_CONSOLE_API) +{ + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + input SearchManagedResources @join__type(graph: CONSOLE_API) { diff --git a/apps/gateway/supergraph.yml b/apps/gateway/supergraph.yml index 812a678f8..64e25a87e 100644 --- a/apps/gateway/supergraph.yml +++ b/apps/gateway/supergraph.yml @@ -20,3 +20,7 @@ subgraphs: routing_url: http://infra-api/query schema: file: ./schemas/infra-api.schema + iot-console-api: + routing_url: http://iot-console-api/query + schema: + file: ./schemas/iot-console-api.schema diff --git a/apps/iot-console/Containerfile b/apps/iot-console/Containerfile new file mode 100644 index 000000000..612a091d7 --- /dev/null +++ b/apps/iot-console/Containerfile @@ -0,0 +1,5 @@ +#syntax=docker/dockerfile:1 +FROM gcr.io/distroless/static-debian11:nonroot +ARG BINARY +COPY --chown=1001 ./bin/$BINARY ./console +ENTRYPOINT ["./iot-device"] diff --git a/apps/iot-console/Taskfile.yml b/apps/iot-console/Taskfile.yml new file mode 100644 index 000000000..f16cc5408 --- /dev/null +++ b/apps/iot-console/Taskfile.yml @@ -0,0 +1,55 @@ +version: "3" + +vars: + app: iot-device + +includes: + go: ../../.tools/taskfiles/go-build.yml + +tasks: + gql: + dir: ./internal/app + cmds: + - go run github.com/99designs/gqlgen generate + - gofmt -w -d -r '"errors" -> "github.com/kloudlite/api/pkg/errors"' graph/*.resolvers.go + + k8s-schema: + cmds: + - mkdir -p "./internal/app/_struct-to-graphql" + - go run ../../cmd/struct-to-graphql + --struct github.com/kloudlite/api/apps/iot-console/internal/entities.IOTProject + --struct github.com/kloudlite/api/apps/iot-console/internal/entities.IOTEnvironment + --struct github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDevice + --struct github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeviceBlueprint + --struct github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeployment + --struct github.com/kloudlite/api/apps/iot-console/internal/entities.IOTApp + --struct github.com/kloudlite/api/pkg/repos.MatchFilter + --struct github.com/kloudlite/api/pkg/repos.CursorPagination + > ./internal/app/_struct-to-graphql/main.go + - |+ + pushd ./internal/app/_struct-to-graphql + go run main.go --dev --out-dir ../graph/struct-to-graphql --with-pagination IOTProject,IOTEnvironment,IOTDevice,IOTDeviceBlueprint,IOTDeployment,IOTApp + popd + - rm -rf ./internal/app/_struct-to-graphql + + run: + dotenv: + - .secrets/env + env: + CGO_ENABLED: 0 + cmds: + - go run ./main.go --dev + + build: + cmds: + - task: go:build + vars: + Out: ./bin/{{.app}} + + container:build-and-push: + preconditions: + - sh: '[[ -n "{{.Image}}" ]]' + msg: "var Image must have a value, of format 'image_repository:image_tag'" + cmds: + - task: build + - docker buildx build -f ./Containerfile -t {{.Image}} . --build-arg BINARY={{.app}} --push \ No newline at end of file diff --git a/apps/iot-console/internal/app/app.go b/apps/iot-console/internal/app/app.go new file mode 100644 index 000000000..bb94f716f --- /dev/null +++ b/apps/iot-console/internal/app/app.go @@ -0,0 +1,86 @@ +package app + +import ( + "context" + "fmt" + "github.com/99designs/gqlgen/graphql" + "github.com/gofiber/fiber/v2" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/domain" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + "github.com/kloudlite/api/apps/iot-console/internal/env" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/constants" + "github.com/kloudlite/api/pkg/errors" + httpServer "github.com/kloudlite/api/pkg/http-server" + "github.com/kloudlite/api/pkg/kv" + "github.com/kloudlite/api/pkg/repos" + "go.uber.org/fx" +) + +var Module = fx.Module("app", + repos.NewFxMongoRepo[*entities.IOTProject]("projects", "prj", entities.IOTProjectIndexes), + repos.NewFxMongoRepo[*entities.IOTEnvironment]("environments", "env", entities.IOTEnvironmentIndexes), + repos.NewFxMongoRepo[*entities.IOTDeployment]("deployments", "depl", entities.IOTDeploymentIndexes), + repos.NewFxMongoRepo[*entities.IOTDevice]("devices", "dev", entities.IOTDeviceIndexes), + repos.NewFxMongoRepo[*entities.IOTDeviceBlueprint]("device_blueprints", "devblueprint", entities.IOTDeviceBlueprintIndexes), + repos.NewFxMongoRepo[*entities.IOTApp]("apps", "app", entities.IOTAppIndexes), + + fx.Invoke( + func(server httpServer.Server, d domain.Domain, sessionRepo kv.Repo[*common.AuthSession], ev *env.Env) { + gqlConfig := generated.Config{Resolvers: &graph.Resolver{Domain: d}} + + gqlConfig.Directives.IsLoggedIn = func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { + sess := httpServer.GetSession[*common.AuthSession](ctx) + if sess == nil { + return nil, fiber.ErrUnauthorized + } + + return next(context.WithValue(ctx, "user-session", sess)) + } + + gqlConfig.Directives.IsLoggedInAndVerified = func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { + + cookies := httpServer.GetHttpCookies(ctx) + fmt.Printf("cookies: %#v\n", cookies) + sess := httpServer.GetSession[*common.AuthSession](ctx) + if sess == nil { + return nil, fiber.ErrUnauthorized + } + + if !sess.UserVerified { + return nil, &fiber.Error{ + Code: fiber.StatusForbidden, + Message: "user's email is not verified", + } + } + + return next(context.WithValue(ctx, "user-session", sess)) + } + + gqlConfig.Directives.HasAccount = func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) { + sess := httpServer.GetSession[*common.AuthSession](ctx) + if sess == nil { + return nil, fiber.ErrUnauthorized + } + m := httpServer.GetHttpCookies(ctx) + klAccount := m[ev.AccountCookieName] + if klAccount == "" { + return nil, errors.Newf("no cookie named %q present in request", ev.AccountCookieName) + } + + nctx := context.WithValue(ctx, "user-session", sess) + nctx = context.WithValue(nctx, "account-name", klAccount) + return next(nctx) + } + + schema := generated.NewExecutableSchema(gqlConfig) + server.SetupGraphqlServer(schema, + httpServer.NewReadSessionMiddleware(sessionRepo, constants.CookieName, constants.CacheSessionPrefix), + ) + }, + ), + + domain.Module, +) diff --git a/apps/iot-console/internal/app/gqlgen.yml b/apps/iot-console/internal/app/gqlgen.yml new file mode 100644 index 000000000..ba59aa379 --- /dev/null +++ b/apps/iot-console/internal/app/gqlgen.yml @@ -0,0 +1,109 @@ + +# Where are all the schema files located? globs are supported eg src/**/*.graphqls +schema: + - graph/*.graphqls + - graph/struct-to-graphql/*.graphqls + +# Where should the generated server code go? +exec: + filename: graph/generated/generated.go + package: generated + +# Uncomment to enable federation +federation: + filename: graph/generated/federation.go + package: generated + version: 2 + +# Where should any generated models go? +model: + filename: graph/model/models_gen.go + package: model + +# Where should the resolver implementations go? +resolver: + layout: follow-schema + dir: graph + package: graph + +skip_mod_tidy: true + +# Optional: turn on use ` + "`" + `gqlgen:"fieldName"` + "`" + ` tags in your models +# struct_tag: json + +# Optional: turn on to use []Thing instead of []*Thing +# omit_slice_element_pointers: false + +# Optional: set to speed up generation time by not performing a final validation pass. +# skip_validation: true + +# gqlgen will search for any type names in the schema in these go packages +# if they match it will use them, otherwise it will generate them. +autobind: + - "github.com/kloudlite/api/pkg/errors" + # - "github.com/kloudlite/api/apps/wireguard/internal/domain/entities" + +# This section declares type mapping between the GraphQL and go type systems +# +# The first line in each type will be used as defaults for resolver arguments and +# modelgen, the others will be allowed when binding to fields. Configure them to +# your liking + +skip_validation: true +models: + ID: + model: + - github.com/kloudlite/api/pkg/repos.ID + Int: + model: + - github.com/99designs/gqlgen/graphql.Int + - github.com/99designs/gqlgen/graphql.Int64 + - github.com/99designs/gqlgen/graphql.Int32 + Json: + model: + - github.com/99designs/gqlgen/graphql.Map + + Metadata: &metadata-model + model: k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta + MetadataIn: *metadata-model + + IOTProject: &iot-project-model + model: github.com/kloudlite/api/apps/iot-console/internal/entities.IOTProject + IOTProjectIn: *iot-project-model + + IOTEnvironment: &iot-environment-model + model: github.com/kloudlite/api/apps/iot-console/internal/entities.IOTEnvironment + IOTEnvironmentIn: *iot-environment-model + + IOTDevice: &iot-device-model + model: github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDevice + IOTDeviceIn: *iot-device-model + + IOTDeviceBlueprint: &iot-device-blueprint-model + model: github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeviceBlueprint + IOTDeviceBlueprintIn: *iot-device-blueprint-model + + IOTDeployment: &iot-deployment-model + model: github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeployment + IOTDeploymentIn: *iot-deployment-model + + IOTApp: &iot-app-model + model: github.com/kloudlite/api/apps/iot-console/internal/entities.IOTApp + IOTAppIn: *iot-app-model + + MatchFilter: &match-filter-model + model: github.com/kloudlite/api/pkg/repos.MatchFilter + MatchFilterIn: *match-filter-model + + MatchFilterMatchType: + model: github.com/kloudlite/api/pkg/repos.MatchType + + CursorPagination: &cursor-pagination-model + model: github.com/kloudlite/api/pkg/repos.CursorPagination + CursorPaginationIn: *cursor-pagination-model + + CursorPaginationSortDirection: &cursor-pagination-sort-direction + model: github.com/kloudlite/api/pkg/repos.SortDirection + + Github__com___kloudlite___api___common__CreatedOrUpdatedBy: + model: github.com/kloudlite/api/common.CreatedOrUpdatedBy diff --git a/apps/iot-console/internal/app/graph/common-types.resolvers.go b/apps/iot-console/internal/app/graph/common-types.resolvers.go new file mode 100644 index 000000000..c61930e67 --- /dev/null +++ b/apps/iot-console/internal/app/graph/common-types.resolvers.go @@ -0,0 +1,64 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "fmt" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/common" + "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// UserID is the resolver for the userId field. +func (r *github__com___kloudlite___api___common__CreatedOrUpdatedByResolver) UserID(ctx context.Context, obj *common.CreatedOrUpdatedBy) (string, error) { + panic(fmt.Errorf("not implemented: UserID - userId")) +} + +// Annotations is the resolver for the annotations field. +func (r *metadataResolver) Annotations(ctx context.Context, obj *v1.ObjectMeta) (map[string]interface{}, error) { + panic(fmt.Errorf("not implemented: Annotations - annotations")) +} + +// CreationTimestamp is the resolver for the creationTimestamp field. +func (r *metadataResolver) CreationTimestamp(ctx context.Context, obj *v1.ObjectMeta) (string, error) { + panic(fmt.Errorf("not implemented: CreationTimestamp - creationTimestamp")) +} + +// DeletionTimestamp is the resolver for the deletionTimestamp field. +func (r *metadataResolver) DeletionTimestamp(ctx context.Context, obj *v1.ObjectMeta) (*string, error) { + panic(fmt.Errorf("not implemented: DeletionTimestamp - deletionTimestamp")) +} + +// Labels is the resolver for the labels field. +func (r *metadataResolver) Labels(ctx context.Context, obj *v1.ObjectMeta) (map[string]interface{}, error) { + panic(fmt.Errorf("not implemented: Labels - labels")) +} + +// Annotations is the resolver for the annotations field. +func (r *metadataInResolver) Annotations(ctx context.Context, obj *v1.ObjectMeta, data map[string]interface{}) error { + panic(fmt.Errorf("not implemented: Annotations - annotations")) +} + +// Labels is the resolver for the labels field. +func (r *metadataInResolver) Labels(ctx context.Context, obj *v1.ObjectMeta, data map[string]interface{}) error { + panic(fmt.Errorf("not implemented: Labels - labels")) +} + +// Github__com___kloudlite___api___common__CreatedOrUpdatedBy returns generated.Github__com___kloudlite___api___common__CreatedOrUpdatedByResolver implementation. +func (r *Resolver) Github__com___kloudlite___api___common__CreatedOrUpdatedBy() generated.Github__com___kloudlite___api___common__CreatedOrUpdatedByResolver { + return &github__com___kloudlite___api___common__CreatedOrUpdatedByResolver{r} +} + +// Metadata returns generated.MetadataResolver implementation. +func (r *Resolver) Metadata() generated.MetadataResolver { return &metadataResolver{r} } + +// MetadataIn returns generated.MetadataInResolver implementation. +func (r *Resolver) MetadataIn() generated.MetadataInResolver { return &metadataInResolver{r} } + +type github__com___kloudlite___api___common__CreatedOrUpdatedByResolver struct{ *Resolver } +type metadataResolver struct{ *Resolver } +type metadataInResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/generated/federation.go b/apps/iot-console/internal/app/graph/generated/federation.go new file mode 100644 index 000000000..1116a0266 --- /dev/null +++ b/apps/iot-console/internal/app/graph/generated/federation.go @@ -0,0 +1,35 @@ +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. + +package generated + +import ( + "context" + "errors" + "strings" + + "github.com/99designs/gqlgen/plugin/federation/fedruntime" +) + +var ( + ErrUnknownType = errors.New("unknown type") + ErrTypeNotFound = errors.New("type not found") +) + +func (ec *executionContext) __resolve__service(ctx context.Context) (fedruntime.Service, error) { + if ec.DisableIntrospection { + return fedruntime.Service{}, errors.New("federated introspection disabled") + } + + var sdl []string + + for _, src := range sources { + if src.BuiltIn { + continue + } + sdl = append(sdl, src.Input) + } + + return fedruntime.Service{ + SDL: strings.Join(sdl, "\n"), + }, nil +} diff --git a/apps/iot-console/internal/app/graph/generated/generated.go b/apps/iot-console/internal/app/graph/generated/generated.go new file mode 100644 index 000000000..b6d1378b4 --- /dev/null +++ b/apps/iot-console/internal/app/graph/generated/generated.go @@ -0,0 +1,29486 @@ +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. + +package generated + +import ( + "bytes" + "context" + "errors" + "fmt" + "strconv" + "sync" + "sync/atomic" + + "github.com/99designs/gqlgen/graphql" + "github.com/99designs/gqlgen/graphql/introspection" + "github.com/99designs/gqlgen/plugin/federation/fedruntime" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/model" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/pkg/repos" + gqlparser "github.com/vektah/gqlparser/v2" + "github.com/vektah/gqlparser/v2/ast" + "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// region ************************** generated!.gotpl ************************** + +// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface. +func NewExecutableSchema(cfg Config) graphql.ExecutableSchema { + return &executableSchema{ + schema: cfg.Schema, + resolvers: cfg.Resolvers, + directives: cfg.Directives, + complexity: cfg.Complexity, + } +} + +type Config struct { + Schema *ast.Schema + Resolvers ResolverRoot + Directives DirectiveRoot + Complexity ComplexityRoot +} + +type ResolverRoot interface { + Github__com___kloudlite___api___common__CreatedOrUpdatedBy() Github__com___kloudlite___api___common__CreatedOrUpdatedByResolver + IOTApp() IOTAppResolver + IOTDeployment() IOTDeploymentResolver + IOTDevice() IOTDeviceResolver + IOTDeviceBlueprint() IOTDeviceBlueprintResolver + IOTEnvironment() IOTEnvironmentResolver + IOTProject() IOTProjectResolver + Metadata() MetadataResolver + Mutation() MutationResolver + Query() QueryResolver + IOTAppIn() IOTAppInResolver + IOTDeploymentIn() IOTDeploymentInResolver + IOTDeviceBlueprintIn() IOTDeviceBlueprintInResolver + MetadataIn() MetadataInResolver +} + +type DirectiveRoot struct { + HasAccount func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + IsLoggedIn func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) + IsLoggedInAndVerified func(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error) +} + +type ComplexityRoot struct { + CursorPagination struct { + After func(childComplexity int) int + Before func(childComplexity int) int + First func(childComplexity int) int + Last func(childComplexity int) int + OrderBy func(childComplexity int) int + SortDirection func(childComplexity int) int + } + + Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService struct { + IP func(childComplexity int) int + Name func(childComplexity int) int + } + + Github__com___kloudlite___api___common__CreatedOrUpdatedBy struct { + UserEmail func(childComplexity int) int + UserID func(childComplexity int) int + UserName func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__AppContainer struct { + Args func(childComplexity int) int + Command func(childComplexity int) int + Env func(childComplexity int) int + EnvFrom func(childComplexity int) int + Image func(childComplexity int) int + ImagePullPolicy func(childComplexity int) int + LivenessProbe func(childComplexity int) int + Name func(childComplexity int) int + ReadinessProbe func(childComplexity int) int + ResourceCPU func(childComplexity int) int + ResourceMemory func(childComplexity int) int + Volumes func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__AppSpec struct { + Containers func(childComplexity int) int + DisplayName func(childComplexity int) int + Freeze func(childComplexity int) int + Hpa func(childComplexity int) int + Intercept func(childComplexity int) int + NodeSelector func(childComplexity int) int + Region func(childComplexity int) int + Replicas func(childComplexity int) int + ServiceAccount func(childComplexity int) int + Services func(childComplexity int) int + Tolerations func(childComplexity int) int + TopologySpreadConstraints func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__AppSvc struct { + Name func(childComplexity int) int + Port func(childComplexity int) int + TargetPort func(childComplexity int) int + Type func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv struct { + Key func(childComplexity int) int + Optional func(childComplexity int) int + RefKey func(childComplexity int) int + RefName func(childComplexity int) int + Type func(childComplexity int) int + Value func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__ContainerResource struct { + Max func(childComplexity int) int + Min func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume struct { + Items func(childComplexity int) int + MountPath func(childComplexity int) int + RefName func(childComplexity int) int + Type func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem struct { + FileName func(childComplexity int) int + Key func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__EnvFrom struct { + RefName func(childComplexity int) int + Type func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__HPA struct { + Enabled func(childComplexity int) int + MaxReplicas func(childComplexity int) int + MinReplicas func(childComplexity int) int + ThresholdCPU func(childComplexity int) int + ThresholdMemory func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe struct { + HTTPHeaders func(childComplexity int) int + Path func(childComplexity int) int + Port func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__Intercept struct { + Enabled func(childComplexity int) int + ToDevice func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__Probe struct { + FailureThreshold func(childComplexity int) int + HTTPGet func(childComplexity int) int + InitialDelay func(childComplexity int) int + Interval func(childComplexity int) int + Shell func(childComplexity int) int + TCP func(childComplexity int) int + Type func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__ShellProbe struct { + Command func(childComplexity int) int + } + + Github__com___kloudlite___operator___apis___crds___v1__TcpProbe struct { + Port func(childComplexity int) int + } + + Github__com___kloudlite___operator___pkg___operator__Check struct { + Debug func(childComplexity int) int + Error func(childComplexity int) int + Generation func(childComplexity int) int + Info func(childComplexity int) int + Message func(childComplexity int) int + StartedAt func(childComplexity int) int + State func(childComplexity int) int + Status func(childComplexity int) int + } + + Github__com___kloudlite___operator___pkg___operator__CheckMeta struct { + Debug func(childComplexity int) int + Description func(childComplexity int) int + Name func(childComplexity int) int + Title func(childComplexity int) int + } + + Github__com___kloudlite___operator___pkg___operator__ResourceRef struct { + APIVersion func(childComplexity int) int + Kind func(childComplexity int) int + Name func(childComplexity int) int + Namespace func(childComplexity int) int + } + + Github__com___kloudlite___operator___pkg___operator__Status struct { + CheckList func(childComplexity int) int + Checks func(childComplexity int) int + IsReady func(childComplexity int) int + LastReadyGeneration func(childComplexity int) int + LastReconcileTime func(childComplexity int) int + Message func(childComplexity int) int + Resources func(childComplexity int) int + } + + Github__com___kloudlite___operator___pkg___raw____json__RawJson struct { + RawMessage func(childComplexity int) int + } + + IOTApp struct { + APIVersion func(childComplexity int) int + AccountName func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + DeviceBlueprintName func(childComplexity int) int + DisplayName func(childComplexity int) int + Enabled func(childComplexity int) int + EnvironmentName func(childComplexity int) int + Id func(childComplexity int) int + Kind func(childComplexity int) int + LastUpdatedBy func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + ObjectMeta func(childComplexity int) int + ProjectName func(childComplexity int) int + RecordVersion func(childComplexity int) int + Spec func(childComplexity int) int + Status func(childComplexity int) int + UpdateTime func(childComplexity int) int + } + + IOTAppEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + IOTAppPaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + IOTDeployment struct { + AccountName func(childComplexity int) int + CIDR func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + DisplayName func(childComplexity int) int + EnvironmentName func(childComplexity int) int + ExposedServices func(childComplexity int) int + Id func(childComplexity int) int + LastUpdatedBy func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Name func(childComplexity int) int + ProjectName func(childComplexity int) int + RecordVersion func(childComplexity int) int + UpdateTime func(childComplexity int) int + } + + IOTDeploymentEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + IOTDeploymentPaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + IOTDevice struct { + AccountName func(childComplexity int) int + Blueprint func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + Deployment func(childComplexity int) int + DisplayName func(childComplexity int) int + EnvironmentName func(childComplexity int) int + IP func(childComplexity int) int + Id func(childComplexity int) int + LastUpdatedBy func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Name func(childComplexity int) int + PodCIDR func(childComplexity int) int + ProjectName func(childComplexity int) int + PublicKey func(childComplexity int) int + RecordVersion func(childComplexity int) int + ServiceCIDR func(childComplexity int) int + UpdateTime func(childComplexity int) int + Version func(childComplexity int) int + } + + IOTDeviceBlueprint struct { + AccountName func(childComplexity int) int + BluePrintType func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + DisplayName func(childComplexity int) int + EnvironmentName func(childComplexity int) int + Id func(childComplexity int) int + LastUpdatedBy func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Name func(childComplexity int) int + ProjectName func(childComplexity int) int + RecordVersion func(childComplexity int) int + UpdateTime func(childComplexity int) int + Version func(childComplexity int) int + } + + IOTDeviceBlueprintEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + IOTDeviceBlueprintPaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + IOTDeviceEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + IOTDevicePaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + IOTEnvironment struct { + AccountName func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + DisplayName func(childComplexity int) int + Id func(childComplexity int) int + LastUpdatedBy func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Name func(childComplexity int) int + ProjectName func(childComplexity int) int + RecordVersion func(childComplexity int) int + UpdateTime func(childComplexity int) int + } + + IOTEnvironmentEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + IOTEnvironmentPaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + IOTProject struct { + AccountName func(childComplexity int) int + CreatedBy func(childComplexity int) int + CreationTime func(childComplexity int) int + DisplayName func(childComplexity int) int + Id func(childComplexity int) int + LastUpdatedBy func(childComplexity int) int + MarkedForDeletion func(childComplexity int) int + Name func(childComplexity int) int + RecordVersion func(childComplexity int) int + UpdateTime func(childComplexity int) int + } + + IOTProjectEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + + IOTProjectPaginatedRecords struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + K8s__io___api___core___v1__Toleration struct { + Effect func(childComplexity int) int + Key func(childComplexity int) int + Operator func(childComplexity int) int + TolerationSeconds func(childComplexity int) int + Value func(childComplexity int) int + } + + K8s__io___api___core___v1__TopologySpreadConstraint struct { + LabelSelector func(childComplexity int) int + MatchLabelKeys func(childComplexity int) int + MaxSkew func(childComplexity int) int + MinDomains func(childComplexity int) int + NodeAffinityPolicy func(childComplexity int) int + NodeTaintsPolicy func(childComplexity int) int + TopologyKey func(childComplexity int) int + WhenUnsatisfiable func(childComplexity int) int + } + + K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector struct { + MatchExpressions func(childComplexity int) int + MatchLabels func(childComplexity int) int + } + + K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement struct { + Key func(childComplexity int) int + Operator func(childComplexity int) int + Values func(childComplexity int) int + } + + MatchFilter struct { + Array func(childComplexity int) int + Exact func(childComplexity int) int + MatchType func(childComplexity int) int + Regex func(childComplexity int) int + } + + Metadata struct { + Annotations func(childComplexity int) int + CreationTimestamp func(childComplexity int) int + DeletionTimestamp func(childComplexity int) int + Generation func(childComplexity int) int + Labels func(childComplexity int) int + Name func(childComplexity int) int + Namespace func(childComplexity int) int + } + + Mutation struct { + IotCreateApp func(childComplexity int, projectName string, envName string, deviceBlueprintName string, app entities.IOTApp) int + IotCreateDeployment func(childComplexity int, projectName string, envName string, deployment entities.IOTDeployment) int + IotCreateDevice func(childComplexity int, projectName string, envName string, device entities.IOTDevice) int + IotCreateDeviceBlueprint func(childComplexity int, projectName string, envName string, deviceBlueprint entities.IOTDeviceBlueprint) int + IotCreateEnvironment func(childComplexity int, projectName string, env entities.IOTEnvironment) int + IotCreateProject func(childComplexity int, project entities.IOTProject) int + IotDeleteApp func(childComplexity int, projectName string, envName string, deviceBlueprintName string, name string) int + IotDeleteDeployment func(childComplexity int, projectName string, envName string, name string) int + IotDeleteDevice func(childComplexity int, projectName string, envName string, name string) int + IotDeleteDeviceBlueprint func(childComplexity int, projectName string, envName string, name string) int + IotDeleteEnvironment func(childComplexity int, projectName string, name string) int + IotDeleteProject func(childComplexity int, name string) int + IotUpdateApp func(childComplexity int, projectName string, envName string, deviceBlueprintName string, app entities.IOTApp) int + IotUpdateDeployment func(childComplexity int, projectName string, envName string, deployment entities.IOTDeployment) int + IotUpdateDevice func(childComplexity int, projectName string, envName string, device entities.IOTDevice) int + IotUpdateDeviceBlueprint func(childComplexity int, projectName string, envName string, deviceBlueprint entities.IOTDeviceBlueprint) int + IotUpdateEnvironment func(childComplexity int, projectName string, env entities.IOTEnvironment) int + IotUpdateProject func(childComplexity int, project entities.IOTProject) int + } + + PageInfo struct { + EndCursor func(childComplexity int) int + HasNextPage func(childComplexity int) int + HasPreviousPage func(childComplexity int) int + StartCursor func(childComplexity int) int + } + + Query struct { + IotGetApp func(childComplexity int, projectName string, envName string, deviceBlueprintName string, name string) int + IotGetDeployment func(childComplexity int, projectName string, envName string, name string) int + IotGetDevice func(childComplexity int, projectName string, envName string, name string) int + IotGetDeviceBlueprint func(childComplexity int, projectName string, envName string, name string) int + IotGetEnvironment func(childComplexity int, projectName string, name string) int + IotGetProject func(childComplexity int, name string) int + IotListApps func(childComplexity int, projectName string, envName string, deviceBlueprintName string, search *model.SearchIOTApps, pq *repos.CursorPagination) int + IotListDeployments func(childComplexity int, projectName string, envName string, search *model.SearchIOTDeployments, pq *repos.CursorPagination) int + IotListDeviceBlueprints func(childComplexity int, projectName string, envName string, search *model.SearchIOTDeviceBlueprints, pq *repos.CursorPagination) int + IotListDevices func(childComplexity int, projectName string, envName string, search *model.SearchIOTDevices, pq *repos.CursorPagination) int + IotListEnvironments func(childComplexity int, projectName string, search *model.SearchIOTEnvironments, pq *repos.CursorPagination) int + IotListProjects func(childComplexity int, search *model.SearchIOTProjects, pq *repos.CursorPagination) int + __resolve__service func(childComplexity int) int + } + + _Service struct { + SDL func(childComplexity int) int + } +} + +type Github__com___kloudlite___api___common__CreatedOrUpdatedByResolver interface { + UserID(ctx context.Context, obj *common.CreatedOrUpdatedBy) (string, error) +} +type IOTAppResolver interface { + CreationTime(ctx context.Context, obj *entities.IOTApp) (string, error) + + Spec(ctx context.Context, obj *entities.IOTApp) (*model.GithubComKloudliteOperatorApisCrdsV1AppSpec, error) + Status(ctx context.Context, obj *entities.IOTApp) (*model.GithubComKloudliteOperatorPkgOperatorStatus, error) + UpdateTime(ctx context.Context, obj *entities.IOTApp) (string, error) +} +type IOTDeploymentResolver interface { + CreationTime(ctx context.Context, obj *entities.IOTDeployment) (string, error) + + ExposedServices(ctx context.Context, obj *entities.IOTDeployment) ([]*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService, error) + + UpdateTime(ctx context.Context, obj *entities.IOTDeployment) (string, error) +} +type IOTDeviceResolver interface { + CreationTime(ctx context.Context, obj *entities.IOTDevice) (string, error) + + UpdateTime(ctx context.Context, obj *entities.IOTDevice) (string, error) +} +type IOTDeviceBlueprintResolver interface { + BluePrintType(ctx context.Context, obj *entities.IOTDeviceBlueprint) (model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType, error) + + CreationTime(ctx context.Context, obj *entities.IOTDeviceBlueprint) (string, error) + + UpdateTime(ctx context.Context, obj *entities.IOTDeviceBlueprint) (string, error) +} +type IOTEnvironmentResolver interface { + CreationTime(ctx context.Context, obj *entities.IOTEnvironment) (string, error) + + UpdateTime(ctx context.Context, obj *entities.IOTEnvironment) (string, error) +} +type IOTProjectResolver interface { + CreationTime(ctx context.Context, obj *entities.IOTProject) (string, error) + + UpdateTime(ctx context.Context, obj *entities.IOTProject) (string, error) +} +type MetadataResolver interface { + Annotations(ctx context.Context, obj *v1.ObjectMeta) (map[string]interface{}, error) + CreationTimestamp(ctx context.Context, obj *v1.ObjectMeta) (string, error) + DeletionTimestamp(ctx context.Context, obj *v1.ObjectMeta) (*string, error) + + Labels(ctx context.Context, obj *v1.ObjectMeta) (map[string]interface{}, error) +} +type MutationResolver interface { + IotCreateProject(ctx context.Context, project entities.IOTProject) (*entities.IOTProject, error) + IotUpdateProject(ctx context.Context, project entities.IOTProject) (*entities.IOTProject, error) + IotDeleteProject(ctx context.Context, name string) (bool, error) + IotCreateEnvironment(ctx context.Context, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) + IotUpdateEnvironment(ctx context.Context, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) + IotDeleteEnvironment(ctx context.Context, projectName string, name string) (bool, error) + IotCreateDevice(ctx context.Context, projectName string, envName string, device entities.IOTDevice) (*entities.IOTDevice, error) + IotUpdateDevice(ctx context.Context, projectName string, envName string, device entities.IOTDevice) (*entities.IOTDevice, error) + IotDeleteDevice(ctx context.Context, projectName string, envName string, name string) (bool, error) + IotCreateDeviceBlueprint(ctx context.Context, projectName string, envName string, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) + IotUpdateDeviceBlueprint(ctx context.Context, projectName string, envName string, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) + IotDeleteDeviceBlueprint(ctx context.Context, projectName string, envName string, name string) (bool, error) + IotCreateDeployment(ctx context.Context, projectName string, envName string, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) + IotUpdateDeployment(ctx context.Context, projectName string, envName string, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) + IotDeleteDeployment(ctx context.Context, projectName string, envName string, name string) (bool, error) + IotCreateApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) + IotUpdateApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) + IotDeleteApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, name string) (bool, error) +} +type QueryResolver interface { + IotListProjects(ctx context.Context, search *model.SearchIOTProjects, pq *repos.CursorPagination) (*model.IOTProjectPaginatedRecords, error) + IotGetProject(ctx context.Context, name string) (*entities.IOTProject, error) + IotListEnvironments(ctx context.Context, projectName string, search *model.SearchIOTEnvironments, pq *repos.CursorPagination) (*model.IOTEnvironmentPaginatedRecords, error) + IotGetEnvironment(ctx context.Context, projectName string, name string) (*entities.IOTEnvironment, error) + IotListDevices(ctx context.Context, projectName string, envName string, search *model.SearchIOTDevices, pq *repos.CursorPagination) (*model.IOTDevicePaginatedRecords, error) + IotGetDevice(ctx context.Context, projectName string, envName string, name string) (*entities.IOTDevice, error) + IotListDeviceBlueprints(ctx context.Context, projectName string, envName string, search *model.SearchIOTDeviceBlueprints, pq *repos.CursorPagination) (*model.IOTDeviceBlueprintPaginatedRecords, error) + IotGetDeviceBlueprint(ctx context.Context, projectName string, envName string, name string) (*entities.IOTDeviceBlueprint, error) + IotListDeployments(ctx context.Context, projectName string, envName string, search *model.SearchIOTDeployments, pq *repos.CursorPagination) (*model.IOTDeploymentPaginatedRecords, error) + IotGetDeployment(ctx context.Context, projectName string, envName string, name string) (*entities.IOTDeployment, error) + IotListApps(ctx context.Context, projectName string, envName string, deviceBlueprintName string, search *model.SearchIOTApps, pq *repos.CursorPagination) (*model.IOTAppPaginatedRecords, error) + IotGetApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, name string) (*entities.IOTApp, error) +} + +type IOTAppInResolver interface { + Metadata(ctx context.Context, obj *entities.IOTApp, data *v1.ObjectMeta) error + Spec(ctx context.Context, obj *entities.IOTApp, data *model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn) error +} +type IOTDeploymentInResolver interface { + ExposedServices(ctx context.Context, obj *entities.IOTDeployment, data []*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn) error +} +type IOTDeviceBlueprintInResolver interface { + BluePrintType(ctx context.Context, obj *entities.IOTDeviceBlueprint, data model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) error +} +type MetadataInResolver interface { + Annotations(ctx context.Context, obj *v1.ObjectMeta, data map[string]interface{}) error + Labels(ctx context.Context, obj *v1.ObjectMeta, data map[string]interface{}) error +} + +type executableSchema struct { + schema *ast.Schema + resolvers ResolverRoot + directives DirectiveRoot + complexity ComplexityRoot +} + +func (e *executableSchema) Schema() *ast.Schema { + if e.schema != nil { + return e.schema + } + return parsedSchema +} + +func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) { + ec := executionContext{nil, e, 0, 0, nil} + _ = ec + switch typeName + "." + field { + + case "CursorPagination.after": + if e.complexity.CursorPagination.After == nil { + break + } + + return e.complexity.CursorPagination.After(childComplexity), true + + case "CursorPagination.before": + if e.complexity.CursorPagination.Before == nil { + break + } + + return e.complexity.CursorPagination.Before(childComplexity), true + + case "CursorPagination.first": + if e.complexity.CursorPagination.First == nil { + break + } + + return e.complexity.CursorPagination.First(childComplexity), true + + case "CursorPagination.last": + if e.complexity.CursorPagination.Last == nil { + break + } + + return e.complexity.CursorPagination.Last(childComplexity), true + + case "CursorPagination.orderBy": + if e.complexity.CursorPagination.OrderBy == nil { + break + } + + return e.complexity.CursorPagination.OrderBy(childComplexity), true + + case "CursorPagination.sortDirection": + if e.complexity.CursorPagination.SortDirection == nil { + break + } + + return e.complexity.CursorPagination.SortDirection(childComplexity), true + + case "Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService.ip": + if e.complexity.Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService.IP == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService.IP(childComplexity), true + + case "Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService.name": + if e.complexity.Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService.Name == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService.Name(childComplexity), true + + case "Github__com___kloudlite___api___common__CreatedOrUpdatedBy.userEmail": + if e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserEmail == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserEmail(childComplexity), true + + case "Github__com___kloudlite___api___common__CreatedOrUpdatedBy.userId": + if e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserID == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserID(childComplexity), true + + case "Github__com___kloudlite___api___common__CreatedOrUpdatedBy.userName": + if e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserName == nil { + break + } + + return e.complexity.Github__com___kloudlite___api___common__CreatedOrUpdatedBy.UserName(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.args": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Args == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Args(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.command": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Command == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Command(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.env": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Env == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Env(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.envFrom": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.EnvFrom == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.EnvFrom(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.image": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Image == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Image(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.imagePullPolicy": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ImagePullPolicy == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ImagePullPolicy(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.livenessProbe": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.LivenessProbe == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.LivenessProbe(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.name": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Name == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Name(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.readinessProbe": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ReadinessProbe == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ReadinessProbe(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.resourceCpu": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ResourceCPU == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ResourceCPU(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.resourceMemory": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ResourceMemory == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.ResourceMemory(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppContainer.volumes": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Volumes == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppContainer.Volumes(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.containers": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Containers == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Containers(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.displayName": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.DisplayName == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.DisplayName(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.freeze": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Freeze == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Freeze(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.hpa": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Hpa == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Hpa(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.intercept": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Intercept == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Intercept(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.nodeSelector": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.NodeSelector == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.NodeSelector(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.region": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Region == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Region(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.replicas": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Replicas == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Replicas(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.serviceAccount": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.ServiceAccount == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.ServiceAccount(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.services": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Services == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Services(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.tolerations": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Tolerations == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.Tolerations(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSpec.topologySpreadConstraints": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.TopologySpreadConstraints == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSpec.TopologySpreadConstraints(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSvc.name": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.Name == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.Name(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSvc.port": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.Port == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.Port(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSvc.targetPort": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.TargetPort == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.TargetPort(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__AppSvc.type": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.Type == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__AppSvc.Type(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.key": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Key == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Key(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.optional": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Optional == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Optional(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.refKey": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.RefKey == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.RefKey(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.refName": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.RefName == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.RefName(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.type": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Type == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Type(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.value": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Value == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv.Value(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerResource.max": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerResource.Max == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerResource.Max(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerResource.min": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerResource.Min == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerResource.Min(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.items": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.Items == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.Items(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.mountPath": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.MountPath == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.MountPath(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.refName": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.RefName == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.RefName(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.type": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.Type == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume.Type(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem.fileName": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem.FileName == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem.FileName(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem.key": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem.Key == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem.Key(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__EnvFrom.refName": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvFrom.RefName == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvFrom.RefName(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__EnvFrom.type": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvFrom.Type == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__EnvFrom.Type(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HPA.enabled": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.Enabled == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.Enabled(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HPA.maxReplicas": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.MaxReplicas == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.MaxReplicas(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HPA.minReplicas": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.MinReplicas == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.MinReplicas(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HPA.thresholdCpu": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.ThresholdCPU == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.ThresholdCPU(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HPA.thresholdMemory": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.ThresholdMemory == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HPA.ThresholdMemory(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.httpHeaders": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.HTTPHeaders == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.HTTPHeaders(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.path": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.Path == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.Path(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.port": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.Port == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe.Port(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Intercept.enabled": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.Enabled == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.Enabled(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Intercept.toDevice": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.ToDevice == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Intercept.ToDevice(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.failureThreshold": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.FailureThreshold == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.FailureThreshold(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.httpGet": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.HTTPGet == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.HTTPGet(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.initialDelay": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.InitialDelay == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.InitialDelay(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.interval": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.Interval == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.Interval(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.shell": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.Shell == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.Shell(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.tcp": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.TCP == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.TCP(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__Probe.type": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.Type == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__Probe.Type(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.command": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.Command == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__ShellProbe.Command(childComplexity), true + + case "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.port": + if e.complexity.Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.Port == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___apis___crds___v1__TcpProbe.Port(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.debug": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Debug == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Debug(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.error": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Error == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Error(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.generation": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Generation == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Generation(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.info": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Info == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Info(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.message": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Message == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Message(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.startedAt": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.StartedAt == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.StartedAt(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.state": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.State == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.State(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Check.status": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Status == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Check.Status(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__CheckMeta.debug": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Debug == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Debug(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__CheckMeta.description": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Description == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Description(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__CheckMeta.name": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Name == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Name(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__CheckMeta.title": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Title == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__CheckMeta.Title(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__ResourceRef.apiVersion": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.APIVersion == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.APIVersion(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__ResourceRef.kind": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.Kind == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.Kind(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__ResourceRef.name": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.Name == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.Name(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__ResourceRef.namespace": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.Namespace == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__ResourceRef.Namespace(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.checkList": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.CheckList == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.CheckList(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.checks": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.Checks == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.Checks(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.isReady": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.IsReady == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.IsReady(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.lastReadyGeneration": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.LastReadyGeneration == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.LastReadyGeneration(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.lastReconcileTime": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.LastReconcileTime == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.LastReconcileTime(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.message": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.Message == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.Message(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___operator__Status.resources": + if e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.Resources == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___operator__Status.Resources(childComplexity), true + + case "Github__com___kloudlite___operator___pkg___raw____json__RawJson.RawMessage": + if e.complexity.Github__com___kloudlite___operator___pkg___raw____json__RawJson.RawMessage == nil { + break + } + + return e.complexity.Github__com___kloudlite___operator___pkg___raw____json__RawJson.RawMessage(childComplexity), true + + case "IOTApp.apiVersion": + if e.complexity.IOTApp.APIVersion == nil { + break + } + + return e.complexity.IOTApp.APIVersion(childComplexity), true + + case "IOTApp.accountName": + if e.complexity.IOTApp.AccountName == nil { + break + } + + return e.complexity.IOTApp.AccountName(childComplexity), true + + case "IOTApp.createdBy": + if e.complexity.IOTApp.CreatedBy == nil { + break + } + + return e.complexity.IOTApp.CreatedBy(childComplexity), true + + case "IOTApp.creationTime": + if e.complexity.IOTApp.CreationTime == nil { + break + } + + return e.complexity.IOTApp.CreationTime(childComplexity), true + + case "IOTApp.deviceBlueprintName": + if e.complexity.IOTApp.DeviceBlueprintName == nil { + break + } + + return e.complexity.IOTApp.DeviceBlueprintName(childComplexity), true + + case "IOTApp.displayName": + if e.complexity.IOTApp.DisplayName == nil { + break + } + + return e.complexity.IOTApp.DisplayName(childComplexity), true + + case "IOTApp.enabled": + if e.complexity.IOTApp.Enabled == nil { + break + } + + return e.complexity.IOTApp.Enabled(childComplexity), true + + case "IOTApp.environmentName": + if e.complexity.IOTApp.EnvironmentName == nil { + break + } + + return e.complexity.IOTApp.EnvironmentName(childComplexity), true + + case "IOTApp.id": + if e.complexity.IOTApp.Id == nil { + break + } + + return e.complexity.IOTApp.Id(childComplexity), true + + case "IOTApp.kind": + if e.complexity.IOTApp.Kind == nil { + break + } + + return e.complexity.IOTApp.Kind(childComplexity), true + + case "IOTApp.lastUpdatedBy": + if e.complexity.IOTApp.LastUpdatedBy == nil { + break + } + + return e.complexity.IOTApp.LastUpdatedBy(childComplexity), true + + case "IOTApp.markedForDeletion": + if e.complexity.IOTApp.MarkedForDeletion == nil { + break + } + + return e.complexity.IOTApp.MarkedForDeletion(childComplexity), true + + case "IOTApp.metadata": + if e.complexity.IOTApp.ObjectMeta == nil { + break + } + + return e.complexity.IOTApp.ObjectMeta(childComplexity), true + + case "IOTApp.projectName": + if e.complexity.IOTApp.ProjectName == nil { + break + } + + return e.complexity.IOTApp.ProjectName(childComplexity), true + + case "IOTApp.recordVersion": + if e.complexity.IOTApp.RecordVersion == nil { + break + } + + return e.complexity.IOTApp.RecordVersion(childComplexity), true + + case "IOTApp.spec": + if e.complexity.IOTApp.Spec == nil { + break + } + + return e.complexity.IOTApp.Spec(childComplexity), true + + case "IOTApp.status": + if e.complexity.IOTApp.Status == nil { + break + } + + return e.complexity.IOTApp.Status(childComplexity), true + + case "IOTApp.updateTime": + if e.complexity.IOTApp.UpdateTime == nil { + break + } + + return e.complexity.IOTApp.UpdateTime(childComplexity), true + + case "IOTAppEdge.cursor": + if e.complexity.IOTAppEdge.Cursor == nil { + break + } + + return e.complexity.IOTAppEdge.Cursor(childComplexity), true + + case "IOTAppEdge.node": + if e.complexity.IOTAppEdge.Node == nil { + break + } + + return e.complexity.IOTAppEdge.Node(childComplexity), true + + case "IOTAppPaginatedRecords.edges": + if e.complexity.IOTAppPaginatedRecords.Edges == nil { + break + } + + return e.complexity.IOTAppPaginatedRecords.Edges(childComplexity), true + + case "IOTAppPaginatedRecords.pageInfo": + if e.complexity.IOTAppPaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.IOTAppPaginatedRecords.PageInfo(childComplexity), true + + case "IOTAppPaginatedRecords.totalCount": + if e.complexity.IOTAppPaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.IOTAppPaginatedRecords.TotalCount(childComplexity), true + + case "IOTDeployment.accountName": + if e.complexity.IOTDeployment.AccountName == nil { + break + } + + return e.complexity.IOTDeployment.AccountName(childComplexity), true + + case "IOTDeployment.CIDR": + if e.complexity.IOTDeployment.CIDR == nil { + break + } + + return e.complexity.IOTDeployment.CIDR(childComplexity), true + + case "IOTDeployment.createdBy": + if e.complexity.IOTDeployment.CreatedBy == nil { + break + } + + return e.complexity.IOTDeployment.CreatedBy(childComplexity), true + + case "IOTDeployment.creationTime": + if e.complexity.IOTDeployment.CreationTime == nil { + break + } + + return e.complexity.IOTDeployment.CreationTime(childComplexity), true + + case "IOTDeployment.displayName": + if e.complexity.IOTDeployment.DisplayName == nil { + break + } + + return e.complexity.IOTDeployment.DisplayName(childComplexity), true + + case "IOTDeployment.environmentName": + if e.complexity.IOTDeployment.EnvironmentName == nil { + break + } + + return e.complexity.IOTDeployment.EnvironmentName(childComplexity), true + + case "IOTDeployment.exposedServices": + if e.complexity.IOTDeployment.ExposedServices == nil { + break + } + + return e.complexity.IOTDeployment.ExposedServices(childComplexity), true + + case "IOTDeployment.id": + if e.complexity.IOTDeployment.Id == nil { + break + } + + return e.complexity.IOTDeployment.Id(childComplexity), true + + case "IOTDeployment.lastUpdatedBy": + if e.complexity.IOTDeployment.LastUpdatedBy == nil { + break + } + + return e.complexity.IOTDeployment.LastUpdatedBy(childComplexity), true + + case "IOTDeployment.markedForDeletion": + if e.complexity.IOTDeployment.MarkedForDeletion == nil { + break + } + + return e.complexity.IOTDeployment.MarkedForDeletion(childComplexity), true + + case "IOTDeployment.name": + if e.complexity.IOTDeployment.Name == nil { + break + } + + return e.complexity.IOTDeployment.Name(childComplexity), true + + case "IOTDeployment.projectName": + if e.complexity.IOTDeployment.ProjectName == nil { + break + } + + return e.complexity.IOTDeployment.ProjectName(childComplexity), true + + case "IOTDeployment.recordVersion": + if e.complexity.IOTDeployment.RecordVersion == nil { + break + } + + return e.complexity.IOTDeployment.RecordVersion(childComplexity), true + + case "IOTDeployment.updateTime": + if e.complexity.IOTDeployment.UpdateTime == nil { + break + } + + return e.complexity.IOTDeployment.UpdateTime(childComplexity), true + + case "IOTDeploymentEdge.cursor": + if e.complexity.IOTDeploymentEdge.Cursor == nil { + break + } + + return e.complexity.IOTDeploymentEdge.Cursor(childComplexity), true + + case "IOTDeploymentEdge.node": + if e.complexity.IOTDeploymentEdge.Node == nil { + break + } + + return e.complexity.IOTDeploymentEdge.Node(childComplexity), true + + case "IOTDeploymentPaginatedRecords.edges": + if e.complexity.IOTDeploymentPaginatedRecords.Edges == nil { + break + } + + return e.complexity.IOTDeploymentPaginatedRecords.Edges(childComplexity), true + + case "IOTDeploymentPaginatedRecords.pageInfo": + if e.complexity.IOTDeploymentPaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.IOTDeploymentPaginatedRecords.PageInfo(childComplexity), true + + case "IOTDeploymentPaginatedRecords.totalCount": + if e.complexity.IOTDeploymentPaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.IOTDeploymentPaginatedRecords.TotalCount(childComplexity), true + + case "IOTDevice.accountName": + if e.complexity.IOTDevice.AccountName == nil { + break + } + + return e.complexity.IOTDevice.AccountName(childComplexity), true + + case "IOTDevice.blueprint": + if e.complexity.IOTDevice.Blueprint == nil { + break + } + + return e.complexity.IOTDevice.Blueprint(childComplexity), true + + case "IOTDevice.createdBy": + if e.complexity.IOTDevice.CreatedBy == nil { + break + } + + return e.complexity.IOTDevice.CreatedBy(childComplexity), true + + case "IOTDevice.creationTime": + if e.complexity.IOTDevice.CreationTime == nil { + break + } + + return e.complexity.IOTDevice.CreationTime(childComplexity), true + + case "IOTDevice.deployment": + if e.complexity.IOTDevice.Deployment == nil { + break + } + + return e.complexity.IOTDevice.Deployment(childComplexity), true + + case "IOTDevice.displayName": + if e.complexity.IOTDevice.DisplayName == nil { + break + } + + return e.complexity.IOTDevice.DisplayName(childComplexity), true + + case "IOTDevice.environmentName": + if e.complexity.IOTDevice.EnvironmentName == nil { + break + } + + return e.complexity.IOTDevice.EnvironmentName(childComplexity), true + + case "IOTDevice.ip": + if e.complexity.IOTDevice.IP == nil { + break + } + + return e.complexity.IOTDevice.IP(childComplexity), true + + case "IOTDevice.id": + if e.complexity.IOTDevice.Id == nil { + break + } + + return e.complexity.IOTDevice.Id(childComplexity), true + + case "IOTDevice.lastUpdatedBy": + if e.complexity.IOTDevice.LastUpdatedBy == nil { + break + } + + return e.complexity.IOTDevice.LastUpdatedBy(childComplexity), true + + case "IOTDevice.markedForDeletion": + if e.complexity.IOTDevice.MarkedForDeletion == nil { + break + } + + return e.complexity.IOTDevice.MarkedForDeletion(childComplexity), true + + case "IOTDevice.name": + if e.complexity.IOTDevice.Name == nil { + break + } + + return e.complexity.IOTDevice.Name(childComplexity), true + + case "IOTDevice.podCIDR": + if e.complexity.IOTDevice.PodCIDR == nil { + break + } + + return e.complexity.IOTDevice.PodCIDR(childComplexity), true + + case "IOTDevice.projectName": + if e.complexity.IOTDevice.ProjectName == nil { + break + } + + return e.complexity.IOTDevice.ProjectName(childComplexity), true + + case "IOTDevice.publicKey": + if e.complexity.IOTDevice.PublicKey == nil { + break + } + + return e.complexity.IOTDevice.PublicKey(childComplexity), true + + case "IOTDevice.recordVersion": + if e.complexity.IOTDevice.RecordVersion == nil { + break + } + + return e.complexity.IOTDevice.RecordVersion(childComplexity), true + + case "IOTDevice.serviceCIDR": + if e.complexity.IOTDevice.ServiceCIDR == nil { + break + } + + return e.complexity.IOTDevice.ServiceCIDR(childComplexity), true + + case "IOTDevice.updateTime": + if e.complexity.IOTDevice.UpdateTime == nil { + break + } + + return e.complexity.IOTDevice.UpdateTime(childComplexity), true + + case "IOTDevice.version": + if e.complexity.IOTDevice.Version == nil { + break + } + + return e.complexity.IOTDevice.Version(childComplexity), true + + case "IOTDeviceBlueprint.accountName": + if e.complexity.IOTDeviceBlueprint.AccountName == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.AccountName(childComplexity), true + + case "IOTDeviceBlueprint.bluePrintType": + if e.complexity.IOTDeviceBlueprint.BluePrintType == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.BluePrintType(childComplexity), true + + case "IOTDeviceBlueprint.createdBy": + if e.complexity.IOTDeviceBlueprint.CreatedBy == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.CreatedBy(childComplexity), true + + case "IOTDeviceBlueprint.creationTime": + if e.complexity.IOTDeviceBlueprint.CreationTime == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.CreationTime(childComplexity), true + + case "IOTDeviceBlueprint.displayName": + if e.complexity.IOTDeviceBlueprint.DisplayName == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.DisplayName(childComplexity), true + + case "IOTDeviceBlueprint.environmentName": + if e.complexity.IOTDeviceBlueprint.EnvironmentName == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.EnvironmentName(childComplexity), true + + case "IOTDeviceBlueprint.id": + if e.complexity.IOTDeviceBlueprint.Id == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.Id(childComplexity), true + + case "IOTDeviceBlueprint.lastUpdatedBy": + if e.complexity.IOTDeviceBlueprint.LastUpdatedBy == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.LastUpdatedBy(childComplexity), true + + case "IOTDeviceBlueprint.markedForDeletion": + if e.complexity.IOTDeviceBlueprint.MarkedForDeletion == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.MarkedForDeletion(childComplexity), true + + case "IOTDeviceBlueprint.name": + if e.complexity.IOTDeviceBlueprint.Name == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.Name(childComplexity), true + + case "IOTDeviceBlueprint.projectName": + if e.complexity.IOTDeviceBlueprint.ProjectName == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.ProjectName(childComplexity), true + + case "IOTDeviceBlueprint.recordVersion": + if e.complexity.IOTDeviceBlueprint.RecordVersion == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.RecordVersion(childComplexity), true + + case "IOTDeviceBlueprint.updateTime": + if e.complexity.IOTDeviceBlueprint.UpdateTime == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.UpdateTime(childComplexity), true + + case "IOTDeviceBlueprint.version": + if e.complexity.IOTDeviceBlueprint.Version == nil { + break + } + + return e.complexity.IOTDeviceBlueprint.Version(childComplexity), true + + case "IOTDeviceBlueprintEdge.cursor": + if e.complexity.IOTDeviceBlueprintEdge.Cursor == nil { + break + } + + return e.complexity.IOTDeviceBlueprintEdge.Cursor(childComplexity), true + + case "IOTDeviceBlueprintEdge.node": + if e.complexity.IOTDeviceBlueprintEdge.Node == nil { + break + } + + return e.complexity.IOTDeviceBlueprintEdge.Node(childComplexity), true + + case "IOTDeviceBlueprintPaginatedRecords.edges": + if e.complexity.IOTDeviceBlueprintPaginatedRecords.Edges == nil { + break + } + + return e.complexity.IOTDeviceBlueprintPaginatedRecords.Edges(childComplexity), true + + case "IOTDeviceBlueprintPaginatedRecords.pageInfo": + if e.complexity.IOTDeviceBlueprintPaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.IOTDeviceBlueprintPaginatedRecords.PageInfo(childComplexity), true + + case "IOTDeviceBlueprintPaginatedRecords.totalCount": + if e.complexity.IOTDeviceBlueprintPaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.IOTDeviceBlueprintPaginatedRecords.TotalCount(childComplexity), true + + case "IOTDeviceEdge.cursor": + if e.complexity.IOTDeviceEdge.Cursor == nil { + break + } + + return e.complexity.IOTDeviceEdge.Cursor(childComplexity), true + + case "IOTDeviceEdge.node": + if e.complexity.IOTDeviceEdge.Node == nil { + break + } + + return e.complexity.IOTDeviceEdge.Node(childComplexity), true + + case "IOTDevicePaginatedRecords.edges": + if e.complexity.IOTDevicePaginatedRecords.Edges == nil { + break + } + + return e.complexity.IOTDevicePaginatedRecords.Edges(childComplexity), true + + case "IOTDevicePaginatedRecords.pageInfo": + if e.complexity.IOTDevicePaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.IOTDevicePaginatedRecords.PageInfo(childComplexity), true + + case "IOTDevicePaginatedRecords.totalCount": + if e.complexity.IOTDevicePaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.IOTDevicePaginatedRecords.TotalCount(childComplexity), true + + case "IOTEnvironment.accountName": + if e.complexity.IOTEnvironment.AccountName == nil { + break + } + + return e.complexity.IOTEnvironment.AccountName(childComplexity), true + + case "IOTEnvironment.createdBy": + if e.complexity.IOTEnvironment.CreatedBy == nil { + break + } + + return e.complexity.IOTEnvironment.CreatedBy(childComplexity), true + + case "IOTEnvironment.creationTime": + if e.complexity.IOTEnvironment.CreationTime == nil { + break + } + + return e.complexity.IOTEnvironment.CreationTime(childComplexity), true + + case "IOTEnvironment.displayName": + if e.complexity.IOTEnvironment.DisplayName == nil { + break + } + + return e.complexity.IOTEnvironment.DisplayName(childComplexity), true + + case "IOTEnvironment.id": + if e.complexity.IOTEnvironment.Id == nil { + break + } + + return e.complexity.IOTEnvironment.Id(childComplexity), true + + case "IOTEnvironment.lastUpdatedBy": + if e.complexity.IOTEnvironment.LastUpdatedBy == nil { + break + } + + return e.complexity.IOTEnvironment.LastUpdatedBy(childComplexity), true + + case "IOTEnvironment.markedForDeletion": + if e.complexity.IOTEnvironment.MarkedForDeletion == nil { + break + } + + return e.complexity.IOTEnvironment.MarkedForDeletion(childComplexity), true + + case "IOTEnvironment.name": + if e.complexity.IOTEnvironment.Name == nil { + break + } + + return e.complexity.IOTEnvironment.Name(childComplexity), true + + case "IOTEnvironment.projectName": + if e.complexity.IOTEnvironment.ProjectName == nil { + break + } + + return e.complexity.IOTEnvironment.ProjectName(childComplexity), true + + case "IOTEnvironment.recordVersion": + if e.complexity.IOTEnvironment.RecordVersion == nil { + break + } + + return e.complexity.IOTEnvironment.RecordVersion(childComplexity), true + + case "IOTEnvironment.updateTime": + if e.complexity.IOTEnvironment.UpdateTime == nil { + break + } + + return e.complexity.IOTEnvironment.UpdateTime(childComplexity), true + + case "IOTEnvironmentEdge.cursor": + if e.complexity.IOTEnvironmentEdge.Cursor == nil { + break + } + + return e.complexity.IOTEnvironmentEdge.Cursor(childComplexity), true + + case "IOTEnvironmentEdge.node": + if e.complexity.IOTEnvironmentEdge.Node == nil { + break + } + + return e.complexity.IOTEnvironmentEdge.Node(childComplexity), true + + case "IOTEnvironmentPaginatedRecords.edges": + if e.complexity.IOTEnvironmentPaginatedRecords.Edges == nil { + break + } + + return e.complexity.IOTEnvironmentPaginatedRecords.Edges(childComplexity), true + + case "IOTEnvironmentPaginatedRecords.pageInfo": + if e.complexity.IOTEnvironmentPaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.IOTEnvironmentPaginatedRecords.PageInfo(childComplexity), true + + case "IOTEnvironmentPaginatedRecords.totalCount": + if e.complexity.IOTEnvironmentPaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.IOTEnvironmentPaginatedRecords.TotalCount(childComplexity), true + + case "IOTProject.accountName": + if e.complexity.IOTProject.AccountName == nil { + break + } + + return e.complexity.IOTProject.AccountName(childComplexity), true + + case "IOTProject.createdBy": + if e.complexity.IOTProject.CreatedBy == nil { + break + } + + return e.complexity.IOTProject.CreatedBy(childComplexity), true + + case "IOTProject.creationTime": + if e.complexity.IOTProject.CreationTime == nil { + break + } + + return e.complexity.IOTProject.CreationTime(childComplexity), true + + case "IOTProject.displayName": + if e.complexity.IOTProject.DisplayName == nil { + break + } + + return e.complexity.IOTProject.DisplayName(childComplexity), true + + case "IOTProject.id": + if e.complexity.IOTProject.Id == nil { + break + } + + return e.complexity.IOTProject.Id(childComplexity), true + + case "IOTProject.lastUpdatedBy": + if e.complexity.IOTProject.LastUpdatedBy == nil { + break + } + + return e.complexity.IOTProject.LastUpdatedBy(childComplexity), true + + case "IOTProject.markedForDeletion": + if e.complexity.IOTProject.MarkedForDeletion == nil { + break + } + + return e.complexity.IOTProject.MarkedForDeletion(childComplexity), true + + case "IOTProject.name": + if e.complexity.IOTProject.Name == nil { + break + } + + return e.complexity.IOTProject.Name(childComplexity), true + + case "IOTProject.recordVersion": + if e.complexity.IOTProject.RecordVersion == nil { + break + } + + return e.complexity.IOTProject.RecordVersion(childComplexity), true + + case "IOTProject.updateTime": + if e.complexity.IOTProject.UpdateTime == nil { + break + } + + return e.complexity.IOTProject.UpdateTime(childComplexity), true + + case "IOTProjectEdge.cursor": + if e.complexity.IOTProjectEdge.Cursor == nil { + break + } + + return e.complexity.IOTProjectEdge.Cursor(childComplexity), true + + case "IOTProjectEdge.node": + if e.complexity.IOTProjectEdge.Node == nil { + break + } + + return e.complexity.IOTProjectEdge.Node(childComplexity), true + + case "IOTProjectPaginatedRecords.edges": + if e.complexity.IOTProjectPaginatedRecords.Edges == nil { + break + } + + return e.complexity.IOTProjectPaginatedRecords.Edges(childComplexity), true + + case "IOTProjectPaginatedRecords.pageInfo": + if e.complexity.IOTProjectPaginatedRecords.PageInfo == nil { + break + } + + return e.complexity.IOTProjectPaginatedRecords.PageInfo(childComplexity), true + + case "IOTProjectPaginatedRecords.totalCount": + if e.complexity.IOTProjectPaginatedRecords.TotalCount == nil { + break + } + + return e.complexity.IOTProjectPaginatedRecords.TotalCount(childComplexity), true + + case "K8s__io___api___core___v1__Toleration.effect": + if e.complexity.K8s__io___api___core___v1__Toleration.Effect == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__Toleration.Effect(childComplexity), true + + case "K8s__io___api___core___v1__Toleration.key": + if e.complexity.K8s__io___api___core___v1__Toleration.Key == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__Toleration.Key(childComplexity), true + + case "K8s__io___api___core___v1__Toleration.operator": + if e.complexity.K8s__io___api___core___v1__Toleration.Operator == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__Toleration.Operator(childComplexity), true + + case "K8s__io___api___core___v1__Toleration.tolerationSeconds": + if e.complexity.K8s__io___api___core___v1__Toleration.TolerationSeconds == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__Toleration.TolerationSeconds(childComplexity), true + + case "K8s__io___api___core___v1__Toleration.value": + if e.complexity.K8s__io___api___core___v1__Toleration.Value == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__Toleration.Value(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.labelSelector": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.LabelSelector == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.LabelSelector(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.matchLabelKeys": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.MatchLabelKeys == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.MatchLabelKeys(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.maxSkew": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.MaxSkew == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.MaxSkew(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.minDomains": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.MinDomains == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.MinDomains(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.nodeAffinityPolicy": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.NodeAffinityPolicy == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.NodeAffinityPolicy(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.nodeTaintsPolicy": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.NodeTaintsPolicy == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.NodeTaintsPolicy(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.topologyKey": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.TopologyKey == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.TopologyKey(childComplexity), true + + case "K8s__io___api___core___v1__TopologySpreadConstraint.whenUnsatisfiable": + if e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.WhenUnsatisfiable == nil { + break + } + + return e.complexity.K8s__io___api___core___v1__TopologySpreadConstraint.WhenUnsatisfiable(childComplexity), true + + case "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector.matchExpressions": + if e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector.MatchExpressions == nil { + break + } + + return e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector.MatchExpressions(childComplexity), true + + case "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector.matchLabels": + if e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector.MatchLabels == nil { + break + } + + return e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector.MatchLabels(childComplexity), true + + case "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.key": + if e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.Key == nil { + break + } + + return e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.Key(childComplexity), true + + case "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.operator": + if e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.Operator == nil { + break + } + + return e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.Operator(childComplexity), true + + case "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.values": + if e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.Values == nil { + break + } + + return e.complexity.K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement.Values(childComplexity), true + + case "MatchFilter.array": + if e.complexity.MatchFilter.Array == nil { + break + } + + return e.complexity.MatchFilter.Array(childComplexity), true + + case "MatchFilter.exact": + if e.complexity.MatchFilter.Exact == nil { + break + } + + return e.complexity.MatchFilter.Exact(childComplexity), true + + case "MatchFilter.matchType": + if e.complexity.MatchFilter.MatchType == nil { + break + } + + return e.complexity.MatchFilter.MatchType(childComplexity), true + + case "MatchFilter.regex": + if e.complexity.MatchFilter.Regex == nil { + break + } + + return e.complexity.MatchFilter.Regex(childComplexity), true + + case "Metadata.annotations": + if e.complexity.Metadata.Annotations == nil { + break + } + + return e.complexity.Metadata.Annotations(childComplexity), true + + case "Metadata.creationTimestamp": + if e.complexity.Metadata.CreationTimestamp == nil { + break + } + + return e.complexity.Metadata.CreationTimestamp(childComplexity), true + + case "Metadata.deletionTimestamp": + if e.complexity.Metadata.DeletionTimestamp == nil { + break + } + + return e.complexity.Metadata.DeletionTimestamp(childComplexity), true + + case "Metadata.generation": + if e.complexity.Metadata.Generation == nil { + break + } + + return e.complexity.Metadata.Generation(childComplexity), true + + case "Metadata.labels": + if e.complexity.Metadata.Labels == nil { + break + } + + return e.complexity.Metadata.Labels(childComplexity), true + + case "Metadata.name": + if e.complexity.Metadata.Name == nil { + break + } + + return e.complexity.Metadata.Name(childComplexity), true + + case "Metadata.namespace": + if e.complexity.Metadata.Namespace == nil { + break + } + + return e.complexity.Metadata.Namespace(childComplexity), true + + case "Mutation.iot_createApp": + if e.complexity.Mutation.IotCreateApp == nil { + break + } + + args, err := ec.field_Mutation_iot_createApp_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotCreateApp(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprintName"].(string), args["app"].(entities.IOTApp)), true + + case "Mutation.iot_createDeployment": + if e.complexity.Mutation.IotCreateDeployment == nil { + break + } + + args, err := ec.field_Mutation_iot_createDeployment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotCreateDeployment(childComplexity, args["projectName"].(string), args["envName"].(string), args["deployment"].(entities.IOTDeployment)), true + + case "Mutation.iot_createDevice": + if e.complexity.Mutation.IotCreateDevice == nil { + break + } + + args, err := ec.field_Mutation_iot_createDevice_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotCreateDevice(childComplexity, args["projectName"].(string), args["envName"].(string), args["device"].(entities.IOTDevice)), true + + case "Mutation.iot_createDeviceBlueprint": + if e.complexity.Mutation.IotCreateDeviceBlueprint == nil { + break + } + + args, err := ec.field_Mutation_iot_createDeviceBlueprint_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotCreateDeviceBlueprint(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprint"].(entities.IOTDeviceBlueprint)), true + + case "Mutation.iot_createEnvironment": + if e.complexity.Mutation.IotCreateEnvironment == nil { + break + } + + args, err := ec.field_Mutation_iot_createEnvironment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotCreateEnvironment(childComplexity, args["projectName"].(string), args["env"].(entities.IOTEnvironment)), true + + case "Mutation.iot_createProject": + if e.complexity.Mutation.IotCreateProject == nil { + break + } + + args, err := ec.field_Mutation_iot_createProject_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotCreateProject(childComplexity, args["project"].(entities.IOTProject)), true + + case "Mutation.iot_deleteApp": + if e.complexity.Mutation.IotDeleteApp == nil { + break + } + + args, err := ec.field_Mutation_iot_deleteApp_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotDeleteApp(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprintName"].(string), args["name"].(string)), true + + case "Mutation.iot_deleteDeployment": + if e.complexity.Mutation.IotDeleteDeployment == nil { + break + } + + args, err := ec.field_Mutation_iot_deleteDeployment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotDeleteDeployment(childComplexity, args["projectName"].(string), args["envName"].(string), args["name"].(string)), true + + case "Mutation.iot_deleteDevice": + if e.complexity.Mutation.IotDeleteDevice == nil { + break + } + + args, err := ec.field_Mutation_iot_deleteDevice_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotDeleteDevice(childComplexity, args["projectName"].(string), args["envName"].(string), args["name"].(string)), true + + case "Mutation.iot_deleteDeviceBlueprint": + if e.complexity.Mutation.IotDeleteDeviceBlueprint == nil { + break + } + + args, err := ec.field_Mutation_iot_deleteDeviceBlueprint_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotDeleteDeviceBlueprint(childComplexity, args["projectName"].(string), args["envName"].(string), args["name"].(string)), true + + case "Mutation.iot_deleteEnvironment": + if e.complexity.Mutation.IotDeleteEnvironment == nil { + break + } + + args, err := ec.field_Mutation_iot_deleteEnvironment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotDeleteEnvironment(childComplexity, args["projectName"].(string), args["name"].(string)), true + + case "Mutation.iot_deleteProject": + if e.complexity.Mutation.IotDeleteProject == nil { + break + } + + args, err := ec.field_Mutation_iot_deleteProject_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotDeleteProject(childComplexity, args["name"].(string)), true + + case "Mutation.iot_updateApp": + if e.complexity.Mutation.IotUpdateApp == nil { + break + } + + args, err := ec.field_Mutation_iot_updateApp_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotUpdateApp(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprintName"].(string), args["app"].(entities.IOTApp)), true + + case "Mutation.iot_updateDeployment": + if e.complexity.Mutation.IotUpdateDeployment == nil { + break + } + + args, err := ec.field_Mutation_iot_updateDeployment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotUpdateDeployment(childComplexity, args["projectName"].(string), args["envName"].(string), args["deployment"].(entities.IOTDeployment)), true + + case "Mutation.iot_updateDevice": + if e.complexity.Mutation.IotUpdateDevice == nil { + break + } + + args, err := ec.field_Mutation_iot_updateDevice_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotUpdateDevice(childComplexity, args["projectName"].(string), args["envName"].(string), args["device"].(entities.IOTDevice)), true + + case "Mutation.iot_updateDeviceBlueprint": + if e.complexity.Mutation.IotUpdateDeviceBlueprint == nil { + break + } + + args, err := ec.field_Mutation_iot_updateDeviceBlueprint_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotUpdateDeviceBlueprint(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprint"].(entities.IOTDeviceBlueprint)), true + + case "Mutation.iot_updateEnvironment": + if e.complexity.Mutation.IotUpdateEnvironment == nil { + break + } + + args, err := ec.field_Mutation_iot_updateEnvironment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotUpdateEnvironment(childComplexity, args["projectName"].(string), args["env"].(entities.IOTEnvironment)), true + + case "Mutation.iot_updateProject": + if e.complexity.Mutation.IotUpdateProject == nil { + break + } + + args, err := ec.field_Mutation_iot_updateProject_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Mutation.IotUpdateProject(childComplexity, args["project"].(entities.IOTProject)), true + + case "PageInfo.endCursor": + if e.complexity.PageInfo.EndCursor == nil { + break + } + + return e.complexity.PageInfo.EndCursor(childComplexity), true + + case "PageInfo.hasNextPage": + if e.complexity.PageInfo.HasNextPage == nil { + break + } + + return e.complexity.PageInfo.HasNextPage(childComplexity), true + + case "PageInfo.hasPreviousPage": + if e.complexity.PageInfo.HasPreviousPage == nil { + break + } + + return e.complexity.PageInfo.HasPreviousPage(childComplexity), true + + case "PageInfo.startCursor": + if e.complexity.PageInfo.StartCursor == nil { + break + } + + return e.complexity.PageInfo.StartCursor(childComplexity), true + + case "Query.iot_getApp": + if e.complexity.Query.IotGetApp == nil { + break + } + + args, err := ec.field_Query_iot_getApp_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotGetApp(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprintName"].(string), args["name"].(string)), true + + case "Query.iot_getDeployment": + if e.complexity.Query.IotGetDeployment == nil { + break + } + + args, err := ec.field_Query_iot_getDeployment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotGetDeployment(childComplexity, args["projectName"].(string), args["envName"].(string), args["name"].(string)), true + + case "Query.iot_getDevice": + if e.complexity.Query.IotGetDevice == nil { + break + } + + args, err := ec.field_Query_iot_getDevice_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotGetDevice(childComplexity, args["projectName"].(string), args["envName"].(string), args["name"].(string)), true + + case "Query.iot_getDeviceBlueprint": + if e.complexity.Query.IotGetDeviceBlueprint == nil { + break + } + + args, err := ec.field_Query_iot_getDeviceBlueprint_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotGetDeviceBlueprint(childComplexity, args["projectName"].(string), args["envName"].(string), args["name"].(string)), true + + case "Query.iot_getEnvironment": + if e.complexity.Query.IotGetEnvironment == nil { + break + } + + args, err := ec.field_Query_iot_getEnvironment_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotGetEnvironment(childComplexity, args["projectName"].(string), args["name"].(string)), true + + case "Query.iot_getProject": + if e.complexity.Query.IotGetProject == nil { + break + } + + args, err := ec.field_Query_iot_getProject_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotGetProject(childComplexity, args["name"].(string)), true + + case "Query.iot_listApps": + if e.complexity.Query.IotListApps == nil { + break + } + + args, err := ec.field_Query_iot_listApps_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotListApps(childComplexity, args["projectName"].(string), args["envName"].(string), args["deviceBlueprintName"].(string), args["search"].(*model.SearchIOTApps), args["pq"].(*repos.CursorPagination)), true + + case "Query.iot_listDeployments": + if e.complexity.Query.IotListDeployments == nil { + break + } + + args, err := ec.field_Query_iot_listDeployments_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotListDeployments(childComplexity, args["projectName"].(string), args["envName"].(string), args["search"].(*model.SearchIOTDeployments), args["pq"].(*repos.CursorPagination)), true + + case "Query.iot_listDeviceBlueprints": + if e.complexity.Query.IotListDeviceBlueprints == nil { + break + } + + args, err := ec.field_Query_iot_listDeviceBlueprints_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotListDeviceBlueprints(childComplexity, args["projectName"].(string), args["envName"].(string), args["search"].(*model.SearchIOTDeviceBlueprints), args["pq"].(*repos.CursorPagination)), true + + case "Query.iot_listDevices": + if e.complexity.Query.IotListDevices == nil { + break + } + + args, err := ec.field_Query_iot_listDevices_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotListDevices(childComplexity, args["projectName"].(string), args["envName"].(string), args["search"].(*model.SearchIOTDevices), args["pq"].(*repos.CursorPagination)), true + + case "Query.iot_listEnvironments": + if e.complexity.Query.IotListEnvironments == nil { + break + } + + args, err := ec.field_Query_iot_listEnvironments_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotListEnvironments(childComplexity, args["projectName"].(string), args["search"].(*model.SearchIOTEnvironments), args["pq"].(*repos.CursorPagination)), true + + case "Query.iot_listProjects": + if e.complexity.Query.IotListProjects == nil { + break + } + + args, err := ec.field_Query_iot_listProjects_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.IotListProjects(childComplexity, args["search"].(*model.SearchIOTProjects), args["pq"].(*repos.CursorPagination)), true + + case "Query._service": + if e.complexity.Query.__resolve__service == nil { + break + } + + return e.complexity.Query.__resolve__service(childComplexity), true + + case "_Service.sdl": + if e.complexity._Service.SDL == nil { + break + } + + return e.complexity._Service.SDL(childComplexity), true + + } + return 0, false +} + +func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { + rc := graphql.GetOperationContext(ctx) + ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} + inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputCursorPaginationIn, + ec.unmarshalInputGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HPAIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn, + ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn, + ec.unmarshalInputIOTAppIn, + ec.unmarshalInputIOTDeploymentIn, + ec.unmarshalInputIOTDeviceBlueprintIn, + ec.unmarshalInputIOTDeviceIn, + ec.unmarshalInputIOTEnvironmentIn, + ec.unmarshalInputIOTProjectIn, + ec.unmarshalInputK8s__io___api___core___v1__TolerationIn, + ec.unmarshalInputK8s__io___api___core___v1__TopologySpreadConstraintIn, + ec.unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn, + ec.unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn, + ec.unmarshalInputMatchFilterIn, + ec.unmarshalInputMetadataIn, + ec.unmarshalInputSearchIOTApps, + ec.unmarshalInputSearchIOTDeployments, + ec.unmarshalInputSearchIOTDeviceBlueprints, + ec.unmarshalInputSearchIOTDevices, + ec.unmarshalInputSearchIOTEnvironments, + ec.unmarshalInputSearchIOTProjects, + ) + first := true + + switch rc.Operation.Operation { + case ast.Query: + return func(ctx context.Context) *graphql.Response { + var response graphql.Response + var data graphql.Marshaler + if first { + first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + data = ec._Query(ctx, rc.Operation.SelectionSet) + } else { + if atomic.LoadInt32(&ec.pendingDeferred) > 0 { + result := <-ec.deferredResults + atomic.AddInt32(&ec.pendingDeferred, -1) + data = result.Result + response.Path = result.Path + response.Label = result.Label + response.Errors = result.Errors + } else { + return nil + } + } + var buf bytes.Buffer + data.MarshalGQL(&buf) + response.Data = buf.Bytes() + if atomic.LoadInt32(&ec.deferred) > 0 { + hasNext := atomic.LoadInt32(&ec.pendingDeferred) > 0 + response.HasNext = &hasNext + } + + return &response + } + case ast.Mutation: + return func(ctx context.Context) *graphql.Response { + if !first { + return nil + } + first = false + ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap) + data := ec._Mutation(ctx, rc.Operation.SelectionSet) + var buf bytes.Buffer + data.MarshalGQL(&buf) + + return &graphql.Response{ + Data: buf.Bytes(), + } + } + + default: + return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation")) + } +} + +type executionContext struct { + *graphql.OperationContext + *executableSchema + deferred int32 + pendingDeferred int32 + deferredResults chan graphql.DeferredResult +} + +func (ec *executionContext) processDeferredGroup(dg graphql.DeferredGroup) { + atomic.AddInt32(&ec.pendingDeferred, 1) + go func() { + ctx := graphql.WithFreshResponseContext(dg.Context) + dg.FieldSet.Dispatch(ctx) + ds := graphql.DeferredResult{ + Path: dg.Path, + Label: dg.Label, + Result: dg.FieldSet, + Errors: graphql.GetErrors(ctx), + } + // null fields should bubble up + if dg.FieldSet.Invalids > 0 { + ds.Result = graphql.Null + } + ec.deferredResults <- ds + }() +} + +func (ec *executionContext) introspectSchema() (*introspection.Schema, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapSchema(ec.Schema()), nil +} + +func (ec *executionContext) introspectType(name string) (*introspection.Type, error) { + if ec.DisableIntrospection { + return nil, errors.New("introspection disabled") + } + return introspection.WrapTypeFromDef(ec.Schema(), ec.Schema().Types[name]), nil +} + +var sources = []*ast.Source{ + {Name: "../schema.graphqls", Input: `directive @isLoggedIn on FIELD_DEFINITION +directive @isLoggedInAndVerified on FIELD_DEFINITION +directive @hasAccount on FIELD_DEFINITION + +input SearchIOTProjects { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTEnvironments { + text: MatchFilterIn + projectName: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDeployments { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDevices { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDeviceBlueprints { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTApps { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +type Query { + iot_listProjects(search: SearchIOTProjects, pq: CursorPaginationIn): IOTProjectPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getProject(name: String!): IOTProject @isLoggedInAndVerified @hasAccount + + iot_listEnvironments(projectName: String!,search: SearchIOTEnvironments, pq: CursorPaginationIn): IOTEnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getEnvironment(projectName: String!, name: String!): IOTEnvironment @isLoggedInAndVerified @hasAccount + + iot_listDevices(projectName: String!, envName: String!,search: SearchIOTDevices, pq: CursorPaginationIn): IOTDevicePaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getDevice(projectName: String!, envName: String!, name: String!): IOTDevice @isLoggedInAndVerified @hasAccount + + iot_listDeviceBlueprints(projectName: String!, envName: String!,search: SearchIOTDeviceBlueprints, pq: CursorPaginationIn): IOTDeviceBlueprintPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getDeviceBlueprint(projectName: String!, envName: String!, name: String!): IOTDeviceBlueprint @isLoggedInAndVerified @hasAccount + + iot_listDeployments(projectName: String!, envName: String!,search: SearchIOTDeployments, pq: CursorPaginationIn): IOTDeploymentPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getDeployment(projectName: String!, envName: String!, name: String!): IOTDeployment @isLoggedInAndVerified @hasAccount + + iot_listApps(projectName: String!, envName: String!, deviceBlueprintName: String!,search: SearchIOTApps, pq: CursorPaginationIn): IOTAppPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getApp(projectName: String!, envName: String!, deviceBlueprintName: String!, name: String!): IOTApp @isLoggedInAndVerified @hasAccount +} + +type Mutation { + iot_createProject(project: IOTProjectIn!): IOTProject @isLoggedInAndVerified @hasAccount + iot_updateProject(project: IOTProjectIn!): IOTProject @isLoggedInAndVerified @hasAccount + iot_deleteProject(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createEnvironment(projectName: String!,env: IOTEnvironmentIn!): IOTEnvironment @isLoggedInAndVerified @hasAccount + iot_updateEnvironment(projectName: String!,env: IOTEnvironmentIn!): IOTEnvironment @isLoggedInAndVerified @hasAccount + iot_deleteEnvironment(projectName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createDevice(projectName: String!, envName: String!, device: IOTDeviceIn!): IOTDevice @isLoggedInAndVerified @hasAccount + iot_updateDevice(projectName: String!, envName: String!, device: IOTDeviceIn!): IOTDevice @isLoggedInAndVerified @hasAccount + iot_deleteDevice(projectName: String!, envName: String!,name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createDeviceBlueprint(projectName: String!, envName: String!, deviceBlueprint: IOTDeviceBlueprintIn!): IOTDeviceBlueprint @isLoggedInAndVerified @hasAccount + iot_updateDeviceBlueprint(projectName: String!, envName: String!, deviceBlueprint: IOTDeviceBlueprintIn!): IOTDeviceBlueprint @isLoggedInAndVerified @hasAccount + iot_deleteDeviceBlueprint(projectName: String!, envName: String!,name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createDeployment(projectName: String!, envName: String!, deployment: IOTDeploymentIn!): IOTDeployment @isLoggedInAndVerified @hasAccount + iot_updateDeployment(projectName: String!, envName: String!, deployment: IOTDeploymentIn!): IOTDeployment @isLoggedInAndVerified @hasAccount + iot_deleteDeployment(projectName: String!, envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createApp(projectName: String!, envName: String!, deviceBlueprintName: String!, app: IOTAppIn!): IOTApp @isLoggedInAndVerified @hasAccount + iot_updateApp(projectName: String!, envName: String!, deviceBlueprintName: String!, app: IOTAppIn!): IOTApp @isLoggedInAndVerified @hasAccount + iot_deleteApp(projectName: String!, envName: String!, deviceBlueprintName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount +} +`, BuiltIn: false}, + {Name: "../struct-to-graphql/common-types.graphqls", Input: `type Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService @shareable { + ip: String! + name: String! +} + +type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @shareable { + userEmail: String! + userId: String! + userName: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__AppContainer @shareable { + args: [String!] + command: [String!] + env: [Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv!] + envFrom: [Github__com___kloudlite___operator___apis___crds___v1__EnvFrom!] + image: String! + imagePullPolicy: String + livenessProbe: Github__com___kloudlite___operator___apis___crds___v1__Probe + name: String! + readinessProbe: Github__com___kloudlite___operator___apis___crds___v1__Probe + resourceCpu: Github__com___kloudlite___operator___apis___crds___v1__ContainerResource + resourceMemory: Github__com___kloudlite___operator___apis___crds___v1__ContainerResource + volumes: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume!] +} + +type Github__com___kloudlite___operator___apis___crds___v1__AppSpec @shareable { + containers: [Github__com___kloudlite___operator___apis___crds___v1__AppContainer!]! + displayName: String + freeze: Boolean + hpa: Github__com___kloudlite___operator___apis___crds___v1__HPA + intercept: Github__com___kloudlite___operator___apis___crds___v1__Intercept + nodeSelector: Map + region: String + replicas: Int + serviceAccount: String + services: [Github__com___kloudlite___operator___apis___crds___v1__AppSvc!] + tolerations: [K8s__io___api___core___v1__Toleration!] + topologySpreadConstraints: [K8s__io___api___core___v1__TopologySpreadConstraint!] +} + +type Github__com___kloudlite___operator___apis___crds___v1__AppSvc @shareable { + name: String + port: Int! + targetPort: Int + type: String +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv @shareable { + key: String! + optional: Boolean + refKey: String + refName: String + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret + value: String +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerResource @shareable { + max: String + min: String +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume @shareable { + items: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem!] + mountPath: String! + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem @shareable { + fileName: String + key: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__EnvFrom @shareable { + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +type Github__com___kloudlite___operator___apis___crds___v1__HPA @shareable { + enabled: Boolean! + maxReplicas: Int + minReplicas: Int + thresholdCpu: Int + thresholdMemory: Int +} + +type Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe @shareable { + httpHeaders: Map + path: String! + port: Int! +} + +type Github__com___kloudlite___operator___apis___crds___v1__Intercept @shareable { + enabled: Boolean! + toDevice: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__Probe @shareable { + failureThreshold: Int + httpGet: Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe + initialDelay: Int + interval: Int + shell: Github__com___kloudlite___operator___apis___crds___v1__ShellProbe + tcp: Github__com___kloudlite___operator___apis___crds___v1__TcpProbe + type: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__ShellProbe @shareable { + command: [String!] +} + +type Github__com___kloudlite___operator___apis___crds___v1__TcpProbe @shareable { + port: Int! +} + +type Github__com___kloudlite___operator___pkg___operator__Check @shareable { + debug: String + error: String + generation: Int + info: String + message: String + startedAt: Date + state: Github__com___kloudlite___operator___pkg___operator__State + status: Boolean! +} + +type Github__com___kloudlite___operator___pkg___operator__CheckMeta @shareable { + debug: Boolean + description: String + name: String! + title: String! +} + +type Github__com___kloudlite___operator___pkg___operator__ResourceRef @shareable { + apiVersion: String! + kind: String! + name: String! + namespace: String! +} + +type Github__com___kloudlite___operator___pkg___operator__Status @shareable { + checkList: [Github__com___kloudlite___operator___pkg___operator__CheckMeta!] + checks: Map + isReady: Boolean! + lastReadyGeneration: Int + lastReconcileTime: Date + message: Github__com___kloudlite___operator___pkg___raw____json__RawJson + resources: [Github__com___kloudlite___operator___pkg___operator__ResourceRef!] +} + +type Github__com___kloudlite___operator___pkg___raw____json__RawJson @shareable { + RawMessage: Any +} + +type K8s__io___api___core___v1__Toleration @shareable { + effect: K8s__io___api___core___v1__TaintEffect + key: String + operator: K8s__io___api___core___v1__TolerationOperator + tolerationSeconds: Int + value: String +} + +type K8s__io___api___core___v1__TopologySpreadConstraint @shareable { + labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector + matchLabelKeys: [String!] + maxSkew: Int! + minDomains: Int + nodeAffinityPolicy: String + nodeTaintsPolicy: String + topologyKey: String! + whenUnsatisfiable: K8s__io___api___core___v1__UnsatisfiableConstraintAction! +} + +type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector @shareable { + matchExpressions: [K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement!] + matchLabels: Map +} + +type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement @shareable { + key: String! + operator: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator! + values: [String!] +} + +type Metadata @shareable { + annotations: Map + creationTimestamp: Date! + deletionTimestamp: Date + generation: Int! + labels: Map + name: String! + namespace: String +} + +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean + hasPreviousPage: Boolean + startCursor: String +} + +input Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn { + ip: String! + name: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn { + args: [String!] + command: [String!] + env: [Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn!] + envFrom: [Github__com___kloudlite___operator___apis___crds___v1__EnvFromIn!] + image: String! + imagePullPolicy: String + livenessProbe: Github__com___kloudlite___operator___apis___crds___v1__ProbeIn + name: String! + readinessProbe: Github__com___kloudlite___operator___apis___crds___v1__ProbeIn + resourceCpu: Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn + resourceMemory: Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn + volumes: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn!] +} + +input Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn { + containers: [Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn!]! + displayName: String + freeze: Boolean + hpa: Github__com___kloudlite___operator___apis___crds___v1__HPAIn + intercept: Github__com___kloudlite___operator___apis___crds___v1__InterceptIn + nodeSelector: Map + region: String + replicas: Int + serviceAccount: String + services: [Github__com___kloudlite___operator___apis___crds___v1__AppSvcIn!] + tolerations: [K8s__io___api___core___v1__TolerationIn!] + topologySpreadConstraints: [K8s__io___api___core___v1__TopologySpreadConstraintIn!] +} + +input Github__com___kloudlite___operator___apis___crds___v1__AppSvcIn { + name: String + port: Int! + targetPort: Int + type: String +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn { + key: String! + optional: Boolean + refKey: String + refName: String + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret + value: String +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn { + max: String + min: String +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn { + items: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn!] + mountPath: String! + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn { + fileName: String + key: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__EnvFromIn { + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +input Github__com___kloudlite___operator___apis___crds___v1__HPAIn { + enabled: Boolean! + maxReplicas: Int + minReplicas: Int + thresholdCpu: Int + thresholdMemory: Int +} + +input Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn { + httpHeaders: Map + path: String! + port: Int! +} + +input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn { + enabled: Boolean! + toDevice: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__ProbeIn { + failureThreshold: Int + httpGet: Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn + initialDelay: Int + interval: Int + shell: Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn + tcp: Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn + type: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn { + command: [String!] +} + +input Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn { + port: Int! +} + +input K8s__io___api___core___v1__TolerationIn { + effect: K8s__io___api___core___v1__TaintEffect + key: String + operator: K8s__io___api___core___v1__TolerationOperator + tolerationSeconds: Int + value: String +} + +input K8s__io___api___core___v1__TopologySpreadConstraintIn { + labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn + matchLabelKeys: [String!] + maxSkew: Int! + minDomains: Int + nodeAffinityPolicy: String + nodeTaintsPolicy: String + topologyKey: String! + whenUnsatisfiable: K8s__io___api___core___v1__UnsatisfiableConstraintAction! +} + +input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn { + matchExpressions: [K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn!] + matchLabels: Map +} + +input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn { + key: String! + operator: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator! + values: [String!] +} + +input MetadataIn { + annotations: Map + labels: Map + name: String! + namespace: String +} + +enum Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType { + group_blueprint + singleton_blueprint +} + +enum Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret { + config + pvc + secret +} + +enum Github__com___kloudlite___operator___pkg___operator__State { + errored____during____reconcilation + finished____reconcilation + under____reconcilation + yet____to____be____reconciled +} + +enum K8s__io___api___core___v1__TaintEffect { + NoExecute + NoSchedule + PreferNoSchedule +} + +enum K8s__io___api___core___v1__TolerationOperator { + Equal + Exists +} + +enum K8s__io___api___core___v1__UnsatisfiableConstraintAction { + DoNotSchedule + ScheduleAnyway +} + +enum K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator { + DoesNotExist + Exists + In + NotIn +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/cursorpagination.graphqls", Input: `type CursorPagination @shareable { + after: String + before: String + first: Int + last: Int + orderBy: String + sortDirection: CursorPaginationSortDirection +} + +input CursorPaginationIn { + after: String + before: String + first: Int + last: Int + orderBy: String = "_id" + sortDirection: CursorPaginationSortDirection = "ASC" +} + +enum CursorPaginationSortDirection { + ASC + DESC +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/directives.graphqls", Input: `extend schema @link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@key", "@shareable", "@external"]) + +directive @goField( + forceResolver: Boolean + name: String +) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION +`, BuiltIn: false}, + {Name: "../struct-to-graphql/iotapp.graphqls", Input: `type IOTApp @shareable { + accountName: String! + apiVersion: String + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + deviceBlueprintName: String! + displayName: String! + enabled: Boolean + environmentName: String! + id: ID! + kind: String + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + metadata: Metadata @goField(name: "objectMeta") + projectName: String! + recordVersion: Int! + spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpec! + status: Github__com___kloudlite___operator___pkg___operator__Status + updateTime: Date! +} + +type IOTAppEdge @shareable { + cursor: String! + node: IOTApp! +} + +type IOTAppPaginatedRecords @shareable { + edges: [IOTAppEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTAppIn { + apiVersion: String + displayName: String! + enabled: Boolean + kind: String + metadata: MetadataIn + spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/iotdeployment.graphqls", Input: `type IOTDeployment @shareable { + accountName: String! + CIDR: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + environmentName: String! + exposedServices: [Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService!]! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTDeploymentEdge @shareable { + cursor: String! + node: IOTDeployment! +} + +type IOTDeploymentPaginatedRecords @shareable { + edges: [IOTDeploymentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTDeploymentIn { + CIDR: String! + displayName: String! + exposedServices: [Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn!]! + name: String! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/iotdevice.graphqls", Input: `type IOTDevice @shareable { + accountName: String! + blueprint: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + deployment: String! + displayName: String! + environmentName: String! + id: ID! + ip: String! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + podCIDR: String! + projectName: String! + publicKey: String! + recordVersion: Int! + serviceCIDR: String! + updateTime: Date! + version: String! +} + +type IOTDeviceEdge @shareable { + cursor: String! + node: IOTDevice! +} + +type IOTDevicePaginatedRecords @shareable { + edges: [IOTDeviceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTDeviceIn { + blueprint: String! + deployment: String! + displayName: String! + ip: String! + name: String! + podCIDR: String! + publicKey: String! + serviceCIDR: String! + version: String! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/iotdeviceblueprint.graphqls", Input: `type IOTDeviceBlueprint @shareable { + accountName: String! + bluePrintType: Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + environmentName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! + version: String! +} + +type IOTDeviceBlueprintEdge @shareable { + cursor: String! + node: IOTDeviceBlueprint! +} + +type IOTDeviceBlueprintPaginatedRecords @shareable { + edges: [IOTDeviceBlueprintEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTDeviceBlueprintIn { + bluePrintType: Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType! + displayName: String! + name: String! + version: String! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/iotenvironment.graphqls", Input: `type IOTEnvironment @shareable { + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTEnvironmentEdge @shareable { + cursor: String! + node: IOTEnvironment! +} + +type IOTEnvironmentPaginatedRecords @shareable { + edges: [IOTEnvironmentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTEnvironmentIn { + displayName: String! + name: String! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/iotproject.graphqls", Input: `type IOTProject @shareable { + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTProjectEdge @shareable { + cursor: String! + node: IOTProject! +} + +type IOTProjectPaginatedRecords @shareable { + edges: [IOTProjectEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTProjectIn { + displayName: String! + name: String! +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/matchfilter.graphqls", Input: `type MatchFilter @shareable { + array: [Any!] + exact: Any + matchType: MatchFilterMatchType! + regex: String +} + +input MatchFilterIn { + array: [Any!] + exact: Any + matchType: MatchFilterMatchType! + regex: String +} + +enum MatchFilterMatchType { + array + exact + regex +} + +`, BuiltIn: false}, + {Name: "../struct-to-graphql/scalars.graphqls", Input: `scalar Any +scalar Json +scalar Map +scalar Date +`, BuiltIn: false}, + {Name: "../../federation/directives.graphql", Input: ` + directive @authenticated on FIELD_DEFINITION | OBJECT | INTERFACE | SCALAR | ENUM + directive @composeDirective(name: String!) repeatable on SCHEMA + directive @extends on OBJECT | INTERFACE + directive @external on OBJECT | FIELD_DEFINITION + directive @key(fields: FieldSet!, resolvable: Boolean = true) repeatable on OBJECT | INTERFACE + directive @inaccessible on + | ARGUMENT_DEFINITION + | ENUM + | ENUM_VALUE + | FIELD_DEFINITION + | INPUT_FIELD_DEFINITION + | INPUT_OBJECT + | INTERFACE + | OBJECT + | SCALAR + | UNION + directive @interfaceObject on OBJECT + directive @link(import: [String!], url: String!) repeatable on SCHEMA + directive @override(from: String!) on FIELD_DEFINITION + directive @provides(fields: FieldSet!) on FIELD_DEFINITION + directive @requires(fields: FieldSet!) on FIELD_DEFINITION + directive @requiresScopes(scopes: [[federation__Scope!]!]!) on + | FIELD_DEFINITION + | OBJECT + | INTERFACE + | SCALAR + | ENUM + directive @shareable repeatable on FIELD_DEFINITION | OBJECT + directive @tag(name: String!) repeatable on + | ARGUMENT_DEFINITION + | ENUM + | ENUM_VALUE + | FIELD_DEFINITION + | INPUT_FIELD_DEFINITION + | INPUT_OBJECT + | INTERFACE + | OBJECT + | SCALAR + | UNION + scalar _Any + scalar FieldSet + scalar federation__Scope +`, BuiltIn: true}, + {Name: "../../federation/entity.graphql", Input: ` +type _Service { + sdl: String +} + +extend type Query { + _service: _Service! +} +`, BuiltIn: true}, +} +var parsedSchema = gqlparser.MustLoadSchema(sources...) + +// endregion ************************** generated!.gotpl ************************** + +// region ***************************** args.gotpl ***************************** + +func (ec *executionContext) field_Mutation_iot_createApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["deviceBlueprintName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprintName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprintName"] = arg2 + var arg3 entities.IOTApp + if tmp, ok := rawArgs["app"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) + arg3, err = ec.unmarshalNIOTAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx, tmp) + if err != nil { + return nil, err + } + } + args["app"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_createDeployment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 entities.IOTDeployment + if tmp, ok := rawArgs["deployment"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deployment")) + arg2, err = ec.unmarshalNIOTDeploymentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deployment"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_createDeviceBlueprint_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 entities.IOTDeviceBlueprint + if tmp, ok := rawArgs["deviceBlueprint"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprint")) + arg2, err = ec.unmarshalNIOTDeviceBlueprintIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprint"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_createDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 entities.IOTDevice + if tmp, ok := rawArgs["device"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("device")) + arg2, err = ec.unmarshalNIOTDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx, tmp) + if err != nil { + return nil, err + } + } + args["device"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_createEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 entities.IOTEnvironment + if tmp, ok := rawArgs["env"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) + arg1, err = ec.unmarshalNIOTEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx, tmp) + if err != nil { + return nil, err + } + } + args["env"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_createProject_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 entities.IOTProject + if tmp, ok := rawArgs["project"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project")) + arg0, err = ec.unmarshalNIOTProjectIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx, tmp) + if err != nil { + return nil, err + } + } + args["project"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_deleteApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["deviceBlueprintName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprintName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprintName"] = arg2 + var arg3 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg3, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_deleteDeployment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_deleteDeviceBlueprint_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_deleteDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_deleteEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_deleteProject_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_updateApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["deviceBlueprintName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprintName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprintName"] = arg2 + var arg3 entities.IOTApp + if tmp, ok := rawArgs["app"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("app")) + arg3, err = ec.unmarshalNIOTAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx, tmp) + if err != nil { + return nil, err + } + } + args["app"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_updateDeployment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 entities.IOTDeployment + if tmp, ok := rawArgs["deployment"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deployment")) + arg2, err = ec.unmarshalNIOTDeploymentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deployment"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_updateDeviceBlueprint_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 entities.IOTDeviceBlueprint + if tmp, ok := rawArgs["deviceBlueprint"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprint")) + arg2, err = ec.unmarshalNIOTDeviceBlueprintIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprint"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_updateDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 entities.IOTDevice + if tmp, ok := rawArgs["device"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("device")) + arg2, err = ec.unmarshalNIOTDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx, tmp) + if err != nil { + return nil, err + } + } + args["device"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_updateEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 entities.IOTEnvironment + if tmp, ok := rawArgs["env"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) + arg1, err = ec.unmarshalNIOTEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx, tmp) + if err != nil { + return nil, err + } + } + args["env"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Mutation_iot_updateProject_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 entities.IOTProject + if tmp, ok := rawArgs["project"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project")) + arg0, err = ec.unmarshalNIOTProjectIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx, tmp) + if err != nil { + return nil, err + } + } + args["project"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_iot_getApp_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["deviceBlueprintName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprintName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprintName"] = arg2 + var arg3 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg3, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Query_iot_getDeployment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Query_iot_getDeviceBlueprint_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Query_iot_getDevice_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Query_iot_getEnvironment_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg1 + return args, nil +} + +func (ec *executionContext) field_Query_iot_getProject_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Query_iot_listApps_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 string + if tmp, ok := rawArgs["deviceBlueprintName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deviceBlueprintName")) + arg2, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["deviceBlueprintName"] = arg2 + var arg3 *model.SearchIOTApps + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg3, err = ec.unmarshalOSearchIOTApps2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTApps(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg3 + var arg4 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg4, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg4 + return args, nil +} + +func (ec *executionContext) field_Query_iot_listDeployments_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 *model.SearchIOTDeployments + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg2, err = ec.unmarshalOSearchIOTDeployments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTDeployments(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg2 + var arg3 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg3, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Query_iot_listDeviceBlueprints_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 *model.SearchIOTDeviceBlueprints + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg2, err = ec.unmarshalOSearchIOTDeviceBlueprints2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTDeviceBlueprints(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg2 + var arg3 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg3, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Query_iot_listDevices_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 string + if tmp, ok := rawArgs["envName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envName")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["envName"] = arg1 + var arg2 *model.SearchIOTDevices + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg2, err = ec.unmarshalOSearchIOTDevices2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTDevices(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg2 + var arg3 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg3, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg3 + return args, nil +} + +func (ec *executionContext) field_Query_iot_listEnvironments_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["projectName"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["projectName"] = arg0 + var arg1 *model.SearchIOTEnvironments + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg1, err = ec.unmarshalOSearchIOTEnvironments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTEnvironments(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg1 + var arg2 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg2, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg2 + return args, nil +} + +func (ec *executionContext) field_Query_iot_listProjects_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *model.SearchIOTProjects + if tmp, ok := rawArgs["search"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("search")) + arg0, err = ec.unmarshalOSearchIOTProjects2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTProjects(ctx, tmp) + if err != nil { + return nil, err + } + } + args["search"] = arg0 + var arg1 *repos.CursorPagination + if tmp, ok := rawArgs["pq"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pq")) + arg1, err = ec.unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx, tmp) + if err != nil { + return nil, err + } + } + args["pq"] = arg1 + return args, nil +} + +func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) + if err != nil { + return nil, err + } + } + args["includeDeprecated"] = arg0 + return args, nil +} + +// endregion ***************************** args.gotpl ***************************** + +// region ************************** directives.gotpl ************************** + +// endregion ************************** directives.gotpl ************************** + +// region **************************** field.gotpl ***************************** + +func (ec *executionContext) _CursorPagination_after(ctx context.Context, field graphql.CollectedField, obj *repos.CursorPagination) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CursorPagination_after(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.After, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CursorPagination_after(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CursorPagination", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CursorPagination_before(ctx context.Context, field graphql.CollectedField, obj *repos.CursorPagination) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CursorPagination_before(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Before, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CursorPagination_before(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CursorPagination", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CursorPagination_first(ctx context.Context, field graphql.CollectedField, obj *repos.CursorPagination) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CursorPagination_first(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.First, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int64) + fc.Result = res + return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CursorPagination_first(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CursorPagination", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CursorPagination_last(ctx context.Context, field graphql.CollectedField, obj *repos.CursorPagination) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CursorPagination_last(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Last, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int64) + fc.Result = res + return ec.marshalOInt2ᚖint64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CursorPagination_last(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CursorPagination", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CursorPagination_orderBy(ctx context.Context, field graphql.CollectedField, obj *repos.CursorPagination) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CursorPagination_orderBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OrderBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CursorPagination_orderBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CursorPagination", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _CursorPagination_sortDirection(ctx context.Context, field graphql.CollectedField, obj *repos.CursorPagination) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_CursorPagination_sortDirection(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SortDirection, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(repos.SortDirection) + fc.Result = res + return ec.marshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_CursorPagination_sortDirection(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "CursorPagination", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type CursorPaginationSortDirection does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_ip(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_ip(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IP, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_ip(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx context.Context, field graphql.CollectedField, obj *common.CreatedOrUpdatedBy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.UserEmail, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx context.Context, field graphql.CollectedField, obj *common.CreatedOrUpdatedBy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Github__com___kloudlite___api___common__CreatedOrUpdatedBy().UserID(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx context.Context, field graphql.CollectedField, obj *common.CreatedOrUpdatedBy) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.UserName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___api___common__CreatedOrUpdatedBy", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Command, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Env, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx, field) + case "optional": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(ctx, field) + case "refKey": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(ctx, field) + case "refName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(ctx, field) + case "type": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(ctx, field) + case "value": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnvFrom, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "refName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(ctx, field) + case "type": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__EnvFrom", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Image, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ImagePullPolicy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LivenessProbe, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1Probe) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "failureThreshold": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx, field) + case "httpGet": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx, field) + case "initialDelay": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx, field) + case "interval": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx, field) + case "shell": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx, field) + case "tcp": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx, field) + case "type": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__Probe", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ReadinessProbe, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1Probe) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "failureThreshold": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx, field) + case "httpGet": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx, field) + case "initialDelay": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx, field) + case "interval": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx, field) + case "shell": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx, field) + case "tcp": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx, field) + case "type": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__Probe", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ResourceCPU, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1ContainerResource) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResource(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "max": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx, field) + case "min": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ContainerResource", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ResourceMemory, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1ContainerResource) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResource(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "max": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx, field) + case "min": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ContainerResource", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Volumes, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppContainer", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "items": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(ctx, field) + case "mountPath": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(ctx, field) + case "refName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(ctx, field) + case "type": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Containers, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainer) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "args": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(ctx, field) + case "command": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(ctx, field) + case "env": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(ctx, field) + case "envFrom": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(ctx, field) + case "image": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(ctx, field) + case "imagePullPolicy": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(ctx, field) + case "livenessProbe": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(ctx, field) + case "name": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(ctx, field) + case "readinessProbe": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(ctx, field) + case "resourceCpu": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(ctx, field) + case "resourceMemory": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(ctx, field) + case "volumes": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__AppContainer", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Freeze, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Hpa, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1Hpa) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__HPA2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Hpa(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "enabled": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(ctx, field) + case "maxReplicas": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(ctx, field) + case "minReplicas": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(ctx, field) + case "thresholdCpu": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(ctx, field) + case "thresholdMemory": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__HPA", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Intercept, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1Intercept) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__Intercept2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Intercept(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "enabled": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx, field) + case "toDevice": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__Intercept", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.NodeSelector, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Region, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Replicas, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ServiceAccount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Services, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisCrdsV1AppSvc) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_name(ctx, field) + case "port": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(ctx, field) + case "targetPort": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_targetPort(ctx, field) + case "type": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_type(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__AppSvc", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Tolerations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.K8sIoAPICoreV1Toleration) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "effect": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx, field) + case "key": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_key(ctx, field) + case "operator": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx, field) + case "tolerationSeconds": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx, field) + case "value": + return ec.fieldContext_K8s__io___api___core___v1__Toleration_value(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__Toleration", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TopologySpreadConstraints, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.K8sIoAPICoreV1TopologySpreadConstraint) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__TopologySpreadConstraint2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSpec", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "labelSelector": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(ctx, field) + case "matchLabelKeys": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(ctx, field) + case "maxSkew": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(ctx, field) + case "minDomains": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(ctx, field) + case "nodeAffinityPolicy": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(ctx, field) + case "nodeTaintsPolicy": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(ctx, field) + case "topologyKey": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(ctx, field) + case "whenUnsatisfiable": + return ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type K8s__io___api___core___v1__TopologySpreadConstraint", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSvc_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSvc", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Port, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSvc", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSvc_targetPort(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_targetPort(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TargetPort, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_targetPort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSvc", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSvc_type(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSvc_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__AppSvc", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Optional, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RefKey, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RefName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerResource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Max, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerResource", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerResource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Min, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerResource", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Items, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "fileName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(ctx, field) + case "key": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MountPath, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RefName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FileName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RefName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvFrom", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__EnvFrom", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Hpa) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Enabled, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Hpa) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MaxReplicas, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Hpa) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MinReplicas, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Hpa) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ThresholdCPU, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Hpa) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ThresholdMemory, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HPA", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.HTTPHeaders, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Path, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Port, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Intercept) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Enabled, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Intercept", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Intercept) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ToDevice, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Intercept", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.FailureThreshold, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.HTTPGet, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbe(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "httpHeaders": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(ctx, field) + case "path": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(ctx, field) + case "port": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InitialDelay, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interval, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Shell, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbe(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "command": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__ShellProbe", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TCP, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbe(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "port": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__TcpProbe", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__Probe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Command, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__ShellProbe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Port, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___apis___crds___v1__TcpProbe", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Debug, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_error(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_error(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Error, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_generation(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_generation(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Generation, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_generation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_info(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_info(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Info, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_info(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_message(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_message(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Message, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_startedAt(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_startedAt(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StartedAt, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalODate2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_startedAt(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_state(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_state(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.State, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorPkgOperatorState) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__State2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorState(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_state(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Github__com___kloudlite___operator___pkg___operator__State does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check_status(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Status, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Check_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Check", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Debug, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Title, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__CheckMeta", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorResourceRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.APIVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorResourceRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorResourceRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorResourceRef) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Namespace, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__ResourceRef", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CheckList, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorPkgOperatorCheckMeta) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "debug": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx, field) + case "description": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx, field) + case "name": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx, field) + case "title": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___operator__CheckMeta", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Checks, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsReady, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastReadyGeneration, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastReconcileTime, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalODate2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_message(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Message, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorPkgRawJSONRawJSON) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___pkg___raw____json__RawJson2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgRawJSONRawJSON(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "RawMessage": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___raw____json__RawJson", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Resources, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteOperatorPkgOperatorResourceRef) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRefᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___operator__Status", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "apiVersion": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx, field) + case "kind": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx, field) + case "name": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx, field) + case "namespace": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___operator__ResourceRef", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx context.Context, field graphql.CollectedField, obj *model.GithubComKloudliteOperatorPkgRawJSONRawJSON) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RawMessage, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(interface{}) + fc.Result = res + return ec.marshalOAny2interface(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Github__com___kloudlite___operator___pkg___raw____json__RawJson", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Any does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_apiVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_apiVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.APIVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_apiVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTApp().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_deviceBlueprintName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_deviceBlueprintName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeviceBlueprintName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_deviceBlueprintName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_enabled(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_enabled(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Enabled, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_enabled(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_environmentName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnvironmentName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_id(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_kind(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_metadata(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_metadata(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ObjectMeta, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(v1.ObjectMeta) + fc.Result = res + return ec.marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_metadata(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "annotations": + return ec.fieldContext_Metadata_annotations(ctx, field) + case "creationTimestamp": + return ec.fieldContext_Metadata_creationTimestamp(ctx, field) + case "deletionTimestamp": + return ec.fieldContext_Metadata_deletionTimestamp(ctx, field) + case "generation": + return ec.fieldContext_Metadata_generation(ctx, field) + case "labels": + return ec.fieldContext_Metadata_labels(ctx, field) + case "name": + return ec.fieldContext_Metadata_name(ctx, field) + case "namespace": + return ec.fieldContext_Metadata_namespace(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Metadata", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_projectName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_projectName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ProjectName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_projectName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_spec(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_spec(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTApp().Spec(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorApisCrdsV1AppSpec) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_spec(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "containers": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(ctx, field) + case "displayName": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(ctx, field) + case "freeze": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(ctx, field) + case "hpa": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(ctx, field) + case "intercept": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(ctx, field) + case "nodeSelector": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(ctx, field) + case "region": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(ctx, field) + case "replicas": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(ctx, field) + case "serviceAccount": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(ctx, field) + case "services": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(ctx, field) + case "tolerations": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(ctx, field) + case "topologySpreadConstraints": + return ec.fieldContext_Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___apis___crds___v1__AppSpec", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_status(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_status(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTApp().Status(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.GithubComKloudliteOperatorPkgOperatorStatus) + fc.Result = res + return ec.marshalOGithub__com___kloudlite___operator___pkg___operator__Status2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorStatus(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "checkList": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx, field) + case "checks": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx, field) + case "isReady": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx, field) + case "lastReadyGeneration": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx, field) + case "lastReconcileTime": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx, field) + case "message": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_message(ctx, field) + case "resources": + return ec.fieldContext_Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___operator___pkg___operator__Status", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTApp_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTApp) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTApp_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTApp().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTApp_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTApp", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTAppEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.IOTAppEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTAppEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTAppEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTAppEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTAppEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.IOTAppEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTAppEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.IOTApp) + fc.Result = res + return ec.marshalNIOTApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTAppEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTAppEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTApp_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_IOTApp_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_IOTApp_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTApp_creationTime(ctx, field) + case "deviceBlueprintName": + return ec.fieldContext_IOTApp_deviceBlueprintName(ctx, field) + case "displayName": + return ec.fieldContext_IOTApp_displayName(ctx, field) + case "enabled": + return ec.fieldContext_IOTApp_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_IOTApp_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTApp_id(ctx, field) + case "kind": + return ec.fieldContext_IOTApp_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTApp_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTApp_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_IOTApp_metadata(ctx, field) + case "projectName": + return ec.fieldContext_IOTApp_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTApp_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_IOTApp_spec(ctx, field) + case "status": + return ec.fieldContext_IOTApp_status(ctx, field) + case "updateTime": + return ec.fieldContext_IOTApp_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTApp", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTAppPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.IOTAppPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTAppPaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.IOTAppEdge) + fc.Result = res + return ec.marshalNIOTAppEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTAppEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTAppPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTAppPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_IOTAppEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_IOTAppEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTAppEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTAppPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.IOTAppPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTAppPaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTAppPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTAppPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTAppPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.IOTAppPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTAppPaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTAppPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTAppPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_CIDR(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_CIDR(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CIDR, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_CIDR(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDeployment().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_environmentName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnvironmentName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_exposedServices(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_exposedServices(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDeployment().ExposedServices(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_exposedServices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "ip": + return ec.fieldContext_Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_ip(ctx, field) + case "name": + return ec.fieldContext_Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_name(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_id(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_name(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_projectName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_projectName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ProjectName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_projectName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeployment_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeployment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeployment_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDeployment().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeployment_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeployment", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeploymentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeploymentEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeploymentEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeploymentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeploymentEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeploymentEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeploymentEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeploymentEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.IOTDeployment) + fc.Result = res + return ec.marshalNIOTDeployment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeploymentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeploymentEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeployment_accountName(ctx, field) + case "CIDR": + return ec.fieldContext_IOTDeployment_CIDR(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeployment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeployment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeployment_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeployment_environmentName(ctx, field) + case "exposedServices": + return ec.fieldContext_IOTDeployment_exposedServices(ctx, field) + case "id": + return ec.fieldContext_IOTDeployment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeployment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeployment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeployment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeployment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeployment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeployment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeployment", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeploymentPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeploymentPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeploymentPaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.IOTDeploymentEdge) + fc.Result = res + return ec.marshalNIOTDeploymentEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeploymentEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeploymentPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeploymentPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_IOTDeploymentEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_IOTDeploymentEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeploymentEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeploymentPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeploymentPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeploymentPaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeploymentPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeploymentPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeploymentPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeploymentPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeploymentPaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeploymentPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeploymentPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_blueprint(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_blueprint(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Blueprint, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_blueprint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDevice().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_deployment(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_deployment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Deployment, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_deployment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_environmentName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnvironmentName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_id(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_ip(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_ip(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IP, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_ip(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_name(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_podCIDR(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_podCIDR(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PodCIDR, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_podCIDR(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_projectName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_projectName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ProjectName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_projectName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_publicKey(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_publicKey(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PublicKey, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_publicKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_serviceCIDR(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_serviceCIDR(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ServiceCIDR, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_serviceCIDR(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDevice().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevice_version(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDevice) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevice_version(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Version, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevice_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevice", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_bluePrintType(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_bluePrintType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDeviceBlueprint().BluePrintType(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_bluePrintType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDeviceBlueprint().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_environmentName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_environmentName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnvironmentName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_environmentName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_id(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_name(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_projectName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_projectName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ProjectName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_projectName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTDeviceBlueprint().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprint_version(ctx context.Context, field graphql.CollectedField, obj *entities.IOTDeviceBlueprint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprint_version(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Version, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprint_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprintEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceBlueprintEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprintEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprintEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprintEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprintEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceBlueprintEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprintEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.IOTDeviceBlueprint) + fc.Result = res + return ec.marshalNIOTDeviceBlueprint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprintEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprintEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeviceBlueprint_accountName(ctx, field) + case "bluePrintType": + return ec.fieldContext_IOTDeviceBlueprint_bluePrintType(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeviceBlueprint_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeviceBlueprint_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeviceBlueprint_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeviceBlueprint_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDeviceBlueprint_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeviceBlueprint_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeviceBlueprint_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeviceBlueprint_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeviceBlueprint_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeviceBlueprint_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeviceBlueprint_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDeviceBlueprint_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceBlueprint", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprintPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceBlueprintPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprintPaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.IOTDeviceBlueprintEdge) + fc.Result = res + return ec.marshalNIOTDeviceBlueprintEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceBlueprintEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprintPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprintPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_IOTDeviceBlueprintEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_IOTDeviceBlueprintEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceBlueprintEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprintPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceBlueprintPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprintPaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprintPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprintPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceBlueprintPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceBlueprintPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceBlueprintPaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceBlueprintPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceBlueprintPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDeviceEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.IOTDeviceEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDeviceEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.IOTDevice) + fc.Result = res + return ec.marshalNIOTDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDeviceEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDeviceEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDevice_accountName(ctx, field) + case "blueprint": + return ec.fieldContext_IOTDevice_blueprint(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDevice_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDevice_creationTime(ctx, field) + case "deployment": + return ec.fieldContext_IOTDevice_deployment(ctx, field) + case "displayName": + return ec.fieldContext_IOTDevice_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDevice_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDevice_id(ctx, field) + case "ip": + return ec.fieldContext_IOTDevice_ip(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDevice_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDevice_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDevice_name(ctx, field) + case "podCIDR": + return ec.fieldContext_IOTDevice_podCIDR(ctx, field) + case "projectName": + return ec.fieldContext_IOTDevice_projectName(ctx, field) + case "publicKey": + return ec.fieldContext_IOTDevice_publicKey(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDevice_recordVersion(ctx, field) + case "serviceCIDR": + return ec.fieldContext_IOTDevice_serviceCIDR(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDevice_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDevice_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDevice", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.IOTDevicePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevicePaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.IOTDeviceEdge) + fc.Result = res + return ec.marshalNIOTDeviceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevicePaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevicePaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_IOTDeviceEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_IOTDeviceEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.IOTDevicePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevicePaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevicePaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevicePaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTDevicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.IOTDevicePaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTDevicePaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTDevicePaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTDevicePaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTEnvironment().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_id(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_name(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_projectName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_projectName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ProjectName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_projectName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironment_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTEnvironment) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironment_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTEnvironment().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironment_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironment", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironmentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.IOTEnvironmentEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironmentEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironmentEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironmentEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironmentEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.IOTEnvironmentEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironmentEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.IOTEnvironment) + fc.Result = res + return ec.marshalNIOTEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironmentEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironmentEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTEnvironment_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTEnvironment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTEnvironment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTEnvironment_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTEnvironment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTEnvironment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTEnvironment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTEnvironment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTEnvironment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTEnvironment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTEnvironment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTEnvironment", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironmentPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.IOTEnvironmentPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironmentPaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.IOTEnvironmentEdge) + fc.Result = res + return ec.marshalNIOTEnvironmentEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTEnvironmentEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironmentPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironmentPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_IOTEnvironmentEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_IOTEnvironmentEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTEnvironmentEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironmentPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.IOTEnvironmentPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironmentPaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironmentPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironmentPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTEnvironmentPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.IOTEnvironmentPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTEnvironmentPaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTEnvironmentPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTEnvironmentPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_accountName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_accountName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.AccountName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_accountName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_createdBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_createdBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CreatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_createdBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_creationTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_creationTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTProject().CreationTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_creationTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_displayName(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_displayName(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DisplayName, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_id(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Id, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.ID) + fc.Result = res + return ec.marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_lastUpdatedBy(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_lastUpdatedBy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LastUpdatedBy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(common.CreatedOrUpdatedBy) + fc.Result = res + return ec.marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_lastUpdatedBy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "userEmail": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field) + case "userId": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field) + case "userName": + return ec.fieldContext_Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Github__com___kloudlite___api___common__CreatedOrUpdatedBy", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_markedForDeletion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_markedForDeletion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MarkedForDeletion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_markedForDeletion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_name(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_recordVersion(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_recordVersion(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.RecordVersion, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_recordVersion(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProject_updateTime(ctx context.Context, field graphql.CollectedField, obj *entities.IOTProject) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProject_updateTime(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.IOTProject().UpdateTime(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProject_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProject", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProjectEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *model.IOTProjectEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProjectEdge_cursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Cursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProjectEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProjectEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProjectEdge_node(ctx context.Context, field graphql.CollectedField, obj *model.IOTProjectEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProjectEdge_node(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Node, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*entities.IOTProject) + fc.Result = res + return ec.marshalNIOTProject2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProjectEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProjectEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTProject_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTProject_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTProject_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTProject_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTProject_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTProject_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTProject_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTProject_name(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTProject_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTProject_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTProject", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProjectPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField, obj *model.IOTProjectPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProjectPaginatedRecords_edges(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Edges, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]*model.IOTProjectEdge) + fc.Result = res + return ec.marshalNIOTProjectEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTProjectEdgeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProjectPaginatedRecords_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProjectPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "cursor": + return ec.fieldContext_IOTProjectEdge_cursor(ctx, field) + case "node": + return ec.fieldContext_IOTProjectEdge_node(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTProjectEdge", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProjectPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField, obj *model.IOTProjectPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProjectPaginatedRecords_pageInfo(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PageInfo, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*model.PageInfo) + fc.Result = res + return ec.marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProjectPaginatedRecords_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProjectPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _IOTProjectPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField, obj *model.IOTProjectPaginatedRecords) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IOTProjectPaginatedRecords_totalCount(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TotalCount, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_IOTProjectPaginatedRecords_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "IOTProjectPaginatedRecords", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__Toleration_effect(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1Toleration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Effect, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.K8sIoAPICoreV1TaintEffect) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_effect(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__Toleration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type K8s__io___api___core___v1__TaintEffect does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__Toleration_key(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1Toleration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__Toleration_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__Toleration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__Toleration_operator(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1Toleration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Operator, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.K8sIoAPICoreV1TolerationOperator) + fc.Result = res + return ec.marshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__Toleration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type K8s__io___api___core___v1__TolerationOperator does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1Toleration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TolerationSeconds, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__Toleration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__Toleration_value(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1Toleration) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__Toleration_value(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Value, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__Toleration_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__Toleration", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.LabelSelector, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.K8sIoApimachineryPkgApisMetaV1LabelSelector) + fc.Result = res + return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelector(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "matchExpressions": + return ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx, field) + case "matchLabels": + return ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MatchLabelKeys, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MaxSkew, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int) + fc.Result = res + return ec.marshalNInt2int(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MinDomains, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*int) + fc.Result = res + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.NodeAffinityPolicy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.NodeTaintsPolicy, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.TopologyKey, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.WhenUnsatisfiable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(model.K8sIoAPICoreV1UnsatisfiableConstraintAction) + fc.Result = res + return ec.marshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___api___core___v1__TopologySpreadConstraint", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type K8s__io___api___core___v1__UnsatisfiableConstraintAction does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelector) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MatchExpressions, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) + fc.Result = res + return ec.marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "key": + return ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx, field) + case "operator": + return ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx, field) + case "values": + return ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelector) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MatchLabels, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Key, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Operator, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) + fc.Result = res + return ec.marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx context.Context, field graphql.CollectedField, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Values, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _MatchFilter_array(ctx context.Context, field graphql.CollectedField, obj *repos.MatchFilter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MatchFilter_array(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Array, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]any) + fc.Result = res + return ec.marshalOAny2ᚕinterfaceᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_MatchFilter_array(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "MatchFilter", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Any does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _MatchFilter_exact(ctx context.Context, field graphql.CollectedField, obj *repos.MatchFilter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MatchFilter_exact(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Exact, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(any) + fc.Result = res + return ec.marshalOAny2interface(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_MatchFilter_exact(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "MatchFilter", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Any does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _MatchFilter_matchType(ctx context.Context, field graphql.CollectedField, obj *repos.MatchFilter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MatchFilter_matchType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MatchType, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(repos.MatchType) + fc.Result = res + return ec.marshalNMatchFilterMatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_MatchFilter_matchType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "MatchFilter", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type MatchFilterMatchType does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _MatchFilter_regex(ctx context.Context, field graphql.CollectedField, obj *repos.MatchFilter) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_MatchFilter_regex(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Regex, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_MatchFilter_regex(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "MatchFilter", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_annotations(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_annotations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Metadata().Annotations(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_creationTimestamp(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_creationTimestamp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Metadata().CreationTimestamp(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNDate2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_creationTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_deletionTimestamp(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_deletionTimestamp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Metadata().DeletionTimestamp(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalODate2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_deletionTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Date does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_generation(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_generation(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Generation, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalNInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_generation(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_labels(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_labels(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Metadata().Labels(rctx, obj) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(map[string]interface{}) + fc.Result = res + return ec.marshalOMap2map(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Map does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_name(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Metadata_namespace(ctx context.Context, field graphql.CollectedField, obj *v1.ObjectMeta) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Metadata_namespace(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Namespace, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Metadata_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Metadata", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_createProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_createProject(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotCreateProject(rctx, fc.Args["project"].(entities.IOTProject)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTProject); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTProject`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTProject) + fc.Result = res + return ec.marshalOIOTProject2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_createProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTProject_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTProject_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTProject_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTProject_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTProject_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTProject_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTProject_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTProject_name(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTProject_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTProject_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTProject", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_createProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_updateProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_updateProject(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotUpdateProject(rctx, fc.Args["project"].(entities.IOTProject)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTProject); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTProject`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTProject) + fc.Result = res + return ec.marshalOIOTProject2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_updateProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTProject_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTProject_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTProject_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTProject_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTProject_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTProject_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTProject_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTProject_name(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTProject_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTProject_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTProject", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_updateProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_deleteProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_deleteProject(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotDeleteProject(rctx, fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_deleteProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_deleteProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_createEnvironment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_createEnvironment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotCreateEnvironment(rctx, fc.Args["projectName"].(string), fc.Args["env"].(entities.IOTEnvironment)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTEnvironment); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTEnvironment`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTEnvironment) + fc.Result = res + return ec.marshalOIOTEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_createEnvironment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTEnvironment_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTEnvironment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTEnvironment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTEnvironment_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTEnvironment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTEnvironment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTEnvironment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTEnvironment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTEnvironment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTEnvironment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTEnvironment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTEnvironment", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_createEnvironment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_updateEnvironment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_updateEnvironment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotUpdateEnvironment(rctx, fc.Args["projectName"].(string), fc.Args["env"].(entities.IOTEnvironment)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTEnvironment); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTEnvironment`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTEnvironment) + fc.Result = res + return ec.marshalOIOTEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_updateEnvironment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTEnvironment_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTEnvironment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTEnvironment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTEnvironment_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTEnvironment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTEnvironment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTEnvironment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTEnvironment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTEnvironment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTEnvironment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTEnvironment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTEnvironment", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_updateEnvironment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_deleteEnvironment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_deleteEnvironment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotDeleteEnvironment(rctx, fc.Args["projectName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_deleteEnvironment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_deleteEnvironment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_createDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_createDevice(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotCreateDevice(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["device"].(entities.IOTDevice)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDevice); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDevice`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDevice) + fc.Result = res + return ec.marshalOIOTDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_createDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDevice_accountName(ctx, field) + case "blueprint": + return ec.fieldContext_IOTDevice_blueprint(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDevice_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDevice_creationTime(ctx, field) + case "deployment": + return ec.fieldContext_IOTDevice_deployment(ctx, field) + case "displayName": + return ec.fieldContext_IOTDevice_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDevice_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDevice_id(ctx, field) + case "ip": + return ec.fieldContext_IOTDevice_ip(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDevice_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDevice_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDevice_name(ctx, field) + case "podCIDR": + return ec.fieldContext_IOTDevice_podCIDR(ctx, field) + case "projectName": + return ec.fieldContext_IOTDevice_projectName(ctx, field) + case "publicKey": + return ec.fieldContext_IOTDevice_publicKey(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDevice_recordVersion(ctx, field) + case "serviceCIDR": + return ec.fieldContext_IOTDevice_serviceCIDR(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDevice_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDevice_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDevice", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_createDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_updateDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_updateDevice(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotUpdateDevice(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["device"].(entities.IOTDevice)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDevice); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDevice`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDevice) + fc.Result = res + return ec.marshalOIOTDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_updateDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDevice_accountName(ctx, field) + case "blueprint": + return ec.fieldContext_IOTDevice_blueprint(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDevice_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDevice_creationTime(ctx, field) + case "deployment": + return ec.fieldContext_IOTDevice_deployment(ctx, field) + case "displayName": + return ec.fieldContext_IOTDevice_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDevice_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDevice_id(ctx, field) + case "ip": + return ec.fieldContext_IOTDevice_ip(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDevice_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDevice_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDevice_name(ctx, field) + case "podCIDR": + return ec.fieldContext_IOTDevice_podCIDR(ctx, field) + case "projectName": + return ec.fieldContext_IOTDevice_projectName(ctx, field) + case "publicKey": + return ec.fieldContext_IOTDevice_publicKey(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDevice_recordVersion(ctx, field) + case "serviceCIDR": + return ec.fieldContext_IOTDevice_serviceCIDR(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDevice_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDevice_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDevice", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_updateDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_deleteDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_deleteDevice(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotDeleteDevice(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_deleteDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_deleteDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_createDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_createDeviceBlueprint(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotCreateDeviceBlueprint(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprint"].(entities.IOTDeviceBlueprint)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDeviceBlueprint); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeviceBlueprint`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDeviceBlueprint) + fc.Result = res + return ec.marshalOIOTDeviceBlueprint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_createDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeviceBlueprint_accountName(ctx, field) + case "bluePrintType": + return ec.fieldContext_IOTDeviceBlueprint_bluePrintType(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeviceBlueprint_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeviceBlueprint_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeviceBlueprint_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeviceBlueprint_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDeviceBlueprint_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeviceBlueprint_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeviceBlueprint_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeviceBlueprint_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeviceBlueprint_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeviceBlueprint_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeviceBlueprint_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDeviceBlueprint_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceBlueprint", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_createDeviceBlueprint_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_updateDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_updateDeviceBlueprint(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotUpdateDeviceBlueprint(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprint"].(entities.IOTDeviceBlueprint)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDeviceBlueprint); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeviceBlueprint`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDeviceBlueprint) + fc.Result = res + return ec.marshalOIOTDeviceBlueprint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_updateDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeviceBlueprint_accountName(ctx, field) + case "bluePrintType": + return ec.fieldContext_IOTDeviceBlueprint_bluePrintType(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeviceBlueprint_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeviceBlueprint_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeviceBlueprint_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeviceBlueprint_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDeviceBlueprint_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeviceBlueprint_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeviceBlueprint_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeviceBlueprint_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeviceBlueprint_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeviceBlueprint_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeviceBlueprint_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDeviceBlueprint_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceBlueprint", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_updateDeviceBlueprint_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_deleteDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_deleteDeviceBlueprint(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotDeleteDeviceBlueprint(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_deleteDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_deleteDeviceBlueprint_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_createDeployment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_createDeployment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotCreateDeployment(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deployment"].(entities.IOTDeployment)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDeployment); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeployment`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDeployment) + fc.Result = res + return ec.marshalOIOTDeployment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_createDeployment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeployment_accountName(ctx, field) + case "CIDR": + return ec.fieldContext_IOTDeployment_CIDR(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeployment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeployment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeployment_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeployment_environmentName(ctx, field) + case "exposedServices": + return ec.fieldContext_IOTDeployment_exposedServices(ctx, field) + case "id": + return ec.fieldContext_IOTDeployment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeployment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeployment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeployment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeployment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeployment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeployment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeployment", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_createDeployment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_updateDeployment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_updateDeployment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotUpdateDeployment(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deployment"].(entities.IOTDeployment)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDeployment); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeployment`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDeployment) + fc.Result = res + return ec.marshalOIOTDeployment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_updateDeployment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeployment_accountName(ctx, field) + case "CIDR": + return ec.fieldContext_IOTDeployment_CIDR(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeployment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeployment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeployment_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeployment_environmentName(ctx, field) + case "exposedServices": + return ec.fieldContext_IOTDeployment_exposedServices(ctx, field) + case "id": + return ec.fieldContext_IOTDeployment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeployment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeployment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeployment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeployment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeployment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeployment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeployment", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_updateDeployment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_deleteDeployment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_deleteDeployment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotDeleteDeployment(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_deleteDeployment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_deleteDeployment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_createApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_createApp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotCreateApp(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprintName"].(string), fc.Args["app"].(entities.IOTApp)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTApp); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTApp`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTApp) + fc.Result = res + return ec.marshalOIOTApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_createApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTApp_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_IOTApp_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_IOTApp_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTApp_creationTime(ctx, field) + case "deviceBlueprintName": + return ec.fieldContext_IOTApp_deviceBlueprintName(ctx, field) + case "displayName": + return ec.fieldContext_IOTApp_displayName(ctx, field) + case "enabled": + return ec.fieldContext_IOTApp_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_IOTApp_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTApp_id(ctx, field) + case "kind": + return ec.fieldContext_IOTApp_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTApp_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTApp_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_IOTApp_metadata(ctx, field) + case "projectName": + return ec.fieldContext_IOTApp_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTApp_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_IOTApp_spec(ctx, field) + case "status": + return ec.fieldContext_IOTApp_status(ctx, field) + case "updateTime": + return ec.fieldContext_IOTApp_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTApp", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_createApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_updateApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_updateApp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotUpdateApp(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprintName"].(string), fc.Args["app"].(entities.IOTApp)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTApp); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTApp`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTApp) + fc.Result = res + return ec.marshalOIOTApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_updateApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTApp_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_IOTApp_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_IOTApp_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTApp_creationTime(ctx, field) + case "deviceBlueprintName": + return ec.fieldContext_IOTApp_deviceBlueprintName(ctx, field) + case "displayName": + return ec.fieldContext_IOTApp_displayName(ctx, field) + case "enabled": + return ec.fieldContext_IOTApp_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_IOTApp_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTApp_id(ctx, field) + case "kind": + return ec.fieldContext_IOTApp_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTApp_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTApp_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_IOTApp_metadata(ctx, field) + case "projectName": + return ec.fieldContext_IOTApp_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTApp_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_IOTApp_spec(ctx, field) + case "status": + return ec.fieldContext_IOTApp_status(ctx, field) + case "updateTime": + return ec.fieldContext_IOTApp_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTApp", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_updateApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_iot_deleteApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_iot_deleteApp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Mutation().IotDeleteApp(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprintName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(bool); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be bool`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Mutation_iot_deleteApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Mutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_iot_deleteApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EndCursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PageInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.HasNextPage, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PageInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.HasPreviousPage, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*bool) + fc.Result = res + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PageInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *model.PageInfo) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.StartCursor, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "PageInfo", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_listProjects(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_listProjects(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotListProjects(rctx, fc.Args["search"].(*model.SearchIOTProjects), fc.Args["pq"].(*repos.CursorPagination)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.IOTProjectPaginatedRecords); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/app/graph/model.IOTProjectPaginatedRecords`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.IOTProjectPaginatedRecords) + fc.Result = res + return ec.marshalOIOTProjectPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTProjectPaginatedRecords(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_listProjects(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_IOTProjectPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IOTProjectPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IOTProjectPaginatedRecords_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTProjectPaginatedRecords", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_listProjects_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_getProject(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_getProject(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotGetProject(rctx, fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTProject); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTProject`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTProject) + fc.Result = res + return ec.marshalOIOTProject2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_getProject(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTProject_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTProject_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTProject_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTProject_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTProject_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTProject_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTProject_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTProject_name(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTProject_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTProject_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTProject", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_getProject_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_listEnvironments(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_listEnvironments(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotListEnvironments(rctx, fc.Args["projectName"].(string), fc.Args["search"].(*model.SearchIOTEnvironments), fc.Args["pq"].(*repos.CursorPagination)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.IOTEnvironmentPaginatedRecords); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/app/graph/model.IOTEnvironmentPaginatedRecords`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.IOTEnvironmentPaginatedRecords) + fc.Result = res + return ec.marshalOIOTEnvironmentPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTEnvironmentPaginatedRecords(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_listEnvironments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_IOTEnvironmentPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IOTEnvironmentPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IOTEnvironmentPaginatedRecords_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTEnvironmentPaginatedRecords", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_listEnvironments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_getEnvironment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_getEnvironment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotGetEnvironment(rctx, fc.Args["projectName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTEnvironment); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTEnvironment`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTEnvironment) + fc.Result = res + return ec.marshalOIOTEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_getEnvironment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTEnvironment_accountName(ctx, field) + case "createdBy": + return ec.fieldContext_IOTEnvironment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTEnvironment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTEnvironment_displayName(ctx, field) + case "id": + return ec.fieldContext_IOTEnvironment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTEnvironment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTEnvironment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTEnvironment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTEnvironment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTEnvironment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTEnvironment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTEnvironment", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_getEnvironment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_listDevices(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_listDevices(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotListDevices(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["search"].(*model.SearchIOTDevices), fc.Args["pq"].(*repos.CursorPagination)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.IOTDevicePaginatedRecords); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/app/graph/model.IOTDevicePaginatedRecords`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.IOTDevicePaginatedRecords) + fc.Result = res + return ec.marshalOIOTDevicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDevicePaginatedRecords(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_listDevices(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_IOTDevicePaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IOTDevicePaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IOTDevicePaginatedRecords_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDevicePaginatedRecords", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_listDevices_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_getDevice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_getDevice(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotGetDevice(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDevice); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDevice`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDevice) + fc.Result = res + return ec.marshalOIOTDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_getDevice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDevice_accountName(ctx, field) + case "blueprint": + return ec.fieldContext_IOTDevice_blueprint(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDevice_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDevice_creationTime(ctx, field) + case "deployment": + return ec.fieldContext_IOTDevice_deployment(ctx, field) + case "displayName": + return ec.fieldContext_IOTDevice_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDevice_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDevice_id(ctx, field) + case "ip": + return ec.fieldContext_IOTDevice_ip(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDevice_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDevice_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDevice_name(ctx, field) + case "podCIDR": + return ec.fieldContext_IOTDevice_podCIDR(ctx, field) + case "projectName": + return ec.fieldContext_IOTDevice_projectName(ctx, field) + case "publicKey": + return ec.fieldContext_IOTDevice_publicKey(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDevice_recordVersion(ctx, field) + case "serviceCIDR": + return ec.fieldContext_IOTDevice_serviceCIDR(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDevice_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDevice_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDevice", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_getDevice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_listDeviceBlueprints(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_listDeviceBlueprints(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotListDeviceBlueprints(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["search"].(*model.SearchIOTDeviceBlueprints), fc.Args["pq"].(*repos.CursorPagination)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.IOTDeviceBlueprintPaginatedRecords); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/app/graph/model.IOTDeviceBlueprintPaginatedRecords`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.IOTDeviceBlueprintPaginatedRecords) + fc.Result = res + return ec.marshalOIOTDeviceBlueprintPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceBlueprintPaginatedRecords(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_listDeviceBlueprints(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_IOTDeviceBlueprintPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IOTDeviceBlueprintPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IOTDeviceBlueprintPaginatedRecords_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceBlueprintPaginatedRecords", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_listDeviceBlueprints_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_getDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_getDeviceBlueprint(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotGetDeviceBlueprint(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDeviceBlueprint); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeviceBlueprint`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDeviceBlueprint) + fc.Result = res + return ec.marshalOIOTDeviceBlueprint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_getDeviceBlueprint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeviceBlueprint_accountName(ctx, field) + case "bluePrintType": + return ec.fieldContext_IOTDeviceBlueprint_bluePrintType(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeviceBlueprint_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeviceBlueprint_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeviceBlueprint_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeviceBlueprint_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTDeviceBlueprint_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeviceBlueprint_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeviceBlueprint_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeviceBlueprint_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeviceBlueprint_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeviceBlueprint_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeviceBlueprint_updateTime(ctx, field) + case "version": + return ec.fieldContext_IOTDeviceBlueprint_version(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeviceBlueprint", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_getDeviceBlueprint_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_listDeployments(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_listDeployments(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotListDeployments(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["search"].(*model.SearchIOTDeployments), fc.Args["pq"].(*repos.CursorPagination)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.IOTDeploymentPaginatedRecords); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/app/graph/model.IOTDeploymentPaginatedRecords`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.IOTDeploymentPaginatedRecords) + fc.Result = res + return ec.marshalOIOTDeploymentPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeploymentPaginatedRecords(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_listDeployments(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_IOTDeploymentPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IOTDeploymentPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IOTDeploymentPaginatedRecords_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeploymentPaginatedRecords", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_listDeployments_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_getDeployment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_getDeployment(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotGetDeployment(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTDeployment); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTDeployment`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTDeployment) + fc.Result = res + return ec.marshalOIOTDeployment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_getDeployment(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTDeployment_accountName(ctx, field) + case "CIDR": + return ec.fieldContext_IOTDeployment_CIDR(ctx, field) + case "createdBy": + return ec.fieldContext_IOTDeployment_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTDeployment_creationTime(ctx, field) + case "displayName": + return ec.fieldContext_IOTDeployment_displayName(ctx, field) + case "environmentName": + return ec.fieldContext_IOTDeployment_environmentName(ctx, field) + case "exposedServices": + return ec.fieldContext_IOTDeployment_exposedServices(ctx, field) + case "id": + return ec.fieldContext_IOTDeployment_id(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTDeployment_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTDeployment_markedForDeletion(ctx, field) + case "name": + return ec.fieldContext_IOTDeployment_name(ctx, field) + case "projectName": + return ec.fieldContext_IOTDeployment_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTDeployment_recordVersion(ctx, field) + case "updateTime": + return ec.fieldContext_IOTDeployment_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTDeployment", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_getDeployment_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_listApps(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_listApps(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotListApps(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprintName"].(string), fc.Args["search"].(*model.SearchIOTApps), fc.Args["pq"].(*repos.CursorPagination)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*model.IOTAppPaginatedRecords); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/app/graph/model.IOTAppPaginatedRecords`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*model.IOTAppPaginatedRecords) + fc.Result = res + return ec.marshalOIOTAppPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTAppPaginatedRecords(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_listApps(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "edges": + return ec.fieldContext_IOTAppPaginatedRecords_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IOTAppPaginatedRecords_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IOTAppPaginatedRecords_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTAppPaginatedRecords", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_listApps_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query_iot_getApp(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_iot_getApp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + directive0 := func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.Query().IotGetApp(rctx, fc.Args["projectName"].(string), fc.Args["envName"].(string), fc.Args["deviceBlueprintName"].(string), fc.Args["name"].(string)) + } + directive1 := func(ctx context.Context) (interface{}, error) { + if ec.directives.IsLoggedInAndVerified == nil { + return nil, errors.New("directive isLoggedInAndVerified is not implemented") + } + return ec.directives.IsLoggedInAndVerified(ctx, nil, directive0) + } + directive2 := func(ctx context.Context) (interface{}, error) { + if ec.directives.HasAccount == nil { + return nil, errors.New("directive hasAccount is not implemented") + } + return ec.directives.HasAccount(ctx, nil, directive1) + } + + tmp, err := directive2(rctx) + if err != nil { + return nil, graphql.ErrorOnPath(ctx, err) + } + if tmp == nil { + return nil, nil + } + if data, ok := tmp.(*entities.IOTApp); ok { + return data, nil + } + return nil, fmt.Errorf(`unexpected type %T from directive, should be *github.com/kloudlite/api/apps/iot-console/internal/entities.IOTApp`, tmp) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*entities.IOTApp) + fc.Result = res + return ec.marshalOIOTApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query_iot_getApp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "accountName": + return ec.fieldContext_IOTApp_accountName(ctx, field) + case "apiVersion": + return ec.fieldContext_IOTApp_apiVersion(ctx, field) + case "createdBy": + return ec.fieldContext_IOTApp_createdBy(ctx, field) + case "creationTime": + return ec.fieldContext_IOTApp_creationTime(ctx, field) + case "deviceBlueprintName": + return ec.fieldContext_IOTApp_deviceBlueprintName(ctx, field) + case "displayName": + return ec.fieldContext_IOTApp_displayName(ctx, field) + case "enabled": + return ec.fieldContext_IOTApp_enabled(ctx, field) + case "environmentName": + return ec.fieldContext_IOTApp_environmentName(ctx, field) + case "id": + return ec.fieldContext_IOTApp_id(ctx, field) + case "kind": + return ec.fieldContext_IOTApp_kind(ctx, field) + case "lastUpdatedBy": + return ec.fieldContext_IOTApp_lastUpdatedBy(ctx, field) + case "markedForDeletion": + return ec.fieldContext_IOTApp_markedForDeletion(ctx, field) + case "metadata": + return ec.fieldContext_IOTApp_metadata(ctx, field) + case "projectName": + return ec.fieldContext_IOTApp_projectName(ctx, field) + case "recordVersion": + return ec.fieldContext_IOTApp_recordVersion(ctx, field) + case "spec": + return ec.fieldContext_IOTApp_spec(ctx, field) + case "status": + return ec.fieldContext_IOTApp_status(ctx, field) + case "updateTime": + return ec.fieldContext_IOTApp_updateTime(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type IOTApp", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_iot_getApp_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query__service(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query__service(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.__resolve__service(ctx) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(fedruntime.Service) + fc.Result = res + return ec.marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query__service(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "sdl": + return ec.fieldContext__Service_sdl(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type _Service", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(fc.Args["name"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectSchema() + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Schema) + fc.Result = res + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) __Service_sdl(ctx context.Context, field graphql.CollectedField, obj *fedruntime.Service) (ret graphql.Marshaler) { + fc, err := ec.fieldContext__Service_sdl(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SDL, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalOString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext__Service_sdl(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "_Service", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Locations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __DirectiveLocation does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsRepeatable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SpecifiedByURL(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +func (ec *executionContext) unmarshalInputCursorPaginationIn(ctx context.Context, obj interface{}) (repos.CursorPagination, error) { + var it repos.CursorPagination + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + if _, present := asMap["orderBy"]; !present { + asMap["orderBy"] = "_id" + } + if _, present := asMap["sortDirection"]; !present { + asMap["sortDirection"] = "ASC" + } + + fieldsInOrder := [...]string{"after", "before", "first", "last", "orderBy", "sortDirection"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "after": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.After = data + case "before": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Before = data + case "first": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.First = data + case "last": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.Last = data + case "orderBy": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orderBy")) + data, err := ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + it.OrderBy = data + case "sortDirection": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortDirection")) + data, err := ec.unmarshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx, v) + if err != nil { + return it, err + } + it.SortDirection = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn, error) { + var it model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"ip", "name"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "ip": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ip")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.IP = data + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"args", "command", "env", "envFrom", "image", "imagePullPolicy", "livenessProbe", "name", "readinessProbe", "resourceCpu", "resourceMemory", "volumes"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "args": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("args")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.Args = data + case "command": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("command")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.Command = data + case "env": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("env")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Env = data + case "envFrom": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("envFrom")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromInᚄ(ctx, v) + if err != nil { + return it, err + } + it.EnvFrom = data + case "image": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("image")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Image = data + case "imagePullPolicy": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("imagePullPolicy")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ImagePullPolicy = data + case "livenessProbe": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("livenessProbe")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx, v) + if err != nil { + return it, err + } + it.LivenessProbe = data + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "readinessProbe": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("readinessProbe")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx, v) + if err != nil { + return it, err + } + it.ReadinessProbe = data + case "resourceCpu": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resourceCpu")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResourceIn(ctx, v) + if err != nil { + return it, err + } + it.ResourceCPU = data + case "resourceMemory": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("resourceMemory")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResourceIn(ctx, v) + if err != nil { + return it, err + } + it.ResourceMemory = data + case "volumes": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("volumes")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Volumes = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"containers", "displayName", "freeze", "hpa", "intercept", "nodeSelector", "region", "replicas", "serviceAccount", "services", "tolerations", "topologySpreadConstraints"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "containers": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("containers")) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Containers = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "freeze": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("freeze")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Freeze = data + case "hpa": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hpa")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HPAIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HPAIn(ctx, v) + if err != nil { + return it, err + } + it.Hpa = data + case "intercept": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("intercept")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1InterceptIn(ctx, v) + if err != nil { + return it, err + } + it.Intercept = data + case "nodeSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeSelector")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.NodeSelector = data + case "region": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("region")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Region = data + case "replicas": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("replicas")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Replicas = data + case "serviceAccount": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceAccount")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ServiceAccount = data + case "services": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("services")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Services = data + case "tolerations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tolerations")) + data, err := ec.unmarshalOK8s__io___api___core___v1__TolerationIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Tolerations = data + case "topologySpreadConstraints": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("topologySpreadConstraints")) + data, err := ec.unmarshalOK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintInᚄ(ctx, v) + if err != nil { + return it, err + } + it.TopologySpreadConstraints = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "port", "targetPort", "type"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "port": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.Port = data + case "targetPort": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("targetPort")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.TargetPort = data + case "type": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Type = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"key", "optional", "refKey", "refName", "type", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Key = data + case "optional": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("optional")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Optional = data + case "refKey": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refKey")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.RefKey = data + case "refName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.RefName = data + case "type": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, v) + if err != nil { + return it, err + } + it.Type = data + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Value = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ContainerResourceIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ContainerResourceIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"max", "min"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "max": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("max")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Max = data + case "min": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("min")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Min = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"items", "mountPath", "refName", "type"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "items": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("items")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemInᚄ(ctx, v) + if err != nil { + return it, err + } + it.Items = data + case "mountPath": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("mountPath")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.MountPath = data + case "refName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.RefName = data + case "type": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, v) + if err != nil { + return it, err + } + it.Type = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"fileName", "key"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "fileName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FileName = data + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Key = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"refName", "type"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "refName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("refName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.RefName = data + case "type": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx, v) + if err != nil { + return it, err + } + it.Type = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HPAIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1HPAIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1HPAIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"enabled", "maxReplicas", "minReplicas", "thresholdCpu", "thresholdMemory"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "enabled": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) + data, err := ec.unmarshalNBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.Enabled = data + case "maxReplicas": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxReplicas")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.MaxReplicas = data + case "minReplicas": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minReplicas")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.MinReplicas = data + case "thresholdCpu": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thresholdCpu")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.ThresholdCPU = data + case "thresholdMemory": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("thresholdMemory")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.ThresholdMemory = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"httpHeaders", "path", "port"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "httpHeaders": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("httpHeaders")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.HTTPHeaders = data + case "path": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Path = data + case "port": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.Port = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1InterceptIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1InterceptIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"enabled", "toDevice"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "enabled": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) + data, err := ec.unmarshalNBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.Enabled = data + case "toDevice": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("toDevice")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ToDevice = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ProbeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ProbeIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"failureThreshold", "httpGet", "initialDelay", "interval", "shell", "tcp", "type"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "failureThreshold": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("failureThreshold")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.FailureThreshold = data + case "httpGet": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("httpGet")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn(ctx, v) + if err != nil { + return it, err + } + it.HTTPGet = data + case "initialDelay": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("initialDelay")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.InitialDelay = data + case "interval": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("interval")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Interval = data + case "shell": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("shell")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbeIn(ctx, v) + if err != nil { + return it, err + } + it.Shell = data + case "tcp": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tcp")) + data, err := ec.unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbeIn(ctx, v) + if err != nil { + return it, err + } + it.TCP = data + case "type": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Type = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"command"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "command": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("command")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.Command = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn(ctx context.Context, obj interface{}) (model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn, error) { + var it model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"port"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "port": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("port")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.Port = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputIOTAppIn(ctx context.Context, obj interface{}) (entities.IOTApp, error) { + var it entities.IOTApp + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"apiVersion", "displayName", "enabled", "kind", "metadata", "spec"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "apiVersion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiVersion")) + data, err := ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + it.APIVersion = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "enabled": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("enabled")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Enabled = data + case "kind": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) + data, err := ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + it.Kind = data + case "metadata": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metadata")) + data, err := ec.unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.IOTAppIn().Metadata(ctx, &it, data); err != nil { + return it, err + } + case "spec": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("spec")) + data, err := ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.IOTAppIn().Spec(ctx, &it, data); err != nil { + return it, err + } + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputIOTDeploymentIn(ctx context.Context, obj interface{}) (entities.IOTDeployment, error) { + var it entities.IOTDeployment + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"CIDR", "displayName", "exposedServices", "name"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "CIDR": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("CIDR")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.CIDR = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "exposedServices": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("exposedServices")) + data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceInᚄ(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.IOTDeploymentIn().ExposedServices(ctx, &it, data); err != nil { + return it, err + } + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputIOTDeviceBlueprintIn(ctx context.Context, obj interface{}) (entities.IOTDeviceBlueprint, error) { + var it entities.IOTDeviceBlueprint + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"bluePrintType", "displayName", "name", "version"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "bluePrintType": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bluePrintType")) + data, err := ec.unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.IOTDeviceBlueprintIn().BluePrintType(ctx, &it, data); err != nil { + return it, err + } + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "version": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("version")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Version = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputIOTDeviceIn(ctx context.Context, obj interface{}) (entities.IOTDevice, error) { + var it entities.IOTDevice + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"blueprint", "deployment", "displayName", "ip", "name", "podCIDR", "publicKey", "serviceCIDR", "version"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "blueprint": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("blueprint")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Blueprint = data + case "deployment": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("deployment")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Deployment = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "ip": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ip")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.IP = data + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "podCIDR": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("podCIDR")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.PodCIDR = data + case "publicKey": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("publicKey")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.PublicKey = data + case "serviceCIDR": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceCIDR")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ServiceCIDR = data + case "version": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("version")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Version = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputIOTEnvironmentIn(ctx context.Context, obj interface{}) (entities.IOTEnvironment, error) { + var it entities.IOTEnvironment + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"displayName", "name"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputIOTProjectIn(ctx context.Context, obj interface{}) (entities.IOTProject, error) { + var it entities.IOTProject + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"displayName", "name"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TolerationIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1TolerationIn, error) { + var it model.K8sIoAPICoreV1TolerationIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"effect", "key", "operator", "tolerationSeconds", "value"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "effect": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("effect")) + data, err := ec.unmarshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx, v) + if err != nil { + return it, err + } + it.Effect = data + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Key = data + case "operator": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("operator")) + data, err := ec.unmarshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx, v) + if err != nil { + return it, err + } + it.Operator = data + case "tolerationSeconds": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tolerationSeconds")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.TolerationSeconds = data + case "value": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Value = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputK8s__io___api___core___v1__TopologySpreadConstraintIn(ctx context.Context, obj interface{}) (model.K8sIoAPICoreV1TopologySpreadConstraintIn, error) { + var it model.K8sIoAPICoreV1TopologySpreadConstraintIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"labelSelector", "matchLabelKeys", "maxSkew", "minDomains", "nodeAffinityPolicy", "nodeTaintsPolicy", "topologyKey", "whenUnsatisfiable"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorIn(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "matchLabelKeys": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchLabelKeys")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.MatchLabelKeys = data + case "maxSkew": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxSkew")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.MaxSkew = data + case "minDomains": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minDomains")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.MinDomains = data + case "nodeAffinityPolicy": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeAffinityPolicy")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NodeAffinityPolicy = data + case "nodeTaintsPolicy": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodeTaintsPolicy")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NodeTaintsPolicy = data + case "topologyKey": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("topologyKey")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.TopologyKey = data + case "whenUnsatisfiable": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("whenUnsatisfiable")) + data, err := ec.unmarshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx, v) + if err != nil { + return it, err + } + it.WhenUnsatisfiable = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn(ctx context.Context, obj interface{}) (model.K8sIoApimachineryPkgApisMetaV1LabelSelectorIn, error) { + var it model.K8sIoApimachineryPkgApisMetaV1LabelSelectorIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"matchExpressions", "matchLabels"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "matchExpressions": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchExpressions")) + data, err := ec.unmarshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementInᚄ(ctx, v) + if err != nil { + return it, err + } + it.MatchExpressions = data + case "matchLabels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchLabels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.MatchLabels = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn(ctx context.Context, obj interface{}) (model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn, error) { + var it model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"key", "operator", "values"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "key": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("key")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Key = data + case "operator": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("operator")) + data, err := ec.unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx, v) + if err != nil { + return it, err + } + it.Operator = data + case "values": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("values")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.Values = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMatchFilterIn(ctx context.Context, obj interface{}) (repos.MatchFilter, error) { + var it repos.MatchFilter + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"array", "exact", "matchType", "regex"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "array": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("array")) + data, err := ec.unmarshalOAny2ᚕinterfaceᚄ(ctx, v) + if err != nil { + return it, err + } + it.Array = data + case "exact": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("exact")) + data, err := ec.unmarshalOAny2interface(ctx, v) + if err != nil { + return it, err + } + it.Exact = data + case "matchType": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("matchType")) + data, err := ec.unmarshalNMatchFilterMatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx, v) + if err != nil { + return it, err + } + it.MatchType = data + case "regex": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("regex")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Regex = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputMetadataIn(ctx context.Context, obj interface{}) (v1.ObjectMeta, error) { + var it v1.ObjectMeta + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"annotations", "labels", "name", "namespace"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MetadataIn().Annotations(ctx, &it, data); err != nil { + return it, err + } + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + if err = ec.resolvers.MetadataIn().Labels(ctx, &it, data); err != nil { + return it, err + } + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalOString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSearchIOTApps(ctx context.Context, obj interface{}) (model.SearchIOTApps, error) { + var it model.SearchIOTApps + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text", "isReady", "markedForDeletion"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + case "isReady": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + case "markedForDeletion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.MarkedForDeletion = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSearchIOTDeployments(ctx context.Context, obj interface{}) (model.SearchIOTDeployments, error) { + var it model.SearchIOTDeployments + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text", "isReady", "markedForDeletion"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + case "isReady": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + case "markedForDeletion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.MarkedForDeletion = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSearchIOTDeviceBlueprints(ctx context.Context, obj interface{}) (model.SearchIOTDeviceBlueprints, error) { + var it model.SearchIOTDeviceBlueprints + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text", "isReady", "markedForDeletion"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + case "isReady": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + case "markedForDeletion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.MarkedForDeletion = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSearchIOTDevices(ctx context.Context, obj interface{}) (model.SearchIOTDevices, error) { + var it model.SearchIOTDevices + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text", "isReady", "markedForDeletion"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + case "isReady": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + case "markedForDeletion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.MarkedForDeletion = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSearchIOTEnvironments(ctx context.Context, obj interface{}) (model.SearchIOTEnvironments, error) { + var it model.SearchIOTEnvironments + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text", "projectName", "isReady", "markedForDeletion"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + case "projectName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("projectName")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.ProjectName = data + case "isReady": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + case "markedForDeletion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.MarkedForDeletion = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputSearchIOTProjects(ctx context.Context, obj interface{}) (model.SearchIOTProjects, error) { + var it model.SearchIOTProjects + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"text", "isReady", "markedForDeletion"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "text": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("text")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.Text = data + case "isReady": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("isReady")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.IsReady = data + case "markedForDeletion": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("markedForDeletion")) + data, err := ec.unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx, v) + if err != nil { + return it, err + } + it.MarkedForDeletion = data + } + } + + return it, nil +} + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +// endregion ************************** interface.gotpl *************************** + +// region **************************** object.gotpl **************************** + +var cursorPaginationImplementors = []string{"CursorPagination"} + +func (ec *executionContext) _CursorPagination(ctx context.Context, sel ast.SelectionSet, obj *repos.CursorPagination) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, cursorPaginationImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("CursorPagination") + case "after": + out.Values[i] = ec._CursorPagination_after(ctx, field, obj) + case "before": + out.Values[i] = ec._CursorPagination_before(ctx, field, obj) + case "first": + out.Values[i] = ec._CursorPagination_first(ctx, field, obj) + case "last": + out.Values[i] = ec._CursorPagination_last(ctx, field, obj) + case "orderBy": + out.Values[i] = ec._CursorPagination_orderBy(ctx, field, obj) + case "sortDirection": + out.Values[i] = ec._CursorPagination_sortDirection(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceImplementors = []string{"Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService"} + +func (ec *executionContext) _Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService") + case "ip": + out.Values[i] = ec._Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_ip(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec._Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___api___common__CreatedOrUpdatedByImplementors = []string{"Github__com___kloudlite___api___common__CreatedOrUpdatedBy"} + +func (ec *executionContext) _Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, obj *common.CreatedOrUpdatedBy) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___api___common__CreatedOrUpdatedByImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___api___common__CreatedOrUpdatedBy") + case "userEmail": + out.Values[i] = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userEmail(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "userId": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userId(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "userName": + out.Values[i] = ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy_userName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__AppContainerImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__AppContainer"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppContainer(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__AppContainerImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__AppContainer") + case "args": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_args(ctx, field, obj) + case "command": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_command(ctx, field, obj) + case "env": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_env(ctx, field, obj) + case "envFrom": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_envFrom(ctx, field, obj) + case "image": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_image(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "imagePullPolicy": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_imagePullPolicy(ctx, field, obj) + case "livenessProbe": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_livenessProbe(ctx, field, obj) + case "name": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "readinessProbe": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_readinessProbe(ctx, field, obj) + case "resourceCpu": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceCpu(ctx, field, obj) + case "resourceMemory": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_resourceMemory(ctx, field, obj) + case "volumes": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer_volumes(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__AppSpecImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__AppSpec"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__AppSpecImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__AppSpec") + case "containers": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_containers(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "displayName": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_displayName(ctx, field, obj) + case "freeze": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_freeze(ctx, field, obj) + case "hpa": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_hpa(ctx, field, obj) + case "intercept": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_intercept(ctx, field, obj) + case "nodeSelector": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_nodeSelector(ctx, field, obj) + case "region": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_region(ctx, field, obj) + case "replicas": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_replicas(ctx, field, obj) + case "serviceAccount": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_serviceAccount(ctx, field, obj) + case "services": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_services(ctx, field, obj) + case "tolerations": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_tolerations(ctx, field, obj) + case "topologySpreadConstraints": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec_topologySpreadConstraints(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__AppSvcImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__AppSvc"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__AppSvc(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__AppSvcImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__AppSvc") + case "name": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc_name(ctx, field, obj) + case "port": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc_port(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "targetPort": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc_targetPort(ctx, field, obj) + case "type": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc_type(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__ContainerEnvImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ContainerEnvImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv") + case "key": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "optional": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_optional(ctx, field, obj) + case "refKey": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refKey(ctx, field, obj) + case "refName": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_refName(ctx, field, obj) + case "type": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_type(ctx, field, obj) + case "value": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__ContainerResourceImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ContainerResource"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerResource(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerResource) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ContainerResourceImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ContainerResource") + case "max": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_max(ctx, field, obj) + case "min": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerResource_min(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume") + case "items": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_items(ctx, field, obj) + case "mountPath": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_mountPath(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "refName": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_refName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "type": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem") + case "fileName": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_fileName(ctx, field, obj) + case "key": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__EnvFromImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__EnvFrom"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__EnvFrom(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__EnvFromImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__EnvFrom") + case "refName": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_refName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "type": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__EnvFrom_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__HPAImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__HPA"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HPA(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1Hpa) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__HPAImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__HPA") + case "enabled": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HPA_enabled(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "maxReplicas": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HPA_maxReplicas(ctx, field, obj) + case "minReplicas": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HPA_minReplicas(ctx, field, obj) + case "thresholdCpu": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdCpu(ctx, field, obj) + case "thresholdMemory": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HPA_thresholdMemory(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe") + case "httpHeaders": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_httpHeaders(ctx, field, obj) + case "path": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_path(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "port": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe_port(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__InterceptImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__Intercept"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Intercept(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1Intercept) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__InterceptImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__Intercept") + case "enabled": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_enabled(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "toDevice": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept_toDevice(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__ProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__Probe"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__Probe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1Probe) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ProbeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__Probe") + case "failureThreshold": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_failureThreshold(ctx, field, obj) + case "httpGet": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_httpGet(ctx, field, obj) + case "initialDelay": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_initialDelay(ctx, field, obj) + case "interval": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_interval(ctx, field, obj) + case "shell": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_shell(ctx, field, obj) + case "tcp": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_tcp(ctx, field, obj) + case "type": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__Probe_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__ShellProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__ShellProbe"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__ShellProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__ShellProbeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__ShellProbe") + case "command": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__ShellProbe_command(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___apis___crds___v1__TcpProbeImplementors = []string{"Github__com___kloudlite___operator___apis___crds___v1__TcpProbe"} + +func (ec *executionContext) _Github__com___kloudlite___operator___apis___crds___v1__TcpProbe(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___apis___crds___v1__TcpProbeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___apis___crds___v1__TcpProbe") + case "port": + out.Values[i] = ec._Github__com___kloudlite___operator___apis___crds___v1__TcpProbe_port(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___pkg___operator__CheckImplementors = []string{"Github__com___kloudlite___operator___pkg___operator__Check"} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Check(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorPkgOperatorCheck) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___pkg___operator__CheckImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___pkg___operator__Check") + case "debug": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_debug(ctx, field, obj) + case "error": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_error(ctx, field, obj) + case "generation": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_generation(ctx, field, obj) + case "info": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_info(ctx, field, obj) + case "message": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_message(ctx, field, obj) + case "startedAt": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_startedAt(ctx, field, obj) + case "state": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_state(ctx, field, obj) + case "status": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Check_status(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___pkg___operator__CheckMetaImplementors = []string{"Github__com___kloudlite___operator___pkg___operator__CheckMeta"} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__CheckMeta(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___pkg___operator__CheckMetaImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___pkg___operator__CheckMeta") + case "debug": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta_debug(ctx, field, obj) + case "description": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta_description(ctx, field, obj) + case "name": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "title": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta_title(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___pkg___operator__ResourceRefImplementors = []string{"Github__com___kloudlite___operator___pkg___operator__ResourceRef"} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__ResourceRef(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorPkgOperatorResourceRef) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___pkg___operator__ResourceRefImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___pkg___operator__ResourceRef") + case "apiVersion": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef_apiVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "kind": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "namespace": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef_namespace(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___pkg___operator__StatusImplementors = []string{"Github__com___kloudlite___operator___pkg___operator__Status"} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___operator__Status(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorPkgOperatorStatus) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___pkg___operator__StatusImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___pkg___operator__Status") + case "checkList": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_checkList(ctx, field, obj) + case "checks": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_checks(ctx, field, obj) + case "isReady": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_isReady(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "lastReadyGeneration": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_lastReadyGeneration(ctx, field, obj) + case "lastReconcileTime": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_lastReconcileTime(ctx, field, obj) + case "message": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_message(ctx, field, obj) + case "resources": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___operator__Status_resources(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var github__com___kloudlite___operator___pkg___raw____json__RawJsonImplementors = []string{"Github__com___kloudlite___operator___pkg___raw____json__RawJson"} + +func (ec *executionContext) _Github__com___kloudlite___operator___pkg___raw____json__RawJson(ctx context.Context, sel ast.SelectionSet, obj *model.GithubComKloudliteOperatorPkgRawJSONRawJSON) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, github__com___kloudlite___operator___pkg___raw____json__RawJsonImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Github__com___kloudlite___operator___pkg___raw____json__RawJson") + case "RawMessage": + out.Values[i] = ec._Github__com___kloudlite___operator___pkg___raw____json__RawJson_RawMessage(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTAppImplementors = []string{"IOTApp"} + +func (ec *executionContext) _IOTApp(ctx context.Context, sel ast.SelectionSet, obj *entities.IOTApp) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTAppImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTApp") + case "accountName": + out.Values[i] = ec._IOTApp_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "apiVersion": + out.Values[i] = ec._IOTApp_apiVersion(ctx, field, obj) + case "createdBy": + out.Values[i] = ec._IOTApp_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTApp_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "deviceBlueprintName": + out.Values[i] = ec._IOTApp_deviceBlueprintName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "displayName": + out.Values[i] = ec._IOTApp_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "enabled": + out.Values[i] = ec._IOTApp_enabled(ctx, field, obj) + case "environmentName": + out.Values[i] = ec._IOTApp_environmentName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._IOTApp_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "kind": + out.Values[i] = ec._IOTApp_kind(ctx, field, obj) + case "lastUpdatedBy": + out.Values[i] = ec._IOTApp_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._IOTApp_markedForDeletion(ctx, field, obj) + case "metadata": + out.Values[i] = ec._IOTApp_metadata(ctx, field, obj) + case "projectName": + out.Values[i] = ec._IOTApp_projectName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._IOTApp_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "spec": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTApp_spec(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "status": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTApp_status(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTApp_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTAppEdgeImplementors = []string{"IOTAppEdge"} + +func (ec *executionContext) _IOTAppEdge(ctx context.Context, sel ast.SelectionSet, obj *model.IOTAppEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTAppEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTAppEdge") + case "cursor": + out.Values[i] = ec._IOTAppEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._IOTAppEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTAppPaginatedRecordsImplementors = []string{"IOTAppPaginatedRecords"} + +func (ec *executionContext) _IOTAppPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.IOTAppPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTAppPaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTAppPaginatedRecords") + case "edges": + out.Values[i] = ec._IOTAppPaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IOTAppPaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._IOTAppPaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeploymentImplementors = []string{"IOTDeployment"} + +func (ec *executionContext) _IOTDeployment(ctx context.Context, sel ast.SelectionSet, obj *entities.IOTDeployment) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeploymentImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeployment") + case "accountName": + out.Values[i] = ec._IOTDeployment_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "CIDR": + out.Values[i] = ec._IOTDeployment_CIDR(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createdBy": + out.Values[i] = ec._IOTDeployment_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDeployment_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "displayName": + out.Values[i] = ec._IOTDeployment_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "environmentName": + out.Values[i] = ec._IOTDeployment_environmentName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "exposedServices": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDeployment_exposedServices(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "id": + out.Values[i] = ec._IOTDeployment_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "lastUpdatedBy": + out.Values[i] = ec._IOTDeployment_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._IOTDeployment_markedForDeletion(ctx, field, obj) + case "name": + out.Values[i] = ec._IOTDeployment_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "projectName": + out.Values[i] = ec._IOTDeployment_projectName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._IOTDeployment_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDeployment_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeploymentEdgeImplementors = []string{"IOTDeploymentEdge"} + +func (ec *executionContext) _IOTDeploymentEdge(ctx context.Context, sel ast.SelectionSet, obj *model.IOTDeploymentEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeploymentEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeploymentEdge") + case "cursor": + out.Values[i] = ec._IOTDeploymentEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._IOTDeploymentEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeploymentPaginatedRecordsImplementors = []string{"IOTDeploymentPaginatedRecords"} + +func (ec *executionContext) _IOTDeploymentPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.IOTDeploymentPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeploymentPaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeploymentPaginatedRecords") + case "edges": + out.Values[i] = ec._IOTDeploymentPaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IOTDeploymentPaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._IOTDeploymentPaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeviceImplementors = []string{"IOTDevice"} + +func (ec *executionContext) _IOTDevice(ctx context.Context, sel ast.SelectionSet, obj *entities.IOTDevice) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeviceImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDevice") + case "accountName": + out.Values[i] = ec._IOTDevice_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "blueprint": + out.Values[i] = ec._IOTDevice_blueprint(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createdBy": + out.Values[i] = ec._IOTDevice_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDevice_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "deployment": + out.Values[i] = ec._IOTDevice_deployment(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "displayName": + out.Values[i] = ec._IOTDevice_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "environmentName": + out.Values[i] = ec._IOTDevice_environmentName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._IOTDevice_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "ip": + out.Values[i] = ec._IOTDevice_ip(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "lastUpdatedBy": + out.Values[i] = ec._IOTDevice_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._IOTDevice_markedForDeletion(ctx, field, obj) + case "name": + out.Values[i] = ec._IOTDevice_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "podCIDR": + out.Values[i] = ec._IOTDevice_podCIDR(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "projectName": + out.Values[i] = ec._IOTDevice_projectName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "publicKey": + out.Values[i] = ec._IOTDevice_publicKey(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._IOTDevice_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "serviceCIDR": + out.Values[i] = ec._IOTDevice_serviceCIDR(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDevice_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "version": + out.Values[i] = ec._IOTDevice_version(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeviceBlueprintImplementors = []string{"IOTDeviceBlueprint"} + +func (ec *executionContext) _IOTDeviceBlueprint(ctx context.Context, sel ast.SelectionSet, obj *entities.IOTDeviceBlueprint) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeviceBlueprintImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeviceBlueprint") + case "accountName": + out.Values[i] = ec._IOTDeviceBlueprint_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "bluePrintType": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDeviceBlueprint_bluePrintType(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "createdBy": + out.Values[i] = ec._IOTDeviceBlueprint_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDeviceBlueprint_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "displayName": + out.Values[i] = ec._IOTDeviceBlueprint_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "environmentName": + out.Values[i] = ec._IOTDeviceBlueprint_environmentName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._IOTDeviceBlueprint_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "lastUpdatedBy": + out.Values[i] = ec._IOTDeviceBlueprint_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._IOTDeviceBlueprint_markedForDeletion(ctx, field, obj) + case "name": + out.Values[i] = ec._IOTDeviceBlueprint_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "projectName": + out.Values[i] = ec._IOTDeviceBlueprint_projectName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._IOTDeviceBlueprint_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTDeviceBlueprint_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "version": + out.Values[i] = ec._IOTDeviceBlueprint_version(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeviceBlueprintEdgeImplementors = []string{"IOTDeviceBlueprintEdge"} + +func (ec *executionContext) _IOTDeviceBlueprintEdge(ctx context.Context, sel ast.SelectionSet, obj *model.IOTDeviceBlueprintEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeviceBlueprintEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeviceBlueprintEdge") + case "cursor": + out.Values[i] = ec._IOTDeviceBlueprintEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._IOTDeviceBlueprintEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeviceBlueprintPaginatedRecordsImplementors = []string{"IOTDeviceBlueprintPaginatedRecords"} + +func (ec *executionContext) _IOTDeviceBlueprintPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.IOTDeviceBlueprintPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeviceBlueprintPaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeviceBlueprintPaginatedRecords") + case "edges": + out.Values[i] = ec._IOTDeviceBlueprintPaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IOTDeviceBlueprintPaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._IOTDeviceBlueprintPaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDeviceEdgeImplementors = []string{"IOTDeviceEdge"} + +func (ec *executionContext) _IOTDeviceEdge(ctx context.Context, sel ast.SelectionSet, obj *model.IOTDeviceEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDeviceEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDeviceEdge") + case "cursor": + out.Values[i] = ec._IOTDeviceEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._IOTDeviceEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTDevicePaginatedRecordsImplementors = []string{"IOTDevicePaginatedRecords"} + +func (ec *executionContext) _IOTDevicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.IOTDevicePaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTDevicePaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTDevicePaginatedRecords") + case "edges": + out.Values[i] = ec._IOTDevicePaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IOTDevicePaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._IOTDevicePaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTEnvironmentImplementors = []string{"IOTEnvironment"} + +func (ec *executionContext) _IOTEnvironment(ctx context.Context, sel ast.SelectionSet, obj *entities.IOTEnvironment) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTEnvironmentImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTEnvironment") + case "accountName": + out.Values[i] = ec._IOTEnvironment_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createdBy": + out.Values[i] = ec._IOTEnvironment_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTEnvironment_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "displayName": + out.Values[i] = ec._IOTEnvironment_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._IOTEnvironment_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "lastUpdatedBy": + out.Values[i] = ec._IOTEnvironment_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._IOTEnvironment_markedForDeletion(ctx, field, obj) + case "name": + out.Values[i] = ec._IOTEnvironment_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "projectName": + out.Values[i] = ec._IOTEnvironment_projectName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._IOTEnvironment_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTEnvironment_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTEnvironmentEdgeImplementors = []string{"IOTEnvironmentEdge"} + +func (ec *executionContext) _IOTEnvironmentEdge(ctx context.Context, sel ast.SelectionSet, obj *model.IOTEnvironmentEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTEnvironmentEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTEnvironmentEdge") + case "cursor": + out.Values[i] = ec._IOTEnvironmentEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._IOTEnvironmentEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTEnvironmentPaginatedRecordsImplementors = []string{"IOTEnvironmentPaginatedRecords"} + +func (ec *executionContext) _IOTEnvironmentPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.IOTEnvironmentPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTEnvironmentPaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTEnvironmentPaginatedRecords") + case "edges": + out.Values[i] = ec._IOTEnvironmentPaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IOTEnvironmentPaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._IOTEnvironmentPaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTProjectImplementors = []string{"IOTProject"} + +func (ec *executionContext) _IOTProject(ctx context.Context, sel ast.SelectionSet, obj *entities.IOTProject) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTProjectImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTProject") + case "accountName": + out.Values[i] = ec._IOTProject_accountName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createdBy": + out.Values[i] = ec._IOTProject_createdBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "creationTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTProject_creationTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "displayName": + out.Values[i] = ec._IOTProject_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "id": + out.Values[i] = ec._IOTProject_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "lastUpdatedBy": + out.Values[i] = ec._IOTProject_lastUpdatedBy(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "markedForDeletion": + out.Values[i] = ec._IOTProject_markedForDeletion(ctx, field, obj) + case "name": + out.Values[i] = ec._IOTProject_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "recordVersion": + out.Values[i] = ec._IOTProject_recordVersion(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._IOTProject_updateTime(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTProjectEdgeImplementors = []string{"IOTProjectEdge"} + +func (ec *executionContext) _IOTProjectEdge(ctx context.Context, sel ast.SelectionSet, obj *model.IOTProjectEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTProjectEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTProjectEdge") + case "cursor": + out.Values[i] = ec._IOTProjectEdge_cursor(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "node": + out.Values[i] = ec._IOTProjectEdge_node(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var iOTProjectPaginatedRecordsImplementors = []string{"IOTProjectPaginatedRecords"} + +func (ec *executionContext) _IOTProjectPaginatedRecords(ctx context.Context, sel ast.SelectionSet, obj *model.IOTProjectPaginatedRecords) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, iOTProjectPaginatedRecordsImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("IOTProjectPaginatedRecords") + case "edges": + out.Values[i] = ec._IOTProjectPaginatedRecords_edges(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "pageInfo": + out.Values[i] = ec._IOTProjectPaginatedRecords_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._IOTProjectPaginatedRecords_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var k8s__io___api___core___v1__TolerationImplementors = []string{"K8s__io___api___core___v1__Toleration"} + +func (ec *executionContext) _K8s__io___api___core___v1__Toleration(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1Toleration) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__TolerationImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__Toleration") + case "effect": + out.Values[i] = ec._K8s__io___api___core___v1__Toleration_effect(ctx, field, obj) + case "key": + out.Values[i] = ec._K8s__io___api___core___v1__Toleration_key(ctx, field, obj) + case "operator": + out.Values[i] = ec._K8s__io___api___core___v1__Toleration_operator(ctx, field, obj) + case "tolerationSeconds": + out.Values[i] = ec._K8s__io___api___core___v1__Toleration_tolerationSeconds(ctx, field, obj) + case "value": + out.Values[i] = ec._K8s__io___api___core___v1__Toleration_value(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var k8s__io___api___core___v1__TopologySpreadConstraintImplementors = []string{"K8s__io___api___core___v1__TopologySpreadConstraint"} + +func (ec *executionContext) _K8s__io___api___core___v1__TopologySpreadConstraint(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoAPICoreV1TopologySpreadConstraint) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___api___core___v1__TopologySpreadConstraintImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("K8s__io___api___core___v1__TopologySpreadConstraint") + case "labelSelector": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_labelSelector(ctx, field, obj) + case "matchLabelKeys": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_matchLabelKeys(ctx, field, obj) + case "maxSkew": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_maxSkew(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "minDomains": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_minDomains(ctx, field, obj) + case "nodeAffinityPolicy": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_nodeAffinityPolicy(ctx, field, obj) + case "nodeTaintsPolicy": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_nodeTaintsPolicy(ctx, field, obj) + case "topologyKey": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_topologyKey(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "whenUnsatisfiable": + out.Values[i] = ec._K8s__io___api___core___v1__TopologySpreadConstraint_whenUnsatisfiable(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var k8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorImplementors = []string{"K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector"} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelector) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector") + case "matchExpressions": + out.Values[i] = ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchExpressions(ctx, field, obj) + case "matchLabels": + out.Values[i] = ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector_matchLabels(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var k8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementImplementors = []string{"K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement"} + +func (ec *executionContext) _K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement(ctx context.Context, sel ast.SelectionSet, obj *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, k8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement") + case "key": + out.Values[i] = ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_key(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "operator": + out.Values[i] = ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_operator(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "values": + out.Values[i] = ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement_values(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var matchFilterImplementors = []string{"MatchFilter"} + +func (ec *executionContext) _MatchFilter(ctx context.Context, sel ast.SelectionSet, obj *repos.MatchFilter) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, matchFilterImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("MatchFilter") + case "array": + out.Values[i] = ec._MatchFilter_array(ctx, field, obj) + case "exact": + out.Values[i] = ec._MatchFilter_exact(ctx, field, obj) + case "matchType": + out.Values[i] = ec._MatchFilter_matchType(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "regex": + out.Values[i] = ec._MatchFilter_regex(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var metadataImplementors = []string{"Metadata"} + +func (ec *executionContext) _Metadata(ctx context.Context, sel ast.SelectionSet, obj *v1.ObjectMeta) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, metadataImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Metadata") + case "annotations": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Metadata_annotations(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "creationTimestamp": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Metadata_creationTimestamp(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "deletionTimestamp": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Metadata_deletionTimestamp(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "generation": + out.Values[i] = ec._Metadata_generation(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "labels": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Metadata_labels(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "name": + out.Values[i] = ec._Metadata_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "namespace": + out.Values[i] = ec._Metadata_namespace(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var mutationImplementors = []string{"Mutation"} + +func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Mutation", + }) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Mutation") + case "iot_createProject": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_createProject(ctx, field) + }) + case "iot_updateProject": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_updateProject(ctx, field) + }) + case "iot_deleteProject": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_deleteProject(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "iot_createEnvironment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_createEnvironment(ctx, field) + }) + case "iot_updateEnvironment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_updateEnvironment(ctx, field) + }) + case "iot_deleteEnvironment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_deleteEnvironment(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "iot_createDevice": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_createDevice(ctx, field) + }) + case "iot_updateDevice": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_updateDevice(ctx, field) + }) + case "iot_deleteDevice": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_deleteDevice(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "iot_createDeviceBlueprint": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_createDeviceBlueprint(ctx, field) + }) + case "iot_updateDeviceBlueprint": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_updateDeviceBlueprint(ctx, field) + }) + case "iot_deleteDeviceBlueprint": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_deleteDeviceBlueprint(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "iot_createDeployment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_createDeployment(ctx, field) + }) + case "iot_updateDeployment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_updateDeployment(ctx, field) + }) + case "iot_deleteDeployment": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_deleteDeployment(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "iot_createApp": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_createApp(ctx, field) + }) + case "iot_updateApp": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_updateApp(ctx, field) + }) + case "iot_deleteApp": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_iot_deleteApp(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var pageInfoImplementors = []string{"PageInfo"} + +func (ec *executionContext) _PageInfo(ctx context.Context, sel ast.SelectionSet, obj *model.PageInfo) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, pageInfoImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("PageInfo") + case "endCursor": + out.Values[i] = ec._PageInfo_endCursor(ctx, field, obj) + case "hasNextPage": + out.Values[i] = ec._PageInfo_hasNextPage(ctx, field, obj) + case "hasPreviousPage": + out.Values[i] = ec._PageInfo_hasPreviousPage(ctx, field, obj) + case "startCursor": + out.Values[i] = ec._PageInfo_startCursor(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var queryImplementors = []string{"Query"} + +func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Query", + }) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Query") + case "iot_listProjects": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_listProjects(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_getProject": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_getProject(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_listEnvironments": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_listEnvironments(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_getEnvironment": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_getEnvironment(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_listDevices": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_listDevices(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_getDevice": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_getDevice(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_listDeviceBlueprints": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_listDeviceBlueprints(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_getDeviceBlueprint": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_getDeviceBlueprint(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_listDeployments": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_listDeployments(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_getDeployment": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_getDeployment(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_listApps": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_listApps(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "iot_getApp": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_iot_getApp(ctx, field) + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "_service": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query__service(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "__type": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___type(ctx, field) + }) + case "__schema": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Query___schema(ctx, field) + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var _ServiceImplementors = []string{"_Service"} + +func (ec *executionContext) __Service(ctx context.Context, sel ast.SelectionSet, obj *fedruntime.Service) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, _ServiceImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("_Service") + case "sdl": + out.Values[i] = ec.__Service_sdl(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var __DirectiveImplementors = []string{"__Directive"} + +func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Directive") + case "name": + out.Values[i] = ec.___Directive_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "description": + out.Values[i] = ec.___Directive_description(ctx, field, obj) + case "locations": + out.Values[i] = ec.___Directive_locations(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "args": + out.Values[i] = ec.___Directive_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "isRepeatable": + out.Values[i] = ec.___Directive_isRepeatable(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var __EnumValueImplementors = []string{"__EnumValue"} + +func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__EnumValue") + case "name": + out.Values[i] = ec.___EnumValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "description": + out.Values[i] = ec.___EnumValue_description(ctx, field, obj) + case "isDeprecated": + out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var __FieldImplementors = []string{"__Field"} + +func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Field") + case "name": + out.Values[i] = ec.___Field_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "description": + out.Values[i] = ec.___Field_description(ctx, field, obj) + case "args": + out.Values[i] = ec.___Field_args(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "type": + out.Values[i] = ec.___Field_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "isDeprecated": + out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "deprecationReason": + out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var __InputValueImplementors = []string{"__InputValue"} + +func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__InputValue") + case "name": + out.Values[i] = ec.___InputValue_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "description": + out.Values[i] = ec.___InputValue_description(ctx, field, obj) + case "type": + out.Values[i] = ec.___InputValue_type(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "defaultValue": + out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var __SchemaImplementors = []string{"__Schema"} + +func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Schema") + case "description": + out.Values[i] = ec.___Schema_description(ctx, field, obj) + case "types": + out.Values[i] = ec.___Schema_types(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "queryType": + out.Values[i] = ec.___Schema_queryType(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "mutationType": + out.Values[i] = ec.___Schema_mutationType(ctx, field, obj) + case "subscriptionType": + out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj) + case "directives": + out.Values[i] = ec.___Schema_directives(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var __TypeImplementors = []string{"__Type"} + +func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("__Type") + case "kind": + out.Values[i] = ec.___Type_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "name": + out.Values[i] = ec.___Type_name(ctx, field, obj) + case "description": + out.Values[i] = ec.___Type_description(ctx, field, obj) + case "fields": + out.Values[i] = ec.___Type_fields(ctx, field, obj) + case "interfaces": + out.Values[i] = ec.___Type_interfaces(ctx, field, obj) + case "possibleTypes": + out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj) + case "enumValues": + out.Values[i] = ec.___Type_enumValues(ctx, field, obj) + case "inputFields": + out.Values[i] = ec.___Type_inputFields(ctx, field, obj) + case "ofType": + out.Values[i] = ec.___Type_ofType(ctx, field, obj) + case "specifiedByURL": + out.Values[i] = ec.___Type_specifiedByURL(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +// endregion **************************** object.gotpl **************************** + +// region ***************************** type.gotpl ***************************** + +func (ec *executionContext) unmarshalNAny2interface(ctx context.Context, v interface{}) (any, error) { + res, err := graphql.UnmarshalAny(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNAny2interface(ctx context.Context, sel ast.SelectionSet, v any) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + res := graphql.MarshalAny(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNDate2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNDate2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNFieldSet2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNFieldSet2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType(ctx context.Context, v interface{}) (model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType, error) { + var res model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) graphql.Marshaler { + return v +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___api___common__CreatedOrUpdatedBy2githubᚗcomᚋkloudliteᚋapiᚋcommonᚐCreatedOrUpdatedBy(ctx context.Context, sel ast.SelectionSet, v common.CreatedOrUpdatedBy) graphql.Marshaler { + return ec._Github__com___kloudlite___api___common__CreatedOrUpdatedBy(ctx, sel, &v) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisCrdsV1AppContainer) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainer(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainer2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainer(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppContainer) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppContainer(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppContainerIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppContainerIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppContainerIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1AppSpec) graphql.Marshaler { + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx, sel, &v) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpec2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpec(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppSpec) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSpec(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSpecIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSpecIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvc(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1AppSvc) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__AppSvc(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, v interface{}) (model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret, error) { + var res model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, sel ast.SelectionSet, v model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) graphql.Marshaler { + return v +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnv(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolume(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFrom(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__EnvFrom(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, error) { + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMeta(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorCheckMeta) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___pkg___operator__CheckMeta(ctx, sel, v) +} + +func (ec *executionContext) marshalNGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRef(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorResourceRef) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Github__com___kloudlite___operator___pkg___operator__ResourceRef(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx context.Context, v interface{}) (repos.ID, error) { + tmp, err := graphql.UnmarshalString(v) + res := repos.ID(tmp) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNID2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐID(ctx context.Context, sel ast.SelectionSet, v repos.ID) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalNIOTApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx context.Context, sel ast.SelectionSet, v *entities.IOTApp) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTApp(ctx, sel, v) +} + +func (ec *executionContext) marshalNIOTAppEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTAppEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.IOTAppEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIOTAppEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTAppEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIOTAppEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTAppEdge(ctx context.Context, sel ast.SelectionSet, v *model.IOTAppEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTAppEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNIOTAppIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx context.Context, v interface{}) (entities.IOTApp, error) { + res, err := ec.unmarshalInputIOTAppIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNIOTDeployment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx context.Context, sel ast.SelectionSet, v *entities.IOTDeployment) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTDeployment(ctx, sel, v) +} + +func (ec *executionContext) marshalNIOTDeploymentEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeploymentEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.IOTDeploymentEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIOTDeploymentEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeploymentEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIOTDeploymentEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeploymentEdge(ctx context.Context, sel ast.SelectionSet, v *model.IOTDeploymentEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTDeploymentEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNIOTDeploymentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx context.Context, v interface{}) (entities.IOTDeployment, error) { + res, err := ec.unmarshalInputIOTDeploymentIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNIOTDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx context.Context, sel ast.SelectionSet, v *entities.IOTDevice) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTDevice(ctx, sel, v) +} + +func (ec *executionContext) marshalNIOTDeviceBlueprint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx context.Context, sel ast.SelectionSet, v *entities.IOTDeviceBlueprint) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTDeviceBlueprint(ctx, sel, v) +} + +func (ec *executionContext) marshalNIOTDeviceBlueprintEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceBlueprintEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.IOTDeviceBlueprintEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIOTDeviceBlueprintEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceBlueprintEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIOTDeviceBlueprintEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceBlueprintEdge(ctx context.Context, sel ast.SelectionSet, v *model.IOTDeviceBlueprintEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTDeviceBlueprintEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNIOTDeviceBlueprintIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx context.Context, v interface{}) (entities.IOTDeviceBlueprint, error) { + res, err := ec.unmarshalInputIOTDeviceBlueprintIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNIOTDeviceEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.IOTDeviceEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIOTDeviceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIOTDeviceEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceEdge(ctx context.Context, sel ast.SelectionSet, v *model.IOTDeviceEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTDeviceEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNIOTDeviceIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx context.Context, v interface{}) (entities.IOTDevice, error) { + res, err := ec.unmarshalInputIOTDeviceIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNIOTEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx context.Context, sel ast.SelectionSet, v *entities.IOTEnvironment) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTEnvironment(ctx, sel, v) +} + +func (ec *executionContext) marshalNIOTEnvironmentEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTEnvironmentEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.IOTEnvironmentEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIOTEnvironmentEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTEnvironmentEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIOTEnvironmentEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTEnvironmentEdge(ctx context.Context, sel ast.SelectionSet, v *model.IOTEnvironmentEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTEnvironmentEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNIOTEnvironmentIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx context.Context, v interface{}) (entities.IOTEnvironment, error) { + res, err := ec.unmarshalInputIOTEnvironmentIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNIOTProject2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx context.Context, sel ast.SelectionSet, v *entities.IOTProject) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTProject(ctx, sel, v) +} + +func (ec *executionContext) marshalNIOTProjectEdge2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTProjectEdgeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.IOTProjectEdge) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNIOTProjectEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTProjectEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalNIOTProjectEdge2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTProjectEdge(ctx context.Context, sel ast.SelectionSet, v *model.IOTProjectEdge) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._IOTProjectEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNIOTProjectIn2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx context.Context, v interface{}) (entities.IOTProject, error) { + res, err := ec.unmarshalInputIOTProjectIn(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { + res, err := graphql.UnmarshalInt(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler { + res := graphql.MarshalInt(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNInt2int64(ctx context.Context, v interface{}) (int64, error) { + res, err := graphql.UnmarshalInt64(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.SelectionSet, v int64) graphql.Marshaler { + res := graphql.MarshalInt64(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalNK8s__io___api___core___v1__Toleration2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Toleration(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1Toleration) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._K8s__io___api___core___v1__Toleration(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__TolerationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TolerationIn, error) { + res, err := ec.unmarshalInputK8s__io___api___core___v1__TolerationIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNK8s__io___api___core___v1__TopologySpreadConstraint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraint(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1TopologySpreadConstraint) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._K8s__io___api___core___v1__TopologySpreadConstraint(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintIn(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TopologySpreadConstraintIn, error) { + res, err := ec.unmarshalInputK8s__io___api___core___v1__TopologySpreadConstraintIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx context.Context, v interface{}) (model.K8sIoAPICoreV1UnsatisfiableConstraintAction, error) { + var res model.K8sIoAPICoreV1UnsatisfiableConstraintAction + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNK8s__io___api___core___v1__UnsatisfiableConstraintAction2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1UnsatisfiableConstraintAction(ctx context.Context, sel ast.SelectionSet, v model.K8sIoAPICoreV1UnsatisfiableConstraintAction) graphql.Marshaler { + return v +} + +func (ec *executionContext) unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx context.Context, v interface{}) (model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator, error) { + var res model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator2githubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(ctx context.Context, sel ast.SelectionSet, v model.K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) graphql.Marshaler { + return v +} + +func (ec *executionContext) marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn(ctx context.Context, v interface{}) (*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn, error) { + res, err := ec.unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalNMatchFilterMatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx context.Context, v interface{}) (repos.MatchType, error) { + tmp, err := graphql.UnmarshalString(v) + res := repos.MatchType(tmp) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNMatchFilterMatchType2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchType(ctx context.Context, sel ast.SelectionSet, v repos.MatchType) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalNPageInfo2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐPageInfo(ctx context.Context, sel ast.SelectionSet, v *model.PageInfo) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._PageInfo(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) marshalN_Service2githubᚗcomᚋ99designsᚋgqlgenᚋpluginᚋfederationᚋfedruntimeᚐService(ctx context.Context, sel ast.SelectionSet, v fedruntime.Service) graphql.Marshaler { + return ec.__Service(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { + return ec.___Directive(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Directive) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler { + return ec.___EnumValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler { + return ec.___Field(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler { + return ec.___InputValue(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler { + return ec.___Type(ctx, sel, &v) +} + +func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNfederation__Scope2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNfederation__Scope2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + if res == graphql.Null { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + } + return res +} + +func (ec *executionContext) unmarshalNfederation__Scope2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNfederation__Scope2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNfederation__Scope2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNfederation__Scope2string(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalNfederation__Scope2ᚕᚕstringᚄ(ctx context.Context, v interface{}) ([][]string, error) { + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([][]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNfederation__Scope2ᚕstringᚄ(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalNfederation__Scope2ᚕᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v [][]string) graphql.Marshaler { + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNfederation__Scope2ᚕstringᚄ(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOAny2interface(ctx context.Context, v interface{}) (any, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalAny(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOAny2interface(ctx context.Context, sel ast.SelectionSet, v any) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalAny(v) + return res +} + +func (ec *executionContext) unmarshalOAny2ᚕinterfaceᚄ(ctx context.Context, v interface{}) ([]any, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]any, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNAny2interface(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOAny2ᚕinterfaceᚄ(ctx context.Context, sel ast.SelectionSet, v []any) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNAny2interface(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) { + res, err := graphql.UnmarshalBoolean(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler { + res := graphql.MarshalBoolean(v) + return res +} + +func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalBoolean(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalBoolean(*v) + return res +} + +func (ec *executionContext) unmarshalOCursorPaginationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐCursorPagination(ctx context.Context, v interface{}) (*repos.CursorPagination, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputCursorPaginationIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx context.Context, v interface{}) (repos.SortDirection, error) { + tmp, err := graphql.UnmarshalString(v) + res := repos.SortDirection(tmp) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOCursorPaginationSortDirection2githubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐSortDirection(ctx context.Context, sel ast.SelectionSet, v repos.SortDirection) graphql.Marshaler { + res := graphql.MarshalString(string(v)) + return res +} + +func (ec *executionContext) unmarshalODate2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalODate2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalString(*v) + return res +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisCrdsV1AppSvc) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvc2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvc(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1AppSvcIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__AppSvcIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1AppSvcIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret, error) { + if v == nil { + return nil, nil + } + var res = new(model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return v +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnv) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnv2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnv(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerEnvIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResource2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResource(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ContainerResource) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ContainerResource(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerResourceIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ContainerResourceIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolume) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolume2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolume(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorApisCrdsV1EnvFrom) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFrom2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFrom(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromInᚄ(ctx context.Context, v interface{}) ([]*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.GithubComKloudliteOperatorApisCrdsV1EnvFromIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNGithub__com___kloudlite___operator___apis___crds___v1__EnvFromIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1EnvFromIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HPA2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Hpa(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Hpa) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__HPA(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HPAIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HPAIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HPAIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HPAIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Intercept2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Intercept(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Intercept) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__Intercept(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1InterceptIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1InterceptIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__InterceptIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__Probe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1Probe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1Probe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__Probe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1ShellProbe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__ShellProbe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1ShellProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1ShellProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__ShellProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbe2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbe(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorApisCrdsV1TCPProbe) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___apis___crds___v1__TcpProbe(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorApisCrdsV1TCPProbeIn(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorApisCrdsV1TCPProbeIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputGithub__com___kloudlite___operator___apis___crds___v1__TcpProbeIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMetaᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorPkgOperatorCheckMeta) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___pkg___operator__CheckMeta2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorCheckMeta(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRefᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.GithubComKloudliteOperatorPkgOperatorResourceRef) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNGithub__com___kloudlite___operator___pkg___operator__ResourceRef2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorResourceRef(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOGithub__com___kloudlite___operator___pkg___operator__State2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorState(ctx context.Context, v interface{}) (*model.GithubComKloudliteOperatorPkgOperatorState, error) { + if v == nil { + return nil, nil + } + var res = new(model.GithubComKloudliteOperatorPkgOperatorState) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___pkg___operator__State2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorState(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorState) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return v +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___pkg___operator__Status2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgOperatorStatus(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgOperatorStatus) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___pkg___operator__Status(ctx, sel, v) +} + +func (ec *executionContext) marshalOGithub__com___kloudlite___operator___pkg___raw____json__RawJson2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐGithubComKloudliteOperatorPkgRawJSONRawJSON(ctx context.Context, sel ast.SelectionSet, v *model.GithubComKloudliteOperatorPkgRawJSONRawJSON) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._Github__com___kloudlite___operator___pkg___raw____json__RawJson(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTApp2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTApp(ctx context.Context, sel ast.SelectionSet, v *entities.IOTApp) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTApp(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTAppPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTAppPaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.IOTAppPaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTAppPaginatedRecords(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTDeployment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeployment(ctx context.Context, sel ast.SelectionSet, v *entities.IOTDeployment) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTDeployment(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTDeploymentPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeploymentPaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.IOTDeploymentPaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTDeploymentPaginatedRecords(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTDevice2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDevice(ctx context.Context, sel ast.SelectionSet, v *entities.IOTDevice) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTDevice(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTDeviceBlueprint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTDeviceBlueprint(ctx context.Context, sel ast.SelectionSet, v *entities.IOTDeviceBlueprint) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTDeviceBlueprint(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTDeviceBlueprintPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDeviceBlueprintPaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.IOTDeviceBlueprintPaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTDeviceBlueprintPaginatedRecords(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTDevicePaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTDevicePaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.IOTDevicePaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTDevicePaginatedRecords(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTEnvironment2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTEnvironment(ctx context.Context, sel ast.SelectionSet, v *entities.IOTEnvironment) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTEnvironment(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTEnvironmentPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTEnvironmentPaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.IOTEnvironmentPaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTEnvironmentPaginatedRecords(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTProject2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋentitiesᚐIOTProject(ctx context.Context, sel ast.SelectionSet, v *entities.IOTProject) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTProject(ctx, sel, v) +} + +func (ec *executionContext) marshalOIOTProjectPaginatedRecords2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐIOTProjectPaginatedRecords(ctx context.Context, sel ast.SelectionSet, v *model.IOTProjectPaginatedRecords) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._IOTProjectPaginatedRecords(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalInt(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.SelectionSet, v *int) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalInt(*v) + return res +} + +func (ec *executionContext) unmarshalOInt2ᚖint64(ctx context.Context, v interface{}) (*int64, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalInt64(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOInt2ᚖint64(ctx context.Context, sel ast.SelectionSet, v *int64) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalInt64(*v) + return res +} + +func (ec *executionContext) unmarshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TaintEffect, error) { + if v == nil { + return nil, nil + } + var res = new(model.K8sIoAPICoreV1TaintEffect) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOK8s__io___api___core___v1__TaintEffect2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TaintEffect(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1TaintEffect) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return v +} + +func (ec *executionContext) marshalOK8s__io___api___core___v1__Toleration2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Tolerationᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.K8sIoAPICoreV1Toleration) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNK8s__io___api___core___v1__Toleration2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1Toleration(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOK8s__io___api___core___v1__TolerationIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationInᚄ(ctx context.Context, v interface{}) ([]*model.K8sIoAPICoreV1TolerationIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.K8sIoAPICoreV1TolerationIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNK8s__io___api___core___v1__TolerationIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx context.Context, v interface{}) (*model.K8sIoAPICoreV1TolerationOperator, error) { + if v == nil { + return nil, nil + } + var res = new(model.K8sIoAPICoreV1TolerationOperator) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOK8s__io___api___core___v1__TolerationOperator2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TolerationOperator(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoAPICoreV1TolerationOperator) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return v +} + +func (ec *executionContext) marshalOK8s__io___api___core___v1__TopologySpreadConstraint2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.K8sIoAPICoreV1TopologySpreadConstraint) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNK8s__io___api___core___v1__TopologySpreadConstraint2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraint(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintInᚄ(ctx context.Context, v interface{}) ([]*model.K8sIoAPICoreV1TopologySpreadConstraintIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.K8sIoAPICoreV1TopologySpreadConstraintIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNK8s__io___api___core___v1__TopologySpreadConstraintIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoAPICoreV1TopologySpreadConstraintIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelector(ctx context.Context, sel ast.SelectionSet, v *model.K8sIoApimachineryPkgApisMetaV1LabelSelector) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorIn(ctx context.Context, v interface{}) (*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorIn, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚕᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementInᚄ(ctx context.Context, v interface{}) ([]*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*model.K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNK8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐK8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOMap2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalMap(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOMap2map(ctx context.Context, sel ast.SelectionSet, v map[string]interface{}) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalMap(v) + return res +} + +func (ec *executionContext) unmarshalOMatchFilterIn2ᚖgithubᚗcomᚋkloudliteᚋapiᚋpkgᚋreposᚐMatchFilter(ctx context.Context, v interface{}) (*repos.MatchFilter, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputMatchFilterIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOMetadata2k8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, sel ast.SelectionSet, v v1.ObjectMeta) graphql.Marshaler { + return ec._Metadata(ctx, sel, &v) +} + +func (ec *executionContext) unmarshalOMetadataIn2ᚖk8sᚗioᚋapimachineryᚋpkgᚋapisᚋmetaᚋv1ᚐObjectMeta(ctx context.Context, v interface{}) (*v1.ObjectMeta, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputMetadataIn(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSearchIOTApps2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTApps(ctx context.Context, v interface{}) (*model.SearchIOTApps, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchIOTApps(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSearchIOTDeployments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTDeployments(ctx context.Context, v interface{}) (*model.SearchIOTDeployments, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchIOTDeployments(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSearchIOTDeviceBlueprints2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTDeviceBlueprints(ctx context.Context, v interface{}) (*model.SearchIOTDeviceBlueprints, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchIOTDeviceBlueprints(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSearchIOTDevices2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTDevices(ctx context.Context, v interface{}) (*model.SearchIOTDevices, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchIOTDevices(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSearchIOTEnvironments2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTEnvironments(ctx context.Context, v interface{}) (*model.SearchIOTEnvironments, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchIOTEnvironments(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOSearchIOTProjects2ᚖgithubᚗcomᚋkloudliteᚋapiᚋappsᚋiotᚑconsoleᚋinternalᚋappᚋgraphᚋmodelᚐSearchIOTProjects(ctx context.Context, v interface{}) (*model.SearchIOTProjects, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputSearchIOTProjects(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) { + res, err := graphql.UnmarshalString(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler { + res := graphql.MarshalString(v) + return res +} + +func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]string, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNString2string(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNString2string(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) { + if v == nil { + return nil, nil + } + res, err := graphql.UnmarshalString(v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler { + if v == nil { + return graphql.Null + } + res := graphql.MarshalString(*v) + return res +} + +func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Schema(ctx, sel, v) +} + +func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec.___Type(ctx, sel, v) +} + +// endregion ***************************** type.gotpl ***************************** diff --git a/apps/iot-console/internal/app/graph/iotapp.resolvers.go b/apps/iot-console/internal/app/graph/iotapp.resolvers.go new file mode 100644 index 000000000..122604e4a --- /dev/null +++ b/apps/iot-console/internal/app/graph/iotapp.resolvers.go @@ -0,0 +1,80 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "github.com/kloudlite/api/pkg/errors" + "time" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/model" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fn "github.com/kloudlite/api/pkg/functions" + "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// CreationTime is the resolver for the creationTime field. +func (r *iOTAppResolver) CreationTime(ctx context.Context, obj *entities.IOTApp) (string, error) { + if obj == nil { + return "", errNilApp + } + return obj.BaseEntity.CreationTime.Format(time.RFC3339), nil +} + +// Spec is the resolver for the spec field. +func (r *iOTAppResolver) Spec(ctx context.Context, obj *entities.IOTApp) (*model.GithubComKloudliteOperatorApisCrdsV1AppSpec, error) { + m := model.GithubComKloudliteOperatorApisCrdsV1AppSpec{} + if err := fn.JsonConversion(obj.Spec, &m); err != nil { + return nil, errors.NewE(err) + } + return &m, nil +} + +// Status is the resolver for the status field. +func (r *iOTAppResolver) Status(ctx context.Context, obj *entities.IOTApp) (*model.GithubComKloudliteOperatorPkgOperatorStatus, error) { + m := model.GithubComKloudliteOperatorPkgOperatorStatus{} + if err := fn.JsonConversion(obj.Spec, &m); err != nil { + return nil, errors.NewE(err) + } + return &m, nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *iOTAppResolver) UpdateTime(ctx context.Context, obj *entities.IOTApp) (string, error) { + if obj == nil { + return "", errNilApp + } + + return obj.BaseEntity.UpdateTime.Format(time.RFC3339), nil +} + +// Metadata is the resolver for the metadata field. +func (r *iOTAppInResolver) Metadata(ctx context.Context, obj *entities.IOTApp, data *v1.ObjectMeta) error { + if obj == nil { + return errNilApp + } + if data != nil { + obj.ObjectMeta = *data + } + return nil +} + +// Spec is the resolver for the spec field. +func (r *iOTAppInResolver) Spec(ctx context.Context, obj *entities.IOTApp, data *model.GithubComKloudliteOperatorApisCrdsV1AppSpecIn) error { + if obj == nil { + return errNilApp + } + return fn.JsonConversion(data, &obj.Spec) +} + +// IOTApp returns generated.IOTAppResolver implementation. +func (r *Resolver) IOTApp() generated.IOTAppResolver { return &iOTAppResolver{r} } + +// IOTAppIn returns generated.IOTAppInResolver implementation. +func (r *Resolver) IOTAppIn() generated.IOTAppInResolver { return &iOTAppInResolver{r} } + +type iOTAppResolver struct{ *Resolver } +type iOTAppInResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go b/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go new file mode 100644 index 000000000..08f94e81b --- /dev/null +++ b/apps/iot-console/internal/app/graph/iotdeployment.resolvers.go @@ -0,0 +1,64 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "github.com/kloudlite/api/pkg/errors" + "time" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/model" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fn "github.com/kloudlite/api/pkg/functions" +) + +// CreationTime is the resolver for the creationTime field. +func (r *iOTDeploymentResolver) CreationTime(ctx context.Context, obj *entities.IOTDeployment) (string, error) { + if obj == nil { + return "", errNilDeployment + } + return obj.CreationTime.Format(time.RFC3339), nil +} + +// ExposedServices is the resolver for the exposedServices field. +func (r *iOTDeploymentResolver) ExposedServices(ctx context.Context, obj *entities.IOTDeployment) ([]*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService, error) { + if obj == nil { + return nil, errNilDeployment + } + + var services []*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService + if err := fn.JsonConversion(obj.ExposedServices, &services); err != nil { + return nil, errors.NewE(err) + } + return services, nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *iOTDeploymentResolver) UpdateTime(ctx context.Context, obj *entities.IOTDeployment) (string, error) { + if obj == nil { + return "", errNilDeployment + } + return obj.UpdateTime.Format(time.RFC3339), nil +} + +// ExposedServices is the resolver for the exposedServices field. +func (r *iOTDeploymentInResolver) ExposedServices(ctx context.Context, obj *entities.IOTDeployment, data []*model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn) error { + if obj == nil { + return errNilDeployment + } + return fn.JsonConversion(data, &obj.ExposedServices) +} + +// IOTDeployment returns generated.IOTDeploymentResolver implementation. +func (r *Resolver) IOTDeployment() generated.IOTDeploymentResolver { return &iOTDeploymentResolver{r} } + +// IOTDeploymentIn returns generated.IOTDeploymentInResolver implementation. +func (r *Resolver) IOTDeploymentIn() generated.IOTDeploymentInResolver { + return &iOTDeploymentInResolver{r} +} + +type iOTDeploymentResolver struct{ *Resolver } +type iOTDeploymentInResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/iotdevice.resolvers.go b/apps/iot-console/internal/app/graph/iotdevice.resolvers.go new file mode 100644 index 000000000..378af7bda --- /dev/null +++ b/apps/iot-console/internal/app/graph/iotdevice.resolvers.go @@ -0,0 +1,34 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "time" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/entities" +) + +// CreationTime is the resolver for the creationTime field. +func (r *iOTDeviceResolver) CreationTime(ctx context.Context, obj *entities.IOTDevice) (string, error) { + if obj == nil { + return "", errNilDevice + } + return obj.CreationTime.Format(time.RFC3339), nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *iOTDeviceResolver) UpdateTime(ctx context.Context, obj *entities.IOTDevice) (string, error) { + if obj == nil { + return "", errNilDevice + } + return obj.UpdateTime.Format(time.RFC3339), nil +} + +// IOTDevice returns generated.IOTDeviceResolver implementation. +func (r *Resolver) IOTDevice() generated.IOTDeviceResolver { return &iOTDeviceResolver{r} } + +type iOTDeviceResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go b/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go new file mode 100644 index 000000000..fe8524553 --- /dev/null +++ b/apps/iot-console/internal/app/graph/iotdeviceblueprint.resolvers.go @@ -0,0 +1,65 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "github.com/kloudlite/api/pkg/errors" + "time" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/model" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fn "github.com/kloudlite/api/pkg/functions" +) + +// BluePrintType is the resolver for the bluePrintType field. +func (r *iOTDeviceBlueprintResolver) BluePrintType(ctx context.Context, obj *entities.IOTDeviceBlueprint) (model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType, error) { + if obj == nil { + return "", errNilProject + } + var m model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType + if err := fn.JsonConversion(obj.BluePrintType, &m); err != nil { + return "", errors.NewE(err) + } + return m, nil +} + +// CreationTime is the resolver for the creationTime field. +func (r *iOTDeviceBlueprintResolver) CreationTime(ctx context.Context, obj *entities.IOTDeviceBlueprint) (string, error) { + if obj == nil { + return "", errNilDeviceBlueprint + } + return obj.CreationTime.Format(time.RFC3339), nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *iOTDeviceBlueprintResolver) UpdateTime(ctx context.Context, obj *entities.IOTDeviceBlueprint) (string, error) { + if obj == nil { + return "", errNilDeviceBlueprint + } + return obj.UpdateTime.Format(time.RFC3339), nil +} + +// BluePrintType is the resolver for the bluePrintType field. +func (r *iOTDeviceBlueprintInResolver) BluePrintType(ctx context.Context, obj *entities.IOTDeviceBlueprint, data model.GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) error { + if obj == nil { + return errNilDeviceBlueprint + } + return fn.JsonConversion(data, &obj.BluePrintType) +} + +// IOTDeviceBlueprint returns generated.IOTDeviceBlueprintResolver implementation. +func (r *Resolver) IOTDeviceBlueprint() generated.IOTDeviceBlueprintResolver { + return &iOTDeviceBlueprintResolver{r} +} + +// IOTDeviceBlueprintIn returns generated.IOTDeviceBlueprintInResolver implementation. +func (r *Resolver) IOTDeviceBlueprintIn() generated.IOTDeviceBlueprintInResolver { + return &iOTDeviceBlueprintInResolver{r} +} + +type iOTDeviceBlueprintResolver struct{ *Resolver } +type iOTDeviceBlueprintInResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/iotenvironment.resolvers.go b/apps/iot-console/internal/app/graph/iotenvironment.resolvers.go new file mode 100644 index 000000000..ead586753 --- /dev/null +++ b/apps/iot-console/internal/app/graph/iotenvironment.resolvers.go @@ -0,0 +1,36 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "time" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/entities" +) + +// CreationTime is the resolver for the creationTime field. +func (r *iOTEnvironmentResolver) CreationTime(ctx context.Context, obj *entities.IOTEnvironment) (string, error) { + if obj == nil { + return "", errNilEnvironment + } + return obj.CreationTime.Format(time.RFC3339), nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *iOTEnvironmentResolver) UpdateTime(ctx context.Context, obj *entities.IOTEnvironment) (string, error) { + if obj == nil { + return "", errNilEnvironment + } + return obj.UpdateTime.Format(time.RFC3339), nil +} + +// IOTEnvironment returns generated.IOTEnvironmentResolver implementation. +func (r *Resolver) IOTEnvironment() generated.IOTEnvironmentResolver { + return &iOTEnvironmentResolver{r} +} + +type iOTEnvironmentResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/iotproject.resolvers.go b/apps/iot-console/internal/app/graph/iotproject.resolvers.go new file mode 100644 index 000000000..9f630f506 --- /dev/null +++ b/apps/iot-console/internal/app/graph/iotproject.resolvers.go @@ -0,0 +1,34 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "time" + + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/entities" +) + +// CreationTime is the resolver for the creationTime field. +func (r *iOTProjectResolver) CreationTime(ctx context.Context, obj *entities.IOTProject) (string, error) { + if obj == nil { + return "", errNilProject + } + return obj.CreationTime.Format(time.RFC3339), nil +} + +// UpdateTime is the resolver for the updateTime field. +func (r *iOTProjectResolver) UpdateTime(ctx context.Context, obj *entities.IOTProject) (string, error) { + if obj == nil { + return "", errNilProject + } + return obj.UpdateTime.Format(time.RFC3339), nil +} + +// IOTProject returns generated.IOTProjectResolver implementation. +func (r *Resolver) IOTProject() generated.IOTProjectResolver { return &iOTProjectResolver{r} } + +type iOTProjectResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/model/models_gen.go b/apps/iot-console/internal/app/graph/model/models_gen.go new file mode 100644 index 000000000..bd4779580 --- /dev/null +++ b/apps/iot-console/internal/app/graph/model/models_gen.go @@ -0,0 +1,740 @@ +// Code generated by github.com/99designs/gqlgen, DO NOT EDIT. + +package model + +import ( + "fmt" + "io" + "strconv" + + "github.com/kloudlite/api/apps/iot-console/internal/entities" + "github.com/kloudlite/api/pkg/repos" +) + +type GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedService struct { + IP string `json:"ip"` + Name string `json:"name"` +} + +type GithubComKloudliteAPIAppsIotConsoleInternalEntitiesExposedServiceIn struct { + IP string `json:"ip"` + Name string `json:"name"` +} + +type GithubComKloudliteOperatorApisCrdsV1AppContainer struct { + Args []string `json:"args,omitempty"` + Command []string `json:"command,omitempty"` + Env []*GithubComKloudliteOperatorApisCrdsV1ContainerEnv `json:"env,omitempty"` + EnvFrom []*GithubComKloudliteOperatorApisCrdsV1EnvFrom `json:"envFrom,omitempty"` + Image string `json:"image"` + ImagePullPolicy *string `json:"imagePullPolicy,omitempty"` + LivenessProbe *GithubComKloudliteOperatorApisCrdsV1Probe `json:"livenessProbe,omitempty"` + Name string `json:"name"` + ReadinessProbe *GithubComKloudliteOperatorApisCrdsV1Probe `json:"readinessProbe,omitempty"` + ResourceCPU *GithubComKloudliteOperatorApisCrdsV1ContainerResource `json:"resourceCpu,omitempty"` + ResourceMemory *GithubComKloudliteOperatorApisCrdsV1ContainerResource `json:"resourceMemory,omitempty"` + Volumes []*GithubComKloudliteOperatorApisCrdsV1ContainerVolume `json:"volumes,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1AppContainerIn struct { + Args []string `json:"args,omitempty"` + Command []string `json:"command,omitempty"` + Env []*GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn `json:"env,omitempty"` + EnvFrom []*GithubComKloudliteOperatorApisCrdsV1EnvFromIn `json:"envFrom,omitempty"` + Image string `json:"image"` + ImagePullPolicy *string `json:"imagePullPolicy,omitempty"` + LivenessProbe *GithubComKloudliteOperatorApisCrdsV1ProbeIn `json:"livenessProbe,omitempty"` + Name string `json:"name"` + ReadinessProbe *GithubComKloudliteOperatorApisCrdsV1ProbeIn `json:"readinessProbe,omitempty"` + ResourceCPU *GithubComKloudliteOperatorApisCrdsV1ContainerResourceIn `json:"resourceCpu,omitempty"` + ResourceMemory *GithubComKloudliteOperatorApisCrdsV1ContainerResourceIn `json:"resourceMemory,omitempty"` + Volumes []*GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn `json:"volumes,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1AppSpec struct { + Containers []*GithubComKloudliteOperatorApisCrdsV1AppContainer `json:"containers"` + DisplayName *string `json:"displayName,omitempty"` + Freeze *bool `json:"freeze,omitempty"` + Hpa *GithubComKloudliteOperatorApisCrdsV1Hpa `json:"hpa,omitempty"` + Intercept *GithubComKloudliteOperatorApisCrdsV1Intercept `json:"intercept,omitempty"` + NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` + Region *string `json:"region,omitempty"` + Replicas *int `json:"replicas,omitempty"` + ServiceAccount *string `json:"serviceAccount,omitempty"` + Services []*GithubComKloudliteOperatorApisCrdsV1AppSvc `json:"services,omitempty"` + Tolerations []*K8sIoAPICoreV1Toleration `json:"tolerations,omitempty"` + TopologySpreadConstraints []*K8sIoAPICoreV1TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1AppSpecIn struct { + Containers []*GithubComKloudliteOperatorApisCrdsV1AppContainerIn `json:"containers"` + DisplayName *string `json:"displayName,omitempty"` + Freeze *bool `json:"freeze,omitempty"` + Hpa *GithubComKloudliteOperatorApisCrdsV1HPAIn `json:"hpa,omitempty"` + Intercept *GithubComKloudliteOperatorApisCrdsV1InterceptIn `json:"intercept,omitempty"` + NodeSelector map[string]interface{} `json:"nodeSelector,omitempty"` + Region *string `json:"region,omitempty"` + Replicas *int `json:"replicas,omitempty"` + ServiceAccount *string `json:"serviceAccount,omitempty"` + Services []*GithubComKloudliteOperatorApisCrdsV1AppSvcIn `json:"services,omitempty"` + Tolerations []*K8sIoAPICoreV1TolerationIn `json:"tolerations,omitempty"` + TopologySpreadConstraints []*K8sIoAPICoreV1TopologySpreadConstraintIn `json:"topologySpreadConstraints,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1AppSvc struct { + Name *string `json:"name,omitempty"` + Port int `json:"port"` + TargetPort *int `json:"targetPort,omitempty"` + Type *string `json:"type,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1AppSvcIn struct { + Name *string `json:"name,omitempty"` + Port int `json:"port"` + TargetPort *int `json:"targetPort,omitempty"` + Type *string `json:"type,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerEnv struct { + Key string `json:"key"` + Optional *bool `json:"optional,omitempty"` + RefKey *string `json:"refKey,omitempty"` + RefName *string `json:"refName,omitempty"` + Type *GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerEnvIn struct { + Key string `json:"key"` + Optional *bool `json:"optional,omitempty"` + RefKey *string `json:"refKey,omitempty"` + RefName *string `json:"refName,omitempty"` + Type *GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerResource struct { + Max *string `json:"max,omitempty"` + Min *string `json:"min,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerResourceIn struct { + Max *string `json:"max,omitempty"` + Min *string `json:"min,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerVolume struct { + Items []*GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem `json:"items,omitempty"` + MountPath string `json:"mountPath"` + RefName string `json:"refName"` + Type GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret `json:"type"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerVolumeIn struct { + Items []*GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn `json:"items,omitempty"` + MountPath string `json:"mountPath"` + RefName string `json:"refName"` + Type GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret `json:"type"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItem struct { + FileName *string `json:"fileName,omitempty"` + Key string `json:"key"` +} + +type GithubComKloudliteOperatorApisCrdsV1ContainerVolumeItemIn struct { + FileName *string `json:"fileName,omitempty"` + Key string `json:"key"` +} + +type GithubComKloudliteOperatorApisCrdsV1EnvFrom struct { + RefName string `json:"refName"` + Type GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret `json:"type"` +} + +type GithubComKloudliteOperatorApisCrdsV1EnvFromIn struct { + RefName string `json:"refName"` + Type GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret `json:"type"` +} + +type GithubComKloudliteOperatorApisCrdsV1Hpa struct { + Enabled bool `json:"enabled"` + MaxReplicas *int `json:"maxReplicas,omitempty"` + MinReplicas *int `json:"minReplicas,omitempty"` + ThresholdCPU *int `json:"thresholdCpu,omitempty"` + ThresholdMemory *int `json:"thresholdMemory,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1HPAIn struct { + Enabled bool `json:"enabled"` + MaxReplicas *int `json:"maxReplicas,omitempty"` + MinReplicas *int `json:"minReplicas,omitempty"` + ThresholdCPU *int `json:"thresholdCpu,omitempty"` + ThresholdMemory *int `json:"thresholdMemory,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe struct { + HTTPHeaders map[string]interface{} `json:"httpHeaders,omitempty"` + Path string `json:"path"` + Port int `json:"port"` +} + +type GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn struct { + HTTPHeaders map[string]interface{} `json:"httpHeaders,omitempty"` + Path string `json:"path"` + Port int `json:"port"` +} + +type GithubComKloudliteOperatorApisCrdsV1Intercept struct { + Enabled bool `json:"enabled"` + ToDevice string `json:"toDevice"` +} + +type GithubComKloudliteOperatorApisCrdsV1InterceptIn struct { + Enabled bool `json:"enabled"` + ToDevice string `json:"toDevice"` +} + +type GithubComKloudliteOperatorApisCrdsV1Probe struct { + FailureThreshold *int `json:"failureThreshold,omitempty"` + HTTPGet *GithubComKloudliteOperatorApisCrdsV1HTTPGetProbe `json:"httpGet,omitempty"` + InitialDelay *int `json:"initialDelay,omitempty"` + Interval *int `json:"interval,omitempty"` + Shell *GithubComKloudliteOperatorApisCrdsV1ShellProbe `json:"shell,omitempty"` + TCP *GithubComKloudliteOperatorApisCrdsV1TCPProbe `json:"tcp,omitempty"` + Type string `json:"type"` +} + +type GithubComKloudliteOperatorApisCrdsV1ProbeIn struct { + FailureThreshold *int `json:"failureThreshold,omitempty"` + HTTPGet *GithubComKloudliteOperatorApisCrdsV1HTTPGetProbeIn `json:"httpGet,omitempty"` + InitialDelay *int `json:"initialDelay,omitempty"` + Interval *int `json:"interval,omitempty"` + Shell *GithubComKloudliteOperatorApisCrdsV1ShellProbeIn `json:"shell,omitempty"` + TCP *GithubComKloudliteOperatorApisCrdsV1TCPProbeIn `json:"tcp,omitempty"` + Type string `json:"type"` +} + +type GithubComKloudliteOperatorApisCrdsV1ShellProbe struct { + Command []string `json:"command,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1ShellProbeIn struct { + Command []string `json:"command,omitempty"` +} + +type GithubComKloudliteOperatorApisCrdsV1TCPProbe struct { + Port int `json:"port"` +} + +type GithubComKloudliteOperatorApisCrdsV1TCPProbeIn struct { + Port int `json:"port"` +} + +type GithubComKloudliteOperatorPkgOperatorCheck struct { + Debug *string `json:"debug,omitempty"` + Error *string `json:"error,omitempty"` + Generation *int `json:"generation,omitempty"` + Info *string `json:"info,omitempty"` + Message *string `json:"message,omitempty"` + StartedAt *string `json:"startedAt,omitempty"` + State *GithubComKloudliteOperatorPkgOperatorState `json:"state,omitempty"` + Status bool `json:"status"` +} + +type GithubComKloudliteOperatorPkgOperatorCheckMeta struct { + Debug *bool `json:"debug,omitempty"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + Title string `json:"title"` +} + +type GithubComKloudliteOperatorPkgOperatorResourceRef struct { + APIVersion string `json:"apiVersion"` + Kind string `json:"kind"` + Name string `json:"name"` + Namespace string `json:"namespace"` +} + +type GithubComKloudliteOperatorPkgOperatorStatus struct { + CheckList []*GithubComKloudliteOperatorPkgOperatorCheckMeta `json:"checkList,omitempty"` + Checks map[string]interface{} `json:"checks,omitempty"` + IsReady bool `json:"isReady"` + LastReadyGeneration *int `json:"lastReadyGeneration,omitempty"` + LastReconcileTime *string `json:"lastReconcileTime,omitempty"` + Message *GithubComKloudliteOperatorPkgRawJSONRawJSON `json:"message,omitempty"` + Resources []*GithubComKloudliteOperatorPkgOperatorResourceRef `json:"resources,omitempty"` +} + +type GithubComKloudliteOperatorPkgRawJSONRawJSON struct { + RawMessage interface{} `json:"RawMessage,omitempty"` +} + +type IOTAppEdge struct { + Cursor string `json:"cursor"` + Node *entities.IOTApp `json:"node"` +} + +type IOTAppPaginatedRecords struct { + Edges []*IOTAppEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type IOTDeploymentEdge struct { + Cursor string `json:"cursor"` + Node *entities.IOTDeployment `json:"node"` +} + +type IOTDeploymentPaginatedRecords struct { + Edges []*IOTDeploymentEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type IOTDeviceBlueprintEdge struct { + Cursor string `json:"cursor"` + Node *entities.IOTDeviceBlueprint `json:"node"` +} + +type IOTDeviceBlueprintPaginatedRecords struct { + Edges []*IOTDeviceBlueprintEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type IOTDeviceEdge struct { + Cursor string `json:"cursor"` + Node *entities.IOTDevice `json:"node"` +} + +type IOTDevicePaginatedRecords struct { + Edges []*IOTDeviceEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type IOTEnvironmentEdge struct { + Cursor string `json:"cursor"` + Node *entities.IOTEnvironment `json:"node"` +} + +type IOTEnvironmentPaginatedRecords struct { + Edges []*IOTEnvironmentEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type IOTProjectEdge struct { + Cursor string `json:"cursor"` + Node *entities.IOTProject `json:"node"` +} + +type IOTProjectPaginatedRecords struct { + Edges []*IOTProjectEdge `json:"edges"` + PageInfo *PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +type K8sIoAPICoreV1Toleration struct { + Effect *K8sIoAPICoreV1TaintEffect `json:"effect,omitempty"` + Key *string `json:"key,omitempty"` + Operator *K8sIoAPICoreV1TolerationOperator `json:"operator,omitempty"` + TolerationSeconds *int `json:"tolerationSeconds,omitempty"` + Value *string `json:"value,omitempty"` +} + +type K8sIoAPICoreV1TolerationIn struct { + Effect *K8sIoAPICoreV1TaintEffect `json:"effect,omitempty"` + Key *string `json:"key,omitempty"` + Operator *K8sIoAPICoreV1TolerationOperator `json:"operator,omitempty"` + TolerationSeconds *int `json:"tolerationSeconds,omitempty"` + Value *string `json:"value,omitempty"` +} + +type K8sIoAPICoreV1TopologySpreadConstraint struct { + LabelSelector *K8sIoApimachineryPkgApisMetaV1LabelSelector `json:"labelSelector,omitempty"` + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + MaxSkew int `json:"maxSkew"` + MinDomains *int `json:"minDomains,omitempty"` + NodeAffinityPolicy *string `json:"nodeAffinityPolicy,omitempty"` + NodeTaintsPolicy *string `json:"nodeTaintsPolicy,omitempty"` + TopologyKey string `json:"topologyKey"` + WhenUnsatisfiable K8sIoAPICoreV1UnsatisfiableConstraintAction `json:"whenUnsatisfiable"` +} + +type K8sIoAPICoreV1TopologySpreadConstraintIn struct { + LabelSelector *K8sIoApimachineryPkgApisMetaV1LabelSelectorIn `json:"labelSelector,omitempty"` + MatchLabelKeys []string `json:"matchLabelKeys,omitempty"` + MaxSkew int `json:"maxSkew"` + MinDomains *int `json:"minDomains,omitempty"` + NodeAffinityPolicy *string `json:"nodeAffinityPolicy,omitempty"` + NodeTaintsPolicy *string `json:"nodeTaintsPolicy,omitempty"` + TopologyKey string `json:"topologyKey"` + WhenUnsatisfiable K8sIoAPICoreV1UnsatisfiableConstraintAction `json:"whenUnsatisfiable"` +} + +type K8sIoApimachineryPkgApisMetaV1LabelSelector struct { + MatchExpressions []*K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement `json:"matchExpressions,omitempty"` + MatchLabels map[string]interface{} `json:"matchLabels,omitempty"` +} + +type K8sIoApimachineryPkgApisMetaV1LabelSelectorIn struct { + MatchExpressions []*K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn `json:"matchExpressions,omitempty"` + MatchLabels map[string]interface{} `json:"matchLabels,omitempty"` +} + +type K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirement struct { + Key string `json:"key"` + Operator K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator `json:"operator"` + Values []string `json:"values,omitempty"` +} + +type K8sIoApimachineryPkgApisMetaV1LabelSelectorRequirementIn struct { + Key string `json:"key"` + Operator K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator `json:"operator"` + Values []string `json:"values,omitempty"` +} + +type PageInfo struct { + EndCursor *string `json:"endCursor,omitempty"` + HasNextPage *bool `json:"hasNextPage,omitempty"` + HasPreviousPage *bool `json:"hasPreviousPage,omitempty"` + StartCursor *string `json:"startCursor,omitempty"` +} + +type SearchIOTApps struct { + Text *repos.MatchFilter `json:"text,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` +} + +type SearchIOTDeployments struct { + Text *repos.MatchFilter `json:"text,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` +} + +type SearchIOTDeviceBlueprints struct { + Text *repos.MatchFilter `json:"text,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` +} + +type SearchIOTDevices struct { + Text *repos.MatchFilter `json:"text,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` +} + +type SearchIOTEnvironments struct { + Text *repos.MatchFilter `json:"text,omitempty"` + ProjectName *repos.MatchFilter `json:"projectName,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` +} + +type SearchIOTProjects struct { + Text *repos.MatchFilter `json:"text,omitempty"` + IsReady *repos.MatchFilter `json:"isReady,omitempty"` + MarkedForDeletion *repos.MatchFilter `json:"markedForDeletion,omitempty"` +} + +type GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType string + +const ( + GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintTypeGroupBlueprint GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType = "group_blueprint" + GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintTypeSingletonBlueprint GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType = "singleton_blueprint" +) + +var AllGithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType = []GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType{ + GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintTypeGroupBlueprint, + GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintTypeSingletonBlueprint, +} + +func (e GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) IsValid() bool { + switch e { + case GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintTypeGroupBlueprint, GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintTypeSingletonBlueprint: + return true + } + return false +} + +func (e GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) String() string { + return string(e) +} + +func (e *GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType", str) + } + return nil +} + +func (e GithubComKloudliteAPIAppsIotConsoleInternalEntitiesBluePrintType) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +type GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret string + +const ( + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = "config" + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretPvc GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = "pvc" + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = "secret" +) + +var AllGithubComKloudliteOperatorApisCrdsV1ConfigOrSecret = []GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret{ + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig, + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretPvc, + GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret, +} + +func (e GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) IsValid() bool { + switch e { + case GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretConfig, GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretPvc, GithubComKloudliteOperatorApisCrdsV1ConfigOrSecretSecret: + return true + } + return false +} + +func (e GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) String() string { + return string(e) +} + +func (e *GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret", str) + } + return nil +} + +func (e GithubComKloudliteOperatorApisCrdsV1ConfigOrSecret) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +type GithubComKloudliteOperatorPkgOperatorState string + +const ( + GithubComKloudliteOperatorPkgOperatorStateErroredDuringReconcilation GithubComKloudliteOperatorPkgOperatorState = "errored____during____reconcilation" + GithubComKloudliteOperatorPkgOperatorStateFinishedReconcilation GithubComKloudliteOperatorPkgOperatorState = "finished____reconcilation" + GithubComKloudliteOperatorPkgOperatorStateUnderReconcilation GithubComKloudliteOperatorPkgOperatorState = "under____reconcilation" + GithubComKloudliteOperatorPkgOperatorStateYetToBeReconciled GithubComKloudliteOperatorPkgOperatorState = "yet____to____be____reconciled" +) + +var AllGithubComKloudliteOperatorPkgOperatorState = []GithubComKloudliteOperatorPkgOperatorState{ + GithubComKloudliteOperatorPkgOperatorStateErroredDuringReconcilation, + GithubComKloudliteOperatorPkgOperatorStateFinishedReconcilation, + GithubComKloudliteOperatorPkgOperatorStateUnderReconcilation, + GithubComKloudliteOperatorPkgOperatorStateYetToBeReconciled, +} + +func (e GithubComKloudliteOperatorPkgOperatorState) IsValid() bool { + switch e { + case GithubComKloudliteOperatorPkgOperatorStateErroredDuringReconcilation, GithubComKloudliteOperatorPkgOperatorStateFinishedReconcilation, GithubComKloudliteOperatorPkgOperatorStateUnderReconcilation, GithubComKloudliteOperatorPkgOperatorStateYetToBeReconciled: + return true + } + return false +} + +func (e GithubComKloudliteOperatorPkgOperatorState) String() string { + return string(e) +} + +func (e *GithubComKloudliteOperatorPkgOperatorState) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = GithubComKloudliteOperatorPkgOperatorState(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid Github__com___kloudlite___operator___pkg___operator__State", str) + } + return nil +} + +func (e GithubComKloudliteOperatorPkgOperatorState) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +type K8sIoAPICoreV1TaintEffect string + +const ( + K8sIoAPICoreV1TaintEffectNoExecute K8sIoAPICoreV1TaintEffect = "NoExecute" + K8sIoAPICoreV1TaintEffectNoSchedule K8sIoAPICoreV1TaintEffect = "NoSchedule" + K8sIoAPICoreV1TaintEffectPreferNoSchedule K8sIoAPICoreV1TaintEffect = "PreferNoSchedule" +) + +var AllK8sIoAPICoreV1TaintEffect = []K8sIoAPICoreV1TaintEffect{ + K8sIoAPICoreV1TaintEffectNoExecute, + K8sIoAPICoreV1TaintEffectNoSchedule, + K8sIoAPICoreV1TaintEffectPreferNoSchedule, +} + +func (e K8sIoAPICoreV1TaintEffect) IsValid() bool { + switch e { + case K8sIoAPICoreV1TaintEffectNoExecute, K8sIoAPICoreV1TaintEffectNoSchedule, K8sIoAPICoreV1TaintEffectPreferNoSchedule: + return true + } + return false +} + +func (e K8sIoAPICoreV1TaintEffect) String() string { + return string(e) +} + +func (e *K8sIoAPICoreV1TaintEffect) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = K8sIoAPICoreV1TaintEffect(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid K8s__io___api___core___v1__TaintEffect", str) + } + return nil +} + +func (e K8sIoAPICoreV1TaintEffect) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +type K8sIoAPICoreV1TolerationOperator string + +const ( + K8sIoAPICoreV1TolerationOperatorEqual K8sIoAPICoreV1TolerationOperator = "Equal" + K8sIoAPICoreV1TolerationOperatorExists K8sIoAPICoreV1TolerationOperator = "Exists" +) + +var AllK8sIoAPICoreV1TolerationOperator = []K8sIoAPICoreV1TolerationOperator{ + K8sIoAPICoreV1TolerationOperatorEqual, + K8sIoAPICoreV1TolerationOperatorExists, +} + +func (e K8sIoAPICoreV1TolerationOperator) IsValid() bool { + switch e { + case K8sIoAPICoreV1TolerationOperatorEqual, K8sIoAPICoreV1TolerationOperatorExists: + return true + } + return false +} + +func (e K8sIoAPICoreV1TolerationOperator) String() string { + return string(e) +} + +func (e *K8sIoAPICoreV1TolerationOperator) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = K8sIoAPICoreV1TolerationOperator(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid K8s__io___api___core___v1__TolerationOperator", str) + } + return nil +} + +func (e K8sIoAPICoreV1TolerationOperator) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +type K8sIoAPICoreV1UnsatisfiableConstraintAction string + +const ( + K8sIoAPICoreV1UnsatisfiableConstraintActionDoNotSchedule K8sIoAPICoreV1UnsatisfiableConstraintAction = "DoNotSchedule" + K8sIoAPICoreV1UnsatisfiableConstraintActionScheduleAnyway K8sIoAPICoreV1UnsatisfiableConstraintAction = "ScheduleAnyway" +) + +var AllK8sIoAPICoreV1UnsatisfiableConstraintAction = []K8sIoAPICoreV1UnsatisfiableConstraintAction{ + K8sIoAPICoreV1UnsatisfiableConstraintActionDoNotSchedule, + K8sIoAPICoreV1UnsatisfiableConstraintActionScheduleAnyway, +} + +func (e K8sIoAPICoreV1UnsatisfiableConstraintAction) IsValid() bool { + switch e { + case K8sIoAPICoreV1UnsatisfiableConstraintActionDoNotSchedule, K8sIoAPICoreV1UnsatisfiableConstraintActionScheduleAnyway: + return true + } + return false +} + +func (e K8sIoAPICoreV1UnsatisfiableConstraintAction) String() string { + return string(e) +} + +func (e *K8sIoAPICoreV1UnsatisfiableConstraintAction) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = K8sIoAPICoreV1UnsatisfiableConstraintAction(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid K8s__io___api___core___v1__UnsatisfiableConstraintAction", str) + } + return nil +} + +func (e K8sIoAPICoreV1UnsatisfiableConstraintAction) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} + +type K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator string + +const ( + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorDoesNotExist K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator = "DoesNotExist" + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorExists K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator = "Exists" + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorIn K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator = "In" + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorNotIn K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator = "NotIn" +) + +var AllK8sIoApimachineryPkgApisMetaV1LabelSelectorOperator = []K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator{ + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorDoesNotExist, + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorExists, + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorIn, + K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorNotIn, +} + +func (e K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) IsValid() bool { + switch e { + case K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorDoesNotExist, K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorExists, K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorIn, K8sIoApimachineryPkgApisMetaV1LabelSelectorOperatorNotIn: + return true + } + return false +} + +func (e K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) String() string { + return string(e) +} + +func (e *K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("enums must be strings") + } + + *e = K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator(str) + if !e.IsValid() { + return fmt.Errorf("%s is not a valid K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator", str) + } + return nil +} + +func (e K8sIoApimachineryPkgApisMetaV1LabelSelectorOperator) MarshalGQL(w io.Writer) { + fmt.Fprint(w, strconv.Quote(e.String())) +} diff --git a/apps/iot-console/internal/app/graph/resolver-utils.go b/apps/iot-console/internal/app/graph/resolver-utils.go new file mode 100644 index 000000000..71cc244e5 --- /dev/null +++ b/apps/iot-console/internal/app/graph/resolver-utils.go @@ -0,0 +1,61 @@ +package graph + +import ( + "context" + "fmt" + "github.com/kloudlite/api/apps/iot-console/internal/domain" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/pkg/errors" + "strings" +) + +func toIOTConsoleContext(ctx context.Context) (domain.IotConsoleContext, error) { + missingContextValue := "context value (%s) is missing" + + errMsgs := make([]string, 0, 3) + + session, ok := ctx.Value("user-session").(*common.AuthSession) + if !ok { + errMsgs = append(errMsgs, fmt.Sprintf(missingContextValue, "user-session")) + } + + accountName, ok := ctx.Value("account-name").(string) + if !ok { + errMsgs = append(errMsgs, fmt.Sprintf(missingContextValue, "account-name")) + } + + var err error + if len(errMsgs) != 0 { + err = errors.NewE(errors.Newf("%v", strings.Join(errMsgs, ","))) + } + + if err != nil { + return domain.IotConsoleContext{}, errors.NewE(err) + } + + return domain.IotConsoleContext{ + Context: ctx, + AccountName: accountName, + + UserId: session.UserId, + UserEmail: session.UserEmail, + UserName: session.UserName, + }, nil +} + +var ( + errNilDeployment = errors.Newf("deployment object is nil") + errNilProject = errors.Newf("project object is nil") + errNilEnvironment = errors.Newf("environment object is nil") + errNilDevice = errors.Newf("device object is nil") + errNilDeviceBlueprint = errors.Newf("device group object is nil") + errNilApp = errors.Newf("app object is nil") +) + +func newIOTResourceContext(ctx domain.IotConsoleContext, projectName string, environmentName string) domain.IotResourceContext { + return domain.IotResourceContext{ + IotConsoleContext: ctx, + ProjectName: projectName, + EnvironmentName: environmentName, + } +} diff --git a/apps/iot-console/internal/app/graph/resolver.go b/apps/iot-console/internal/app/graph/resolver.go new file mode 100644 index 000000000..eee40b5fd --- /dev/null +++ b/apps/iot-console/internal/app/graph/resolver.go @@ -0,0 +1,11 @@ +package graph + +import "github.com/kloudlite/api/apps/iot-console/internal/domain" + +// This file will not be regenerated automatically. +// +// It serves as dependency injection for your app, add any dependencies you require here. + +type Resolver struct { + Domain domain.Domain +} diff --git a/apps/iot-console/internal/app/graph/schema.graphqls b/apps/iot-console/internal/app/graph/schema.graphqls new file mode 100644 index 000000000..8c7f44178 --- /dev/null +++ b/apps/iot-console/internal/app/graph/schema.graphqls @@ -0,0 +1,86 @@ +directive @isLoggedIn on FIELD_DEFINITION +directive @isLoggedInAndVerified on FIELD_DEFINITION +directive @hasAccount on FIELD_DEFINITION + +input SearchIOTProjects { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTEnvironments { + text: MatchFilterIn + projectName: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDeployments { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDevices { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTDeviceBlueprints { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +input SearchIOTApps { + text: MatchFilterIn + isReady: MatchFilterIn + markedForDeletion: MatchFilterIn +} + +type Query { + iot_listProjects(search: SearchIOTProjects, pq: CursorPaginationIn): IOTProjectPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getProject(name: String!): IOTProject @isLoggedInAndVerified @hasAccount + + iot_listEnvironments(projectName: String!,search: SearchIOTEnvironments, pq: CursorPaginationIn): IOTEnvironmentPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getEnvironment(projectName: String!, name: String!): IOTEnvironment @isLoggedInAndVerified @hasAccount + + iot_listDevices(projectName: String!, envName: String!,search: SearchIOTDevices, pq: CursorPaginationIn): IOTDevicePaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getDevice(projectName: String!, envName: String!, name: String!): IOTDevice @isLoggedInAndVerified @hasAccount + + iot_listDeviceBlueprints(projectName: String!, envName: String!,search: SearchIOTDeviceBlueprints, pq: CursorPaginationIn): IOTDeviceBlueprintPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getDeviceBlueprint(projectName: String!, envName: String!, name: String!): IOTDeviceBlueprint @isLoggedInAndVerified @hasAccount + + iot_listDeployments(projectName: String!, envName: String!,search: SearchIOTDeployments, pq: CursorPaginationIn): IOTDeploymentPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getDeployment(projectName: String!, envName: String!, name: String!): IOTDeployment @isLoggedInAndVerified @hasAccount + + iot_listApps(projectName: String!, envName: String!, deviceBlueprintName: String!,search: SearchIOTApps, pq: CursorPaginationIn): IOTAppPaginatedRecords @isLoggedInAndVerified @hasAccount + iot_getApp(projectName: String!, envName: String!, deviceBlueprintName: String!, name: String!): IOTApp @isLoggedInAndVerified @hasAccount +} + +type Mutation { + iot_createProject(project: IOTProjectIn!): IOTProject @isLoggedInAndVerified @hasAccount + iot_updateProject(project: IOTProjectIn!): IOTProject @isLoggedInAndVerified @hasAccount + iot_deleteProject(name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createEnvironment(projectName: String!,env: IOTEnvironmentIn!): IOTEnvironment @isLoggedInAndVerified @hasAccount + iot_updateEnvironment(projectName: String!,env: IOTEnvironmentIn!): IOTEnvironment @isLoggedInAndVerified @hasAccount + iot_deleteEnvironment(projectName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createDevice(projectName: String!, envName: String!, device: IOTDeviceIn!): IOTDevice @isLoggedInAndVerified @hasAccount + iot_updateDevice(projectName: String!, envName: String!, device: IOTDeviceIn!): IOTDevice @isLoggedInAndVerified @hasAccount + iot_deleteDevice(projectName: String!, envName: String!,name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createDeviceBlueprint(projectName: String!, envName: String!, deviceBlueprint: IOTDeviceBlueprintIn!): IOTDeviceBlueprint @isLoggedInAndVerified @hasAccount + iot_updateDeviceBlueprint(projectName: String!, envName: String!, deviceBlueprint: IOTDeviceBlueprintIn!): IOTDeviceBlueprint @isLoggedInAndVerified @hasAccount + iot_deleteDeviceBlueprint(projectName: String!, envName: String!,name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createDeployment(projectName: String!, envName: String!, deployment: IOTDeploymentIn!): IOTDeployment @isLoggedInAndVerified @hasAccount + iot_updateDeployment(projectName: String!, envName: String!, deployment: IOTDeploymentIn!): IOTDeployment @isLoggedInAndVerified @hasAccount + iot_deleteDeployment(projectName: String!, envName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount + + iot_createApp(projectName: String!, envName: String!, deviceBlueprintName: String!, app: IOTAppIn!): IOTApp @isLoggedInAndVerified @hasAccount + iot_updateApp(projectName: String!, envName: String!, deviceBlueprintName: String!, app: IOTAppIn!): IOTApp @isLoggedInAndVerified @hasAccount + iot_deleteApp(projectName: String!, envName: String!, deviceBlueprintName: String!, name: String!): Boolean! @isLoggedInAndVerified @hasAccount +} diff --git a/apps/iot-console/internal/app/graph/schema.resolvers.go b/apps/iot-console/internal/app/graph/schema.resolvers.go new file mode 100644 index 000000000..7774bf54d --- /dev/null +++ b/apps/iot-console/internal/app/graph/schema.resolvers.go @@ -0,0 +1,385 @@ +package graph + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.39 + +import ( + "context" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/generated" + "github.com/kloudlite/api/apps/iot-console/internal/app/graph/model" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + "github.com/kloudlite/api/pkg/errors" + fn "github.com/kloudlite/api/pkg/functions" + "github.com/kloudlite/api/pkg/repos" +) + +// IotCreateProject is the resolver for the iot_createProject field. +func (r *mutationResolver) IotCreateProject(ctx context.Context, project entities.IOTProject) (*entities.IOTProject, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.CreateProject(ic, project) +} + +// IotUpdateProject is the resolver for the iot_updateProject field. +func (r *mutationResolver) IotUpdateProject(ctx context.Context, project entities.IOTProject) (*entities.IOTProject, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.UpdateProject(ic, project) +} + +// IotDeleteProject is the resolver for the iot_deleteProject field. +func (r *mutationResolver) IotDeleteProject(ctx context.Context, name string) (bool, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteProject(ic, name); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + +// IotCreateEnvironment is the resolver for the iot_createEnvironment field. +func (r *mutationResolver) IotCreateEnvironment(ctx context.Context, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.CreateEnvironment(ic, projectName, env) +} + +// IotUpdateEnvironment is the resolver for the iot_updateEnvironment field. +func (r *mutationResolver) IotUpdateEnvironment(ctx context.Context, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.UpdateEnvironment(ic, projectName, env) +} + +// IotDeleteEnvironment is the resolver for the iot_deleteEnvironment field. +func (r *mutationResolver) IotDeleteEnvironment(ctx context.Context, projectName string, name string) (bool, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteEnvironment(ic, projectName, name); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + +// IotCreateDevice is the resolver for the iot_createDevice field. +func (r *mutationResolver) IotCreateDevice(ctx context.Context, projectName string, envName string, device entities.IOTDevice) (*entities.IOTDevice, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.CreateDevice(newIOTResourceContext(ic, projectName, envName), device) +} + +// IotUpdateDevice is the resolver for the iot_updateDevice field. +func (r *mutationResolver) IotUpdateDevice(ctx context.Context, projectName string, envName string, device entities.IOTDevice) (*entities.IOTDevice, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.UpdateDevice(newIOTResourceContext(ic, projectName, envName), device) +} + +// IotDeleteDevice is the resolver for the iot_deleteDevice field. +func (r *mutationResolver) IotDeleteDevice(ctx context.Context, projectName string, envName string, name string) (bool, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteDevice(newIOTResourceContext(ic, projectName, envName), name); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + +// IotCreateDeviceBlueprint is the resolver for the iot_createDeviceBlueprint field. +func (r *mutationResolver) IotCreateDeviceBlueprint(ctx context.Context, projectName string, envName string, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.CreateDeviceBlueprint(newIOTResourceContext(ic, projectName, envName), deviceBlueprint) +} + +// IotUpdateDeviceBlueprint is the resolver for the iot_updateDeviceBlueprint field. +func (r *mutationResolver) IotUpdateDeviceBlueprint(ctx context.Context, projectName string, envName string, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.UpdateDeviceBlueprint(newIOTResourceContext(ic, projectName, envName), deviceBlueprint) +} + +// IotDeleteDeviceBlueprint is the resolver for the iot_deleteDeviceBlueprint field. +func (r *mutationResolver) IotDeleteDeviceBlueprint(ctx context.Context, projectName string, envName string, name string) (bool, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteDeviceBlueprint(newIOTResourceContext(ic, projectName, envName), name); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + +// IotCreateDeployment is the resolver for the iot_createDeployment field. +func (r *mutationResolver) IotCreateDeployment(ctx context.Context, projectName string, envName string, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.CreateDeployment(newIOTResourceContext(ic, projectName, envName), deployment) +} + +// IotUpdateDeployment is the resolver for the iot_updateDeployment field. +func (r *mutationResolver) IotUpdateDeployment(ctx context.Context, projectName string, envName string, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.UpdateDeployment(newIOTResourceContext(ic, projectName, envName), deployment) +} + +// IotDeleteDeployment is the resolver for the iot_deleteDeployment field. +func (r *mutationResolver) IotDeleteDeployment(ctx context.Context, projectName string, envName string, name string) (bool, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteDeployment(newIOTResourceContext(ic, projectName, envName), name); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + +// IotCreateApp is the resolver for the iot_createApp field. +func (r *mutationResolver) IotCreateApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.CreateApp(newIOTResourceContext(ic, projectName, envName), deviceBlueprintName, app) +} + +// IotUpdateApp is the resolver for the iot_updateApp field. +func (r *mutationResolver) IotUpdateApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.UpdateApp(newIOTResourceContext(ic, projectName, envName), deviceBlueprintName, app) +} + +// IotDeleteApp is the resolver for the iot_deleteApp field. +func (r *mutationResolver) IotDeleteApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, name string) (bool, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return false, errors.NewE(err) + } + if err := r.Domain.DeleteApp(newIOTResourceContext(ic, projectName, envName), deviceBlueprintName, name); err != nil { + return false, errors.NewE(err) + } + return true, nil +} + +// IotListProjects is the resolver for the iot_listProjects field. +func (r *queryResolver) IotListProjects(ctx context.Context, search *model.SearchIOTProjects, pq *repos.CursorPagination) (*model.IOTProjectPaginatedRecords, error) { + filter := map[string]repos.MatchFilter{} + if search != nil { + if search.Text != nil { + filter["name"] = *search.Text + } + } + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + e, err := r.Domain.ListProjects(ic, filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.IOTProjectPaginatedRecords](e) +} + +// IotGetProject is the resolver for the iot_getProject field. +func (r *queryResolver) IotGetProject(ctx context.Context, name string) (*entities.IOTProject, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.GetProject(ic, name) +} + +// IotListEnvironments is the resolver for the iot_listEnvironments field. +func (r *queryResolver) IotListEnvironments(ctx context.Context, projectName string, search *model.SearchIOTEnvironments, pq *repos.CursorPagination) (*model.IOTEnvironmentPaginatedRecords, error) { + filter := map[string]repos.MatchFilter{} + if search != nil { + if search.Text != nil { + filter["name"] = *search.Text + } + } + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + e, err := r.Domain.ListEnvironments(ic, projectName, filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.IOTEnvironmentPaginatedRecords](e) +} + +// IotGetEnvironment is the resolver for the iot_getEnvironment field. +func (r *queryResolver) IotGetEnvironment(ctx context.Context, projectName string, name string) (*entities.IOTEnvironment, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + return r.Domain.GetEnvironment(ic, projectName, name) +} + +// IotListDevices is the resolver for the iot_listDevices field. +func (r *queryResolver) IotListDevices(ctx context.Context, projectName string, envName string, search *model.SearchIOTDevices, pq *repos.CursorPagination) (*model.IOTDevicePaginatedRecords, error) { + filter := map[string]repos.MatchFilter{} + if search != nil { + if search.Text != nil { + filter["name"] = *search.Text + } + } + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + e, err := r.Domain.ListDevices(newIOTResourceContext(ic, projectName, envName), filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.IOTDevicePaginatedRecords](e) +} + +// IotGetDevice is the resolver for the iot_getDevice field. +func (r *queryResolver) IotGetDevice(ctx context.Context, projectName string, envName string, name string) (*entities.IOTDevice, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.GetDevice(newIOTResourceContext(ic, projectName, envName), name) +} + +// IotListDeviceBlueprints is the resolver for the iot_listDeviceBlueprints field. +func (r *queryResolver) IotListDeviceBlueprints(ctx context.Context, projectName string, envName string, search *model.SearchIOTDeviceBlueprints, pq *repos.CursorPagination) (*model.IOTDeviceBlueprintPaginatedRecords, error) { + filter := map[string]repos.MatchFilter{} + if search != nil { + if search.Text != nil { + filter["name"] = *search.Text + } + } + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + e, err := r.Domain.ListDeviceBlueprints(newIOTResourceContext(ic, projectName, envName), filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.IOTDeviceBlueprintPaginatedRecords](e) +} + +// IotGetDeviceBlueprint is the resolver for the iot_getDeviceBlueprint field. +func (r *queryResolver) IotGetDeviceBlueprint(ctx context.Context, projectName string, envName string, name string) (*entities.IOTDeviceBlueprint, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.GetDeviceBlueprint(newIOTResourceContext(ic, projectName, envName), name) +} + +// IotListDeployments is the resolver for the iot_listDeployments field. +func (r *queryResolver) IotListDeployments(ctx context.Context, projectName string, envName string, search *model.SearchIOTDeployments, pq *repos.CursorPagination) (*model.IOTDeploymentPaginatedRecords, error) { + filter := map[string]repos.MatchFilter{} + if search != nil { + if search.Text != nil { + filter["name"] = *search.Text + } + } + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + d, err := r.Domain.ListDeployments(newIOTResourceContext(ic, projectName, envName), filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.IOTDeploymentPaginatedRecords](d) +} + +// IotGetDeployment is the resolver for the iot_getDeployment field. +func (r *queryResolver) IotGetDeployment(ctx context.Context, projectName string, envName string, name string) (*entities.IOTDeployment, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.GetDeployment(newIOTResourceContext(ic, projectName, envName), name) +} + +// IotListApps is the resolver for the iot_listApps field. +func (r *queryResolver) IotListApps(ctx context.Context, projectName string, envName string, deviceBlueprintName string, search *model.SearchIOTApps, pq *repos.CursorPagination) (*model.IOTAppPaginatedRecords, error) { + filter := map[string]repos.MatchFilter{} + if search != nil { + if search.Text != nil { + filter["name"] = *search.Text + } + } + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + + d, err := r.Domain.ListApps(newIOTResourceContext(ic, projectName, envName), deviceBlueprintName, filter, fn.DefaultIfNil(pq, repos.DefaultCursorPagination)) + if err != nil { + return nil, errors.NewE(err) + } + + return fn.JsonConvertP[model.IOTAppPaginatedRecords](d) +} + +// IotGetApp is the resolver for the iot_getApp field. +func (r *queryResolver) IotGetApp(ctx context.Context, projectName string, envName string, deviceBlueprintName string, name string) (*entities.IOTApp, error) { + ic, err := toIOTConsoleContext(ctx) + if err != nil { + return nil, errors.NewE(err) + } + return r.Domain.GetApp(newIOTResourceContext(ic, projectName, envName), deviceBlueprintName, name) +} + +// Mutation returns generated.MutationResolver implementation. +func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} } + +// Query returns generated.QueryResolver implementation. +func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} } + +type mutationResolver struct{ *Resolver } +type queryResolver struct{ *Resolver } diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls new file mode 100644 index 000000000..49ac292fc --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/common-types.graphqls @@ -0,0 +1,390 @@ +type Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService @shareable { + ip: String! + name: String! +} + +type Github__com___kloudlite___api___common__CreatedOrUpdatedBy @shareable { + userEmail: String! + userId: String! + userName: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__AppContainer @shareable { + args: [String!] + command: [String!] + env: [Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv!] + envFrom: [Github__com___kloudlite___operator___apis___crds___v1__EnvFrom!] + image: String! + imagePullPolicy: String + livenessProbe: Github__com___kloudlite___operator___apis___crds___v1__Probe + name: String! + readinessProbe: Github__com___kloudlite___operator___apis___crds___v1__Probe + resourceCpu: Github__com___kloudlite___operator___apis___crds___v1__ContainerResource + resourceMemory: Github__com___kloudlite___operator___apis___crds___v1__ContainerResource + volumes: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume!] +} + +type Github__com___kloudlite___operator___apis___crds___v1__AppSpec @shareable { + containers: [Github__com___kloudlite___operator___apis___crds___v1__AppContainer!]! + displayName: String + freeze: Boolean + hpa: Github__com___kloudlite___operator___apis___crds___v1__HPA + intercept: Github__com___kloudlite___operator___apis___crds___v1__Intercept + nodeSelector: Map + region: String + replicas: Int + serviceAccount: String + services: [Github__com___kloudlite___operator___apis___crds___v1__AppSvc!] + tolerations: [K8s__io___api___core___v1__Toleration!] + topologySpreadConstraints: [K8s__io___api___core___v1__TopologySpreadConstraint!] +} + +type Github__com___kloudlite___operator___apis___crds___v1__AppSvc @shareable { + name: String + port: Int! + targetPort: Int + type: String +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerEnv @shareable { + key: String! + optional: Boolean + refKey: String + refName: String + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret + value: String +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerResource @shareable { + max: String + min: String +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolume @shareable { + items: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem!] + mountPath: String! + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +type Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItem @shareable { + fileName: String + key: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__EnvFrom @shareable { + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +type Github__com___kloudlite___operator___apis___crds___v1__HPA @shareable { + enabled: Boolean! + maxReplicas: Int + minReplicas: Int + thresholdCpu: Int + thresholdMemory: Int +} + +type Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe @shareable { + httpHeaders: Map + path: String! + port: Int! +} + +type Github__com___kloudlite___operator___apis___crds___v1__Intercept @shareable { + enabled: Boolean! + toDevice: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__Probe @shareable { + failureThreshold: Int + httpGet: Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbe + initialDelay: Int + interval: Int + shell: Github__com___kloudlite___operator___apis___crds___v1__ShellProbe + tcp: Github__com___kloudlite___operator___apis___crds___v1__TcpProbe + type: String! +} + +type Github__com___kloudlite___operator___apis___crds___v1__ShellProbe @shareable { + command: [String!] +} + +type Github__com___kloudlite___operator___apis___crds___v1__TcpProbe @shareable { + port: Int! +} + +type Github__com___kloudlite___operator___pkg___operator__Check @shareable { + debug: String + error: String + generation: Int + info: String + message: String + startedAt: Date + state: Github__com___kloudlite___operator___pkg___operator__State + status: Boolean! +} + +type Github__com___kloudlite___operator___pkg___operator__CheckMeta @shareable { + debug: Boolean + description: String + name: String! + title: String! +} + +type Github__com___kloudlite___operator___pkg___operator__ResourceRef @shareable { + apiVersion: String! + kind: String! + name: String! + namespace: String! +} + +type Github__com___kloudlite___operator___pkg___operator__Status @shareable { + checkList: [Github__com___kloudlite___operator___pkg___operator__CheckMeta!] + checks: Map + isReady: Boolean! + lastReadyGeneration: Int + lastReconcileTime: Date + message: Github__com___kloudlite___operator___pkg___raw____json__RawJson + resources: [Github__com___kloudlite___operator___pkg___operator__ResourceRef!] +} + +type Github__com___kloudlite___operator___pkg___raw____json__RawJson @shareable { + RawMessage: Any +} + +type K8s__io___api___core___v1__Toleration @shareable { + effect: K8s__io___api___core___v1__TaintEffect + key: String + operator: K8s__io___api___core___v1__TolerationOperator + tolerationSeconds: Int + value: String +} + +type K8s__io___api___core___v1__TopologySpreadConstraint @shareable { + labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector + matchLabelKeys: [String!] + maxSkew: Int! + minDomains: Int + nodeAffinityPolicy: String + nodeTaintsPolicy: String + topologyKey: String! + whenUnsatisfiable: K8s__io___api___core___v1__UnsatisfiableConstraintAction! +} + +type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelector @shareable { + matchExpressions: [K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement!] + matchLabels: Map +} + +type K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirement @shareable { + key: String! + operator: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator! + values: [String!] +} + +type Metadata @shareable { + annotations: Map + creationTimestamp: Date! + deletionTimestamp: Date + generation: Int! + labels: Map + name: String! + namespace: String +} + +type PageInfo @shareable { + endCursor: String + hasNextPage: Boolean + hasPreviousPage: Boolean + startCursor: String +} + +input Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn { + ip: String! + name: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn { + args: [String!] + command: [String!] + env: [Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn!] + envFrom: [Github__com___kloudlite___operator___apis___crds___v1__EnvFromIn!] + image: String! + imagePullPolicy: String + livenessProbe: Github__com___kloudlite___operator___apis___crds___v1__ProbeIn + name: String! + readinessProbe: Github__com___kloudlite___operator___apis___crds___v1__ProbeIn + resourceCpu: Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn + resourceMemory: Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn + volumes: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn!] +} + +input Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn { + containers: [Github__com___kloudlite___operator___apis___crds___v1__AppContainerIn!]! + displayName: String + freeze: Boolean + hpa: Github__com___kloudlite___operator___apis___crds___v1__HPAIn + intercept: Github__com___kloudlite___operator___apis___crds___v1__InterceptIn + nodeSelector: Map + region: String + replicas: Int + serviceAccount: String + services: [Github__com___kloudlite___operator___apis___crds___v1__AppSvcIn!] + tolerations: [K8s__io___api___core___v1__TolerationIn!] + topologySpreadConstraints: [K8s__io___api___core___v1__TopologySpreadConstraintIn!] +} + +input Github__com___kloudlite___operator___apis___crds___v1__AppSvcIn { + name: String + port: Int! + targetPort: Int + type: String +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerEnvIn { + key: String! + optional: Boolean + refKey: String + refName: String + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret + value: String +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerResourceIn { + max: String + min: String +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeIn { + items: [Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn!] + mountPath: String! + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +input Github__com___kloudlite___operator___apis___crds___v1__ContainerVolumeItemIn { + fileName: String + key: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__EnvFromIn { + refName: String! + type: Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret! +} + +input Github__com___kloudlite___operator___apis___crds___v1__HPAIn { + enabled: Boolean! + maxReplicas: Int + minReplicas: Int + thresholdCpu: Int + thresholdMemory: Int +} + +input Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn { + httpHeaders: Map + path: String! + port: Int! +} + +input Github__com___kloudlite___operator___apis___crds___v1__InterceptIn { + enabled: Boolean! + toDevice: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__ProbeIn { + failureThreshold: Int + httpGet: Github__com___kloudlite___operator___apis___crds___v1__HttpGetProbeIn + initialDelay: Int + interval: Int + shell: Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn + tcp: Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn + type: String! +} + +input Github__com___kloudlite___operator___apis___crds___v1__ShellProbeIn { + command: [String!] +} + +input Github__com___kloudlite___operator___apis___crds___v1__TcpProbeIn { + port: Int! +} + +input K8s__io___api___core___v1__TolerationIn { + effect: K8s__io___api___core___v1__TaintEffect + key: String + operator: K8s__io___api___core___v1__TolerationOperator + tolerationSeconds: Int + value: String +} + +input K8s__io___api___core___v1__TopologySpreadConstraintIn { + labelSelector: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn + matchLabelKeys: [String!] + maxSkew: Int! + minDomains: Int + nodeAffinityPolicy: String + nodeTaintsPolicy: String + topologyKey: String! + whenUnsatisfiable: K8s__io___api___core___v1__UnsatisfiableConstraintAction! +} + +input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorIn { + matchExpressions: [K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn!] + matchLabels: Map +} + +input K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorRequirementIn { + key: String! + operator: K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator! + values: [String!] +} + +input MetadataIn { + annotations: Map + labels: Map + name: String! + namespace: String +} + +enum Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType { + group_blueprint + singleton_blueprint +} + +enum Github__com___kloudlite___operator___apis___crds___v1__ConfigOrSecret { + config + pvc + secret +} + +enum Github__com___kloudlite___operator___pkg___operator__State { + errored____during____reconcilation + finished____reconcilation + under____reconcilation + yet____to____be____reconciled +} + +enum K8s__io___api___core___v1__TaintEffect { + NoExecute + NoSchedule + PreferNoSchedule +} + +enum K8s__io___api___core___v1__TolerationOperator { + Equal + Exists +} + +enum K8s__io___api___core___v1__UnsatisfiableConstraintAction { + DoNotSchedule + ScheduleAnyway +} + +enum K8s__io___apimachinery___pkg___apis___meta___v1__LabelSelectorOperator { + DoesNotExist + Exists + In + NotIn +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/cursorpagination.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/cursorpagination.graphqls new file mode 100644 index 000000000..58815e858 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/cursorpagination.graphqls @@ -0,0 +1,23 @@ +type CursorPagination @shareable { + after: String + before: String + first: Int + last: Int + orderBy: String + sortDirection: CursorPaginationSortDirection +} + +input CursorPaginationIn { + after: String + before: String + first: Int + last: Int + orderBy: String = "_id" + sortDirection: CursorPaginationSortDirection = "ASC" +} + +enum CursorPaginationSortDirection { + ASC + DESC +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/directives.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/directives.graphqls new file mode 100644 index 000000000..59d6b45c6 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/directives.graphqls @@ -0,0 +1,6 @@ +extend schema @link(url: "https://specs.apollo.dev/federation/v2.0", import: ["@key", "@shareable", "@external"]) + +directive @goField( + forceResolver: Boolean + name: String +) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/iotapp.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/iotapp.graphqls new file mode 100644 index 000000000..d29c88fdb --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/iotapp.graphqls @@ -0,0 +1,41 @@ +type IOTApp @shareable { + accountName: String! + apiVersion: String + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + deviceBlueprintName: String! + displayName: String! + enabled: Boolean + environmentName: String! + id: ID! + kind: String + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + metadata: Metadata @goField(name: "objectMeta") + projectName: String! + recordVersion: Int! + spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpec! + status: Github__com___kloudlite___operator___pkg___operator__Status + updateTime: Date! +} + +type IOTAppEdge @shareable { + cursor: String! + node: IOTApp! +} + +type IOTAppPaginatedRecords @shareable { + edges: [IOTAppEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTAppIn { + apiVersion: String + displayName: String! + enabled: Boolean + kind: String + metadata: MetadataIn + spec: Github__com___kloudlite___operator___apis___crds___v1__AppSpecIn! +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/iotdeployment.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/iotdeployment.graphqls new file mode 100644 index 000000000..a09e48d33 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/iotdeployment.graphqls @@ -0,0 +1,35 @@ +type IOTDeployment @shareable { + accountName: String! + CIDR: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + environmentName: String! + exposedServices: [Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedService!]! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTDeploymentEdge @shareable { + cursor: String! + node: IOTDeployment! +} + +type IOTDeploymentPaginatedRecords @shareable { + edges: [IOTDeploymentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTDeploymentIn { + CIDR: String! + displayName: String! + exposedServices: [Github__com___kloudlite___api___apps___iot____console___internal___entities__ExposedServiceIn!]! + name: String! +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/iotdevice.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/iotdevice.graphqls new file mode 100644 index 000000000..3da9969a3 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/iotdevice.graphqls @@ -0,0 +1,45 @@ +type IOTDevice @shareable { + accountName: String! + blueprint: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + deployment: String! + displayName: String! + environmentName: String! + id: ID! + ip: String! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + podCIDR: String! + projectName: String! + publicKey: String! + recordVersion: Int! + serviceCIDR: String! + updateTime: Date! + version: String! +} + +type IOTDeviceEdge @shareable { + cursor: String! + node: IOTDevice! +} + +type IOTDevicePaginatedRecords @shareable { + edges: [IOTDeviceEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTDeviceIn { + blueprint: String! + deployment: String! + displayName: String! + ip: String! + name: String! + podCIDR: String! + publicKey: String! + serviceCIDR: String! + version: String! +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/iotdeviceblueprint.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/iotdeviceblueprint.graphqls new file mode 100644 index 000000000..24cfc927d --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/iotdeviceblueprint.graphqls @@ -0,0 +1,35 @@ +type IOTDeviceBlueprint @shareable { + accountName: String! + bluePrintType: Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + environmentName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! + version: String! +} + +type IOTDeviceBlueprintEdge @shareable { + cursor: String! + node: IOTDeviceBlueprint! +} + +type IOTDeviceBlueprintPaginatedRecords @shareable { + edges: [IOTDeviceBlueprintEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTDeviceBlueprintIn { + bluePrintType: Github__com___kloudlite___api___apps___iot____console___internal___entities__BluePrintType! + displayName: String! + name: String! + version: String! +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/iotenvironment.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/iotenvironment.graphqls new file mode 100644 index 000000000..f6c653800 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/iotenvironment.graphqls @@ -0,0 +1,30 @@ +type IOTEnvironment @shareable { + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + projectName: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTEnvironmentEdge @shareable { + cursor: String! + node: IOTEnvironment! +} + +type IOTEnvironmentPaginatedRecords @shareable { + edges: [IOTEnvironmentEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTEnvironmentIn { + displayName: String! + name: String! +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/iotproject.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/iotproject.graphqls new file mode 100644 index 000000000..2f71e8f45 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/iotproject.graphqls @@ -0,0 +1,29 @@ +type IOTProject @shareable { + accountName: String! + createdBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + creationTime: Date! + displayName: String! + id: ID! + lastUpdatedBy: Github__com___kloudlite___api___common__CreatedOrUpdatedBy! + markedForDeletion: Boolean + name: String! + recordVersion: Int! + updateTime: Date! +} + +type IOTProjectEdge @shareable { + cursor: String! + node: IOTProject! +} + +type IOTProjectPaginatedRecords @shareable { + edges: [IOTProjectEdge!]! + pageInfo: PageInfo! + totalCount: Int! +} + +input IOTProjectIn { + displayName: String! + name: String! +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/matchfilter.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/matchfilter.graphqls new file mode 100644 index 000000000..ef1a0cb45 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/matchfilter.graphqls @@ -0,0 +1,20 @@ +type MatchFilter @shareable { + array: [Any!] + exact: Any + matchType: MatchFilterMatchType! + regex: String +} + +input MatchFilterIn { + array: [Any!] + exact: Any + matchType: MatchFilterMatchType! + regex: String +} + +enum MatchFilterMatchType { + array + exact + regex +} + diff --git a/apps/iot-console/internal/app/graph/struct-to-graphql/scalars.graphqls b/apps/iot-console/internal/app/graph/struct-to-graphql/scalars.graphqls new file mode 100644 index 000000000..1f83443a9 --- /dev/null +++ b/apps/iot-console/internal/app/graph/struct-to-graphql/scalars.graphqls @@ -0,0 +1,4 @@ +scalar Any +scalar Json +scalar Map +scalar Date diff --git a/apps/iot-console/internal/domain/api.go b/apps/iot-console/internal/domain/api.go new file mode 100644 index 000000000..1250bfda5 --- /dev/null +++ b/apps/iot-console/internal/domain/api.go @@ -0,0 +1,86 @@ +package domain + +import ( + "context" + "github.com/kloudlite/api/apps/iot-console/internal/entities" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type IotConsoleContext struct { + context.Context + AccountName string + + UserId repos.ID + UserEmail string + UserName string +} + +type IotResourceContext struct { + IotConsoleContext + ProjectName string + EnvironmentName string +} + +func (r IotResourceContext) IOTConsoleDBFilters() repos.Filter { + return repos.Filter{ + fields.AccountName: r.AccountName, + fields.ProjectName: r.ProjectName, + fields.EnvironmentName: r.EnvironmentName, + } +} + +func (i IotConsoleContext) GetUserId() repos.ID { return i.UserId } + +func (i IotConsoleContext) GetUserEmail() string { + return i.UserEmail +} + +func (i IotConsoleContext) GetUserName() string { + return i.UserName +} +func (i IotConsoleContext) GetAccountName() string { return i.AccountName } + +type Domain interface { + ListProjects(ctx IotConsoleContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTProject], error) + GetProject(ctx IotConsoleContext, name string) (*entities.IOTProject, error) + + CreateProject(ctx IotConsoleContext, project entities.IOTProject) (*entities.IOTProject, error) + UpdateProject(ctx IotConsoleContext, project entities.IOTProject) (*entities.IOTProject, error) + DeleteProject(ctx IotConsoleContext, name string) error + + ListEnvironments(ctx IotConsoleContext, projectName string, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTEnvironment], error) + GetEnvironment(ctx IotConsoleContext, projectName string, name string) (*entities.IOTEnvironment, error) + + CreateEnvironment(ctx IotConsoleContext, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) + UpdateEnvironment(ctx IotConsoleContext, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) + DeleteEnvironment(ctx IotConsoleContext, projectName string, name string) error + + ListDeployments(ctx IotResourceContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTDeployment], error) + GetDeployment(ctx IotResourceContext, name string) (*entities.IOTDeployment, error) + + CreateDeployment(ctx IotResourceContext, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) + UpdateDeployment(ctx IotResourceContext, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) + DeleteDeployment(ctx IotResourceContext, name string) error + + ListDevices(ctx IotResourceContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTDevice], error) + GetDevice(ctx IotResourceContext, name string) (*entities.IOTDevice, error) + + CreateDevice(ctx IotResourceContext, device entities.IOTDevice) (*entities.IOTDevice, error) + UpdateDevice(ctx IotResourceContext, device entities.IOTDevice) (*entities.IOTDevice, error) + DeleteDevice(ctx IotResourceContext, name string) error + + ListDeviceBlueprints(ctx IotResourceContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTDeviceBlueprint], error) + GetDeviceBlueprint(ctx IotResourceContext, name string) (*entities.IOTDeviceBlueprint, error) + + CreateDeviceBlueprint(ctx IotResourceContext, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) + UpdateDeviceBlueprint(ctx IotResourceContext, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) + DeleteDeviceBlueprint(ctx IotResourceContext, name string) error + + ListApps(ctx IotResourceContext, deviceBlueprintName string, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTApp], error) + GetApp(ctx IotResourceContext, deviceBlueprintName string, name string) (*entities.IOTApp, error) + + CreateApp(ctx IotResourceContext, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) + UpdateApp(ctx IotResourceContext, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) + DeleteApp(ctx IotResourceContext, deviceBlueprintName string, name string) error +} diff --git a/apps/iot-console/internal/domain/domain.go b/apps/iot-console/internal/domain/domain.go new file mode 100644 index 000000000..a626c07f3 --- /dev/null +++ b/apps/iot-console/internal/domain/domain.go @@ -0,0 +1,55 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + "github.com/kloudlite/api/apps/iot-console/internal/env" + "github.com/kloudlite/api/pkg/k8s" + "github.com/kloudlite/api/pkg/kv" + "github.com/kloudlite/api/pkg/logging" + "github.com/kloudlite/api/pkg/repos" + "go.uber.org/fx" +) + +type domain struct { + k8sClient k8s.Client + logger logging.Logger + + iotProjectRepo repos.DbRepo[*entities.IOTProject] + iotEnvironmentRepo repos.DbRepo[*entities.IOTEnvironment] + iotDeploymentRepo repos.DbRepo[*entities.IOTDeployment] + iotDeviceRepo repos.DbRepo[*entities.IOTDevice] + iotDeviceBlueprintRepo repos.DbRepo[*entities.IOTDeviceBlueprint] + iotAppRepo repos.DbRepo[*entities.IOTApp] + + envVars *env.Env +} + +type IOTConsoleCacheStore kv.BinaryDataRepo + +var Module = fx.Module("domain", + fx.Provide(func( + k8sClient k8s.Client, + logger logging.Logger, + + iotProjectRepo repos.DbRepo[*entities.IOTProject], + iotEnvironmentRepo repos.DbRepo[*entities.IOTEnvironment], + iotDeploymentRepo repos.DbRepo[*entities.IOTDeployment], + iotDeviceRepo repos.DbRepo[*entities.IOTDevice], + iotDeviceBlueprintRepo repos.DbRepo[*entities.IOTDeviceBlueprint], + iotAppRepo repos.DbRepo[*entities.IOTApp], + + ev *env.Env, + ) Domain { + return &domain{ + k8sClient: k8sClient, + logger: logger, + iotProjectRepo: iotProjectRepo, + iotEnvironmentRepo: iotEnvironmentRepo, + iotDeploymentRepo: iotDeploymentRepo, + iotDeviceRepo: iotDeviceRepo, + iotDeviceBlueprintRepo: iotDeviceBlueprintRepo, + iotAppRepo: iotAppRepo, + envVars: ev, + } + }), +) diff --git a/apps/iot-console/internal/domain/iot-app.go b/apps/iot-console/internal/domain/iot-app.go new file mode 100644 index 000000000..fea7e6e5d --- /dev/null +++ b/apps/iot-console/internal/domain/iot-app.go @@ -0,0 +1,94 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fc "github.com/kloudlite/api/apps/iot-console/internal/entities/field-constants" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func (d *domain) findApp(ctx IotResourceContext, deviceBlueprintName string, name string) (*entities.IOTApp, error) { + filter := ctx.IOTConsoleDBFilters() + filter.Add(fc.IOTAppDeviceBlueprintName, deviceBlueprintName) + filter.Add(fields.MetadataName, name) + app, err := d.iotAppRepo.FindOne(ctx, filter) + if err != nil { + return nil, errors.NewE(err) + } + if app == nil { + return nil, errors.Newf("no app with name=%q found", name) + } + return app, nil +} + +func (d *domain) ListApps(ctx IotResourceContext, deviceBlueprintName string, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTApp], error) { + filter := ctx.IOTConsoleDBFilters() + filter.Add(fc.IOTAppDeviceBlueprintName, deviceBlueprintName) + return d.iotAppRepo.FindPaginated(ctx, d.iotDeviceRepo.MergeMatchFilters(filter, search), pq) +} + +func (d *domain) GetApp(ctx IotResourceContext, deviceBlueprintName string, name string) (*entities.IOTApp, error) { + return d.findApp(ctx, deviceBlueprintName, name) +} + +func (d *domain) CreateApp(ctx IotResourceContext, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) { + app.ProjectName = ctx.ProjectName + app.AccountName = ctx.AccountName + app.EnvironmentName = ctx.EnvironmentName + app.CreatedBy = common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + } + app.LastUpdatedBy = app.CreatedBy + app.DeviceBlueprintName = deviceBlueprintName + + nApp, err := d.iotAppRepo.Create(ctx, &app) + if err != nil { + return nil, errors.NewE(err) + } + + return nApp, nil +} + +func (d *domain) UpdateApp(ctx IotResourceContext, deviceBlueprintName string, app entities.IOTApp) (*entities.IOTApp, error) { + patchForUpdate := repos.Document{ + fields.DisplayName: app.DisplayName, + fields.LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.GetUserId(), + UserName: ctx.GetUserName(), + UserEmail: ctx.GetUserEmail(), + }, + fc.IOTAppDeviceBlueprintName: deviceBlueprintName, + } + patchFilter := ctx.IOTConsoleDBFilters() + patchFilter.Add(fc.IOTAppDeviceBlueprintName, deviceBlueprintName) + patchFilter.Add(fields.MetadataName, app.Name) + + upApp, err := d.iotAppRepo.Patch( + ctx, + patchFilter, + patchForUpdate, + ) + if err != nil { + return nil, errors.NewE(err) + } + + return upApp, nil +} + +func (d *domain) DeleteApp(ctx IotResourceContext, deviceBlueprintName string, name string) error { + filter := ctx.IOTConsoleDBFilters() + filter.Add(fc.IOTAppDeviceBlueprintName, deviceBlueprintName) + filter.Add(fields.MetadataName, name) + err := d.iotAppRepo.DeleteOne( + ctx, + filter, + ) + if err != nil { + return errors.NewE(err) + } + return nil +} diff --git a/apps/iot-console/internal/domain/iot-deployment.go b/apps/iot-console/internal/domain/iot-deployment.go new file mode 100644 index 000000000..cb796f9a1 --- /dev/null +++ b/apps/iot-console/internal/domain/iot-deployment.go @@ -0,0 +1,84 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fc "github.com/kloudlite/api/apps/iot-console/internal/entities/field-constants" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func (d *domain) findDeployment(ctx IotResourceContext, name string) (*entities.IOTDeployment, error) { + prj, err := d.iotDeploymentRepo.FindOne(ctx, ctx.IOTConsoleDBFilters().Add(fc.IOTDeploymentName, name)) + if err != nil { + return nil, errors.NewE(err) + } + if prj == nil { + return nil, errors.Newf("no deployment with name=%q found", name) + } + return prj, nil +} + +func (d domain) ListDeployments(ctx IotResourceContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTDeployment], error) { + filter := ctx.IOTConsoleDBFilters() + return d.iotDeploymentRepo.FindPaginated(ctx, d.iotDeploymentRepo.MergeMatchFilters(filter, search), pagination) +} + +func (d domain) GetDeployment(ctx IotResourceContext, name string) (*entities.IOTDeployment, error) { + return d.findDeployment(ctx, name) +} + +func (d domain) CreateDeployment(ctx IotResourceContext, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) { + deployment.AccountName = ctx.AccountName + deployment.ProjectName = ctx.ProjectName + deployment.EnvironmentName = ctx.EnvironmentName + deployment.CreatedBy = common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + } + deployment.LastUpdatedBy = deployment.CreatedBy + + dep, err := d.iotDeploymentRepo.Create(ctx, &deployment) + if err != nil { + return nil, errors.NewE(err) + } + + return dep, nil +} + +func (d domain) UpdateDeployment(ctx IotResourceContext, deployment entities.IOTDeployment) (*entities.IOTDeployment, error) { + patchForUpdate := repos.Document{ + fields.DisplayName: deployment.DisplayName, + fields.LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.GetUserId(), + UserName: ctx.GetUserName(), + UserEmail: ctx.GetUserEmail(), + }, + } + + patchFilter := ctx.IOTConsoleDBFilters().Add(fc.IOTDeploymentName, deployment.Name) + + upDep, err := d.iotDeploymentRepo.Patch( + ctx, + patchFilter, + patchForUpdate, + ) + if err != nil { + return nil, errors.NewE(err) + } + + return upDep, nil +} + +func (d domain) DeleteDeployment(ctx IotResourceContext, name string) error { + err := d.iotDeploymentRepo.DeleteOne( + ctx, + ctx.IOTConsoleDBFilters().Add(fc.IOTDeploymentName, name), + ) + if err != nil { + return errors.NewE(err) + } + return nil +} diff --git a/apps/iot-console/internal/domain/iot-device-blueprint.go b/apps/iot-console/internal/domain/iot-device-blueprint.go new file mode 100644 index 000000000..f9114fbdb --- /dev/null +++ b/apps/iot-console/internal/domain/iot-device-blueprint.go @@ -0,0 +1,92 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fc "github.com/kloudlite/api/apps/iot-console/internal/entities/field-constants" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func (d *domain) findDeviceBlueprint(ctx IotResourceContext, name string) (*entities.IOTDeviceBlueprint, error) { + filter := ctx.IOTConsoleDBFilters() + filter.Add(fc.IOTDeviceBlueprintName, name) + devBlueprint, err := d.iotDeviceBlueprintRepo.FindOne(ctx, ctx.IOTConsoleDBFilters().Add("name", name)) + if err != nil { + return nil, errors.NewE(err) + } + if devBlueprint == nil { + return nil, errors.Newf("no device Blueprint with name=%q found", name) + } + return devBlueprint, nil +} + +func (d *domain) ListDeviceBlueprints(ctx IotResourceContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTDeviceBlueprint], error) { + filter := ctx.IOTConsoleDBFilters() + return d.iotDeviceBlueprintRepo.FindPaginated(ctx, d.iotDeviceBlueprintRepo.MergeMatchFilters(filter, search), pq) +} + +func (d *domain) GetDeviceBlueprint(ctx IotResourceContext, name string) (*entities.IOTDeviceBlueprint, error) { + return d.findDeviceBlueprint(ctx, name) +} + +func (d *domain) CreateDeviceBlueprint(ctx IotResourceContext, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) { + deviceBlueprint.ProjectName = ctx.ProjectName + deviceBlueprint.AccountName = ctx.AccountName + deviceBlueprint.EnvironmentName = ctx.EnvironmentName + deviceBlueprint.CreatedBy = common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + } + deviceBlueprint.LastUpdatedBy = deviceBlueprint.CreatedBy + + if deviceBlueprint.BluePrintType == "singleton_blueprint" { + deviceBlueprint.BluePrintType = entities.SingletonBlueprint + } else { + deviceBlueprint.BluePrintType = entities.GroupBlueprint + } + + nDeviceBlueprint, err := d.iotDeviceBlueprintRepo.Create(ctx, &deviceBlueprint) + if err != nil { + return nil, errors.NewE(err) + } + + return nDeviceBlueprint, nil +} + +func (d *domain) UpdateDeviceBlueprint(ctx IotResourceContext, deviceBlueprint entities.IOTDeviceBlueprint) (*entities.IOTDeviceBlueprint, error) { + patchForUpdate := repos.Document{ + fields.DisplayName: deviceBlueprint.DisplayName, + fields.LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.GetUserId(), + UserName: ctx.GetUserName(), + UserEmail: ctx.GetUserEmail(), + }, + } + + patchFilter := ctx.IOTConsoleDBFilters().Add(fc.IOTDeviceBlueprintName, deviceBlueprint.Name) + + upDevBlueprint, err := d.iotDeviceBlueprintRepo.Patch( + ctx, + patchFilter, + patchForUpdate, + ) + if err != nil { + return nil, errors.NewE(err) + } + + return upDevBlueprint, nil +} + +func (d *domain) DeleteDeviceBlueprint(ctx IotResourceContext, name string) error { + err := d.iotDeviceBlueprintRepo.DeleteOne( + ctx, + ctx.IOTConsoleDBFilters().Add(fc.IOTDeviceBlueprintName, name), + ) + if err != nil { + return errors.NewE(err) + } + return nil +} diff --git a/apps/iot-console/internal/domain/iot-device.go b/apps/iot-console/internal/domain/iot-device.go new file mode 100644 index 000000000..7b12c09b5 --- /dev/null +++ b/apps/iot-console/internal/domain/iot-device.go @@ -0,0 +1,86 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fc "github.com/kloudlite/api/apps/iot-console/internal/entities/field-constants" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func (d *domain) findDevice(ctx IotResourceContext, name string) (*entities.IOTDevice, error) { + filter := ctx.IOTConsoleDBFilters() + filter.Add("name", name) + dev, err := d.iotDeviceRepo.FindOne(ctx, ctx.IOTConsoleDBFilters().Add(fc.IOTDeviceName, name)) + if err != nil { + return nil, errors.NewE(err) + } + if dev == nil { + return nil, errors.Newf("no device with name=%q found", name) + } + return dev, nil +} + +func (d *domain) ListDevices(ctx IotResourceContext, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTDevice], error) { + filter := ctx.IOTConsoleDBFilters() + return d.iotDeviceRepo.FindPaginated(ctx, d.iotDeviceRepo.MergeMatchFilters(filter, search), pq) +} + +func (d *domain) GetDevice(ctx IotResourceContext, name string) (*entities.IOTDevice, error) { + return d.findDevice(ctx, name) +} + +func (d *domain) CreateDevice(ctx IotResourceContext, device entities.IOTDevice) (*entities.IOTDevice, error) { + device.ProjectName = ctx.ProjectName + device.AccountName = ctx.AccountName + device.EnvironmentName = ctx.EnvironmentName + device.CreatedBy = common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + } + device.LastUpdatedBy = device.CreatedBy + + nDevice, err := d.iotDeviceRepo.Create(ctx, &device) + if err != nil { + return nil, errors.NewE(err) + } + + return nDevice, nil +} + +func (d *domain) UpdateDevice(ctx IotResourceContext, device entities.IOTDevice) (*entities.IOTDevice, error) { + patchForUpdate := repos.Document{ + fields.DisplayName: device.DisplayName, + fields.LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.GetUserId(), + UserName: ctx.GetUserName(), + UserEmail: ctx.GetUserEmail(), + }, + } + + patchFilter := ctx.IOTConsoleDBFilters().Add(fc.IOTDeviceName, device.Name) + + upDev, err := d.iotDeviceRepo.Patch( + ctx, + patchFilter, + patchForUpdate, + ) + if err != nil { + return nil, errors.NewE(err) + } + + return upDev, nil +} + +func (d *domain) DeleteDevice(ctx IotResourceContext, name string) error { + err := d.iotDeviceRepo.DeleteOne( + ctx, + ctx.IOTConsoleDBFilters().Add(fc.IOTDeviceName, name), + ) + if err != nil { + return errors.NewE(err) + } + return nil +} diff --git a/apps/iot-console/internal/domain/iot-environment.go b/apps/iot-console/internal/domain/iot-environment.go new file mode 100644 index 000000000..45c6675eb --- /dev/null +++ b/apps/iot-console/internal/domain/iot-environment.go @@ -0,0 +1,96 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fc "github.com/kloudlite/api/apps/iot-console/internal/entities/field-constants" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func (d *domain) findEnvironment(ctx IotConsoleContext, projectName string, name string) (*entities.IOTEnvironment, error) { + env, err := d.iotEnvironmentRepo.FindOne(ctx, repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.ProjectName: projectName, + fc.IOTEnvironmentName: name, + }) + if err != nil { + return nil, errors.NewE(err) + } + if env == nil { + return nil, errors.Newf("no environment with name (%s) and project (%s)", name, projectName) + } + return env, nil +} + +func (d *domain) ListEnvironments(ctx IotConsoleContext, projectName string, search map[string]repos.MatchFilter, pq repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTEnvironment], error) { + filter := repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.ProjectName: projectName, + } + return d.iotEnvironmentRepo.FindPaginated(ctx, d.iotEnvironmentRepo.MergeMatchFilters(filter, search), pq) +} + +func (d *domain) GetEnvironment(ctx IotConsoleContext, projectName string, name string) (*entities.IOTEnvironment, error) { + return d.findEnvironment(ctx, projectName, name) +} + +func (d *domain) CreateEnvironment(ctx IotConsoleContext, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) { + env.ProjectName = projectName + env.AccountName = ctx.AccountName + env.CreatedBy = common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + } + env.LastUpdatedBy = env.CreatedBy + + nEnv, err := d.iotEnvironmentRepo.Create(ctx, &env) + if err != nil { + return nil, errors.NewE(err) + } + + return nEnv, nil +} + +func (d *domain) UpdateEnvironment(ctx IotConsoleContext, projectName string, env entities.IOTEnvironment) (*entities.IOTEnvironment, error) { + patchForUpdate := repos.Document{ + fields.DisplayName: env.DisplayName, + fields.LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.GetUserId(), + UserName: ctx.GetUserName(), + UserEmail: ctx.GetUserEmail(), + }, + } + + upEnv, err := d.iotEnvironmentRepo.Patch( + ctx, + repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.ProjectName: projectName, + fc.IOTEnvironmentName: env.Name, + }, + patchForUpdate, + ) + if err != nil { + return nil, errors.NewE(err) + } + + return upEnv, nil +} + +func (d *domain) DeleteEnvironment(ctx IotConsoleContext, projectName string, name string) error { + err := d.iotEnvironmentRepo.DeleteOne( + ctx, + repos.Filter{ + fields.AccountName: ctx.AccountName, + fields.ProjectName: projectName, + fc.IOTEnvironmentName: name, + }, + ) + if err != nil { + return errors.NewE(err) + } + return nil +} diff --git a/apps/iot-console/internal/domain/iot-project.go b/apps/iot-console/internal/domain/iot-project.go new file mode 100644 index 000000000..57e7ddd7c --- /dev/null +++ b/apps/iot-console/internal/domain/iot-project.go @@ -0,0 +1,90 @@ +package domain + +import ( + "github.com/kloudlite/api/apps/iot-console/internal/entities" + fc "github.com/kloudlite/api/apps/iot-console/internal/entities/field-constants" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/repos" +) + +func (d *domain) findProject(ctx IotConsoleContext, name string) (*entities.IOTProject, error) { + prj, err := d.iotProjectRepo.FindOne(ctx, repos.Filter{ + fc.IOTProjectName: name, + }) + if err != nil { + return nil, errors.NewE(err) + } + if prj == nil { + return nil, errors.Newf("no project with name=%q found", name) + } + return prj, nil +} + +func (d *domain) ListProjects(ctx IotConsoleContext, search map[string]repos.MatchFilter, pagination repos.CursorPagination) (*repos.PaginatedRecord[*entities.IOTProject], error) { + filter := repos.Filter{ + fields.AccountName: ctx.AccountName, + } + return d.iotProjectRepo.FindPaginated(ctx, d.iotDeploymentRepo.MergeMatchFilters(filter, search), pagination) +} + +func (d *domain) GetProject(ctx IotConsoleContext, name string) (*entities.IOTProject, error) { + return d.findProject(ctx, name) +} + +func (d *domain) CreateProject(ctx IotConsoleContext, project entities.IOTProject) (*entities.IOTProject, error) { + project.AccountName = ctx.AccountName + project.CreatedBy = common.CreatedOrUpdatedBy{ + UserId: ctx.UserId, + UserName: ctx.UserName, + UserEmail: ctx.UserEmail, + } + project.LastUpdatedBy = project.CreatedBy + + prj, err := d.iotProjectRepo.Create(ctx, &project) + if err != nil { + return nil, errors.NewE(err) + } + + return prj, nil +} + +func (d *domain) UpdateProject(ctx IotConsoleContext, project entities.IOTProject) (*entities.IOTProject, error) { + patchForUpdate := repos.Document{ + fields.DisplayName: project.DisplayName, + fields.LastUpdatedBy: common.CreatedOrUpdatedBy{ + UserId: ctx.GetUserId(), + UserName: ctx.GetUserName(), + UserEmail: ctx.GetUserEmail(), + }, + } + + upProject, err := d.iotProjectRepo.Patch( + ctx, + repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.IOTProjectName: project.Name, + }, + patchForUpdate, + ) + if err != nil { + return nil, errors.NewE(err) + } + + return upProject, nil +} + +func (d *domain) DeleteProject(ctx IotConsoleContext, name string) error { + err := d.iotProjectRepo.DeleteOne( + ctx, + repos.Filter{ + fields.AccountName: ctx.AccountName, + fc.IOTProjectName: name, + }, + ) + if err != nil { + return errors.NewE(err) + } + return nil +} diff --git a/apps/iot-console/internal/entities/field-constants/gen.go b/apps/iot-console/internal/entities/field-constants/gen.go new file mode 100644 index 000000000..fa7caa93d --- /dev/null +++ b/apps/iot-console/internal/entities/field-constants/gen.go @@ -0,0 +1,3 @@ +package field_constants + +//go:generate go run github.com/kloudlite/api/cmd/struct-json-path --pkg github.com/kloudlite/api/apps/iot-console/internal/entities --common-path "metadata" --common-path "apiVersion" --common-path "kind" --common-path "status" --common-path "syncStatus" --common-path "lastUpdatedBy" --common-path "createdBy" --common-path "displayName" --common-path "creationTime" --common-path "updateTime" --common-path "id" --common-path "recordVersion" --common-path "accountName" --common-path "projectName" --common-path "environmentName" --out-file ./generated_constants.go --banner "package field_constants" --ignore-nesting "time.Time" --ignore-nesting "k8s.io/apimachinery/pkg/apis/meta/v1.Time" diff --git a/apps/iot-console/internal/entities/field-constants/generated_constants.go b/apps/iot-console/internal/entities/field-constants/generated_constants.go new file mode 100644 index 000000000..59544cc7b --- /dev/null +++ b/apps/iot-console/internal/entities/field-constants/generated_constants.go @@ -0,0 +1,77 @@ +// DO NOT EDIT. generated by "github.com/kloudlite/api/cmd/struct-json-path" + +package field_constants + +// constant vars generated for struct ExposedService +const ( + ExposedServiceIp = "ip" + ExposedServiceName = "name" +) + +// constant vars generated for struct IOTApp +const ( + IOTAppDeviceBlueprintName = "deviceBlueprintName" + IOTAppEnabled = "enabled" + IOTAppMarkedForDeletion = "markedForDeletion" + IOTAppSpec = "spec" + IOTAppSpecContainers = "spec.containers" + IOTAppSpecDisplayName = "spec.displayName" + IOTAppSpecFreeze = "spec.freeze" + IOTAppSpecHpa = "spec.hpa" + IOTAppSpecHpaEnabled = "spec.hpa.enabled" + IOTAppSpecHpaMaxReplicas = "spec.hpa.maxReplicas" + IOTAppSpecHpaMinReplicas = "spec.hpa.minReplicas" + IOTAppSpecHpaThresholdCpu = "spec.hpa.thresholdCpu" + IOTAppSpecHpaThresholdMemory = "spec.hpa.thresholdMemory" + IOTAppSpecIntercept = "spec.intercept" + IOTAppSpecInterceptEnabled = "spec.intercept.enabled" + IOTAppSpecInterceptToDevice = "spec.intercept.toDevice" + IOTAppSpecNodeSelector = "spec.nodeSelector" + IOTAppSpecRegion = "spec.region" + IOTAppSpecReplicas = "spec.replicas" + IOTAppSpecServiceAccount = "spec.serviceAccount" + IOTAppSpecServices = "spec.services" + IOTAppSpecTolerations = "spec.tolerations" + IOTAppSpecTopologySpreadConstraints = "spec.topologySpreadConstraints" +) + +// constant vars generated for struct IOTDeployment +const ( + IOTDeploymentCIDR = "CIDR" + IOTDeploymentExposedServices = "exposedServices" + IOTDeploymentMarkedForDeletion = "markedForDeletion" + IOTDeploymentName = "name" +) + +// constant vars generated for struct IOTDevice +const ( + IOTDeviceBlueprint = "blueprint" + IOTDeviceDeployment = "deployment" + IOTDeviceIp = "ip" + IOTDeviceMarkedForDeletion = "markedForDeletion" + IOTDeviceName = "name" + IOTDevicePodCIDR = "podCIDR" + IOTDevicePublicKey = "publicKey" + IOTDeviceServiceCIDR = "serviceCIDR" + IOTDeviceVersion = "version" +) + +// constant vars generated for struct IOTDeviceBlueprint +const ( + IOTDeviceBlueprintBluePrintType = "bluePrintType" + IOTDeviceBlueprintMarkedForDeletion = "markedForDeletion" + IOTDeviceBlueprintName = "name" + IOTDeviceBlueprintVersion = "version" +) + +// constant vars generated for struct IOTEnvironment +const ( + IOTEnvironmentMarkedForDeletion = "markedForDeletion" + IOTEnvironmentName = "name" +) + +// constant vars generated for struct IOTProject +const ( + IOTProjectMarkedForDeletion = "markedForDeletion" + IOTProjectName = "name" +) diff --git a/apps/iot-console/internal/entities/iot-app.go b/apps/iot-console/internal/entities/iot-app.go new file mode 100644 index 000000000..d45647b5f --- /dev/null +++ b/apps/iot-console/internal/entities/iot-app.go @@ -0,0 +1,38 @@ +package entities + +import ( + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" + crdsv1 "github.com/kloudlite/operator/apis/crds/v1" +) + +type IOTApp struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + common.ResourceMetadata `json:",inline"` + + crdsv1.App `json:",inline"` + + AccountName string `json:"accountName" graphql:"noinput"` + ProjectName string `json:"projectName" graphql:"noinput"` + EnvironmentName string `json:"environmentName" graphql:"noinput"` + DeviceBlueprintName string `json:"deviceBlueprintName" graphql:"noinput"` +} + +var IOTAppIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: fields.MetadataName, Value: repos.IndexAsc}, + {Key: fields.AccountName, Value: repos.IndexAsc}, + {Key: fields.ProjectName, Value: repos.IndexAsc}, + {Key: fields.EnvironmentName, Value: repos.IndexAsc}, + }, + Unique: true, + }, +} diff --git a/apps/iot-console/internal/entities/iot-deployment.go b/apps/iot-console/internal/entities/iot-deployment.go new file mode 100644 index 000000000..6ce87816b --- /dev/null +++ b/apps/iot-console/internal/entities/iot-deployment.go @@ -0,0 +1,39 @@ +package entities + +import ( + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type IOTDeployment struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + Name string `json:"name"` + AccountName string `json:"accountName" graphql:"noinput"` + ProjectName string `json:"projectName" graphql:"noinput"` + EnvironmentName string `json:"environmentName" graphql:"noinput"` + CIDR string `json:"CIDR"` + ExposedServices []ExposedService `json:"exposedServices"` + + common.ResourceMetadata `json:",inline"` +} + +type ExposedService struct { + Name string `json:"name"` + IP string `json:"ip"` +} + +var IOTDeploymentIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + {Key: "CIDR", Value: repos.IndexAsc}, + }, + Unique: true, + }, +} diff --git a/apps/iot-console/internal/entities/iot-device-blueprint.go b/apps/iot-console/internal/entities/iot-device-blueprint.go new file mode 100644 index 000000000..2e0ca8a27 --- /dev/null +++ b/apps/iot-console/internal/entities/iot-device-blueprint.go @@ -0,0 +1,44 @@ +package entities + +import ( + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type BluePrintType string + +const ( + SingletonBlueprint BluePrintType = "singleton_blueprint" + GroupBlueprint BluePrintType = "group_blueprint" +) + +type IOTDeviceBlueprint struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + common.ResourceMetadata `json:",inline"` + + Name string `json:"name"` + AccountName string `json:"accountName" graphql:"noinput"` + ProjectName string `json:"projectName" graphql:"noinput"` + EnvironmentName string `json:"environmentName" graphql:"noinput"` + BluePrintType BluePrintType `json:"bluePrintType"` + Version string `json:"version"` +} + +var IOTDeviceBlueprintIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + { + Key: "name", + Value: repos.IndexAsc, + }, + }, + Unique: true, + }, +} diff --git a/apps/iot-console/internal/entities/iot-device.go b/apps/iot-console/internal/entities/iot-device.go new file mode 100644 index 000000000..527140839 --- /dev/null +++ b/apps/iot-console/internal/entities/iot-device.go @@ -0,0 +1,42 @@ +package entities + +import ( + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type IOTDevice struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + common.ResourceMetadata `json:",inline"` + + Name string `json:"name"` + AccountName string `json:"accountName" graphql:"noinput"` + ProjectName string `json:"projectName" graphql:"noinput"` + EnvironmentName string `json:"environmentName" graphql:"noinput"` + PublicKey string `json:"publicKey"` + ServiceCIDR string `json:"serviceCIDR"` + PodCIDR string `json:"podCIDR"` + IP string `json:"ip"` + Blueprint string `json:"blueprint"` + Deployment string `json:"deployment"` + Version string `json:"version"` +} + +var IOTDeviceIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + { + Key: "name", + Value: repos.IndexAsc, + }, + }, + Unique: true, + }, +} diff --git a/apps/iot-console/internal/entities/iot-environment.go b/apps/iot-console/internal/entities/iot-environment.go new file mode 100644 index 000000000..9d59dfbfb --- /dev/null +++ b/apps/iot-console/internal/entities/iot-environment.go @@ -0,0 +1,35 @@ +package entities + +import ( + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type IOTEnvironment struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + + Name string `json:"name"` + AccountName string `json:"accountName" graphql:"noinput"` + ProjectName string `json:"projectName" graphql:"noinput"` + + common.ResourceMetadata `json:",inline"` +} + +var IOTEnvironmentIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + { + Key: "name", + Value: repos.IndexAsc, + }, + }, + Unique: true, + }, +} diff --git a/apps/iot-console/internal/entities/iot-project.go b/apps/iot-console/internal/entities/iot-project.go new file mode 100644 index 000000000..bcec9a17f --- /dev/null +++ b/apps/iot-console/internal/entities/iot-project.go @@ -0,0 +1,34 @@ +package entities + +import ( + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/common/fields" + "github.com/kloudlite/api/pkg/repos" +) + +type IOTProject struct { + repos.BaseEntity `json:",inline" graphql:"noinput"` + + Name string `json:"name"` + AccountName string `json:"accountName" graphql:"noinput"` + + common.ResourceMetadata `json:",inline"` +} + +var IOTProjectIndexes = []repos.IndexField{ + { + Field: []repos.IndexKey{ + {Key: fields.Id, Value: repos.IndexAsc}, + }, + Unique: true, + }, + { + Field: []repos.IndexKey{ + { + Key: "name", + Value: repos.IndexAsc, + }, + }, + Unique: true, + }, +} diff --git a/apps/iot-console/internal/env/env.go b/apps/iot-console/internal/env/env.go new file mode 100644 index 000000000..0357f3cd3 --- /dev/null +++ b/apps/iot-console/internal/env/env.go @@ -0,0 +1,40 @@ +package env + +import ( + "github.com/codingconcepts/env" + "github.com/kloudlite/api/pkg/errors" +) + +type Env struct { + Port uint16 `env:"HTTP_PORT" required:"true"` + + IotDeviceDBUri string `env:"MONGO_URI" required:"true"` + IotDeviceDBName string `env:"MONGO_DB_NAME" required:"true"` + + AccountCookieName string `env:"ACCOUNT_COOKIE_NAME" required:"true"` + ClusterCookieName string `env:"CLUSTER_COOKIE_NAME" required:"true"` + + // NATS:start + NatsURL string `env:"NATS_URL" required:"true"` + NatsResourceSyncStream string `env:"NATS_RESOURCE_STREAM" required:"true"` + // NATS:end + + DefaultProjectWorkspaceName string `env:"DEFAULT_PROJECT_WORKSPACE_NAME" required:"true"` + + PromHttpAddr string `env:"PROM_HTTP_ADDR" required:"true"` + IsDev bool + KubernetesApiProxy string `env:"KUBERNETES_API_PROXY"` + + SessionKVBucket string `env:"SESSION_KV_BUCKET" required:"true"` + ConsoleCacheKVBucket string `env:"CONSOLE_CACHE_KV_BUCKET" required:"true"` + + DeviceNamespace string `env:"DEVICE_NAMESPACE" required:"true"` +} + +func LoadEnv() (*Env, error) { + var e Env + if err := env.Set(&e); err != nil { + return nil, errors.NewE(err) + } + return &e, nil +} diff --git a/apps/iot-console/internal/framework/framework.go b/apps/iot-console/internal/framework/framework.go new file mode 100644 index 000000000..0d8ef42cf --- /dev/null +++ b/apps/iot-console/internal/framework/framework.go @@ -0,0 +1,80 @@ +package framework + +import ( + "context" + "fmt" + "github.com/kloudlite/api/apps/iot-console/internal/app" + "github.com/kloudlite/api/apps/iot-console/internal/domain" + "github.com/kloudlite/api/apps/iot-console/internal/env" + "github.com/kloudlite/api/common" + httpServer "github.com/kloudlite/api/pkg/http-server" + "github.com/kloudlite/api/pkg/k8s" + "github.com/kloudlite/api/pkg/kv" + "github.com/kloudlite/api/pkg/logging" + "github.com/kloudlite/api/pkg/nats" + mongoDb "github.com/kloudlite/api/pkg/repos" + "go.uber.org/fx" + "k8s.io/client-go/rest" +) + +type fm struct { + ev *env.Env +} + +func (fm *fm) GetMongoConfig() (url string, dbName string) { + return fm.ev.IotDeviceDBUri, fm.ev.IotDeviceDBName +} + +var Module = fx.Module("framework", + fx.Provide(func(ev *env.Env) *fm { + return &fm{ev} + }), + + mongoDb.NewMongoClientFx[*fm](), + + fx.Provide(func(ev *env.Env, logger logging.Logger) (*nats.Client, error) { + return nats.NewClient(ev.NatsURL, nats.ClientOpts{ + Name: "console", + Logger: logger, + }) + }), + + fx.Provide(func(c *nats.Client) (*nats.JetstreamClient, error) { + return nats.NewJetstreamClient(c) + }), + + fx.Provide( + func(ev *env.Env, jc *nats.JetstreamClient) (kv.Repo[*common.AuthSession], error) { + cxt := context.TODO() + return kv.NewNatsKVRepo[*common.AuthSession](cxt, ev.SessionKVBucket, jc) + }, + ), + + fx.Provide( + func(ev *env.Env, jc *nats.JetstreamClient) (domain.IOTConsoleCacheStore, error) { + return kv.NewNatsKVBinaryRepo(context.TODO(), ev.ConsoleCacheKVBucket, jc) + }, + ), + + fx.Provide(func(restCfg *rest.Config) (k8s.Client, error) { + return k8s.NewClient(restCfg, nil) + }), + + app.Module, + + fx.Provide(func(logger logging.Logger, e *env.Env) httpServer.Server { + corsOrigins := "https://studio.apollographql.com" + return httpServer.NewServer(httpServer.ServerArgs{Logger: logger, CorsAllowOrigins: &corsOrigins, IsDev: e.IsDev}) + }), + + fx.Invoke(func(lf fx.Lifecycle, server httpServer.Server, ev *env.Env) { + lf.Append(fx.Hook{ + OnStart: func(context.Context) error { + return server.Listen(fmt.Sprintf(":%d", ev.Port)) + }, + OnStop: func(context.Context) error { + return server.Close() + }, + }) + }), +) diff --git a/apps/iot-console/main.go b/apps/iot-console/main.go new file mode 100644 index 000000000..13507a23c --- /dev/null +++ b/apps/iot-console/main.go @@ -0,0 +1,70 @@ +package main + +import ( + "context" + "flag" + "github.com/kloudlite/api/apps/iot-console/internal/env" + "github.com/kloudlite/api/apps/iot-console/internal/framework" + "github.com/kloudlite/api/common" + "github.com/kloudlite/api/pkg/errors" + "github.com/kloudlite/api/pkg/k8s" + "github.com/kloudlite/api/pkg/logging" + "go.uber.org/fx" + "k8s.io/client-go/rest" + "os" + "time" +) + +func main() { + var isDev bool + flag.BoolVar(&isDev, "dev", false, "--dev") + flag.Parse() + + logger, err := logging.New(&logging.Options{Name: "console", Dev: isDev}) + if err != nil { + panic(err) + } + + app := fx.New( + fx.NopLogger, + + fx.Provide(func() logging.Logger { + return logger + }), + + fx.Provide(func() (*env.Env, error) { + if e, err := env.LoadEnv(); err != nil { + return nil, errors.NewE(err) + } else { + e.IsDev = isDev + return e, nil + } + }), + + fx.Provide(func(e *env.Env) (*rest.Config, error) { + if e.KubernetesApiProxy != "" { + return &rest.Config{ + Host: e.KubernetesApiProxy, + }, nil + } + return k8s.RestInclusterConfig() + }), + framework.Module, + ) + ctx, cancelFunc := func() (context.Context, context.CancelFunc) { + if isDev { + return context.WithTimeout(context.TODO(), 20*time.Second) + } + return context.WithTimeout(context.TODO(), 5*time.Second) + }() + defer cancelFunc() + + if err := app.Start(ctx); err != nil { + logger.Errorf(err, "iot device startup errors") + logger.Infof("EXITING as errors encountered during startup") + os.Exit(1) + } + + common.PrintReadyBanner() + <-app.Done() +}