mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-10 08:57:25 +01:00
9955 lines
269 KiB
Go
9955 lines
269 KiB
Go
// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
|
|
|
|
package generated
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"errors"
|
|
"strconv"
|
|
"sync"
|
|
"sync/atomic"
|
|
"time"
|
|
|
|
"github.com/99designs/gqlgen/graphql"
|
|
"github.com/99designs/gqlgen/graphql/introspection"
|
|
"github.com/ClusterCockpit/cc-jobarchive/graph/model"
|
|
"github.com/ClusterCockpit/cc-jobarchive/schema"
|
|
gqlparser "github.com/vektah/gqlparser/v2"
|
|
"github.com/vektah/gqlparser/v2/ast"
|
|
)
|
|
|
|
// region ************************** generated!.gotpl **************************
|
|
|
|
// NewExecutableSchema creates an ExecutableSchema from the ResolverRoot interface.
|
|
func NewExecutableSchema(cfg Config) graphql.ExecutableSchema {
|
|
return &executableSchema{
|
|
resolvers: cfg.Resolvers,
|
|
directives: cfg.Directives,
|
|
complexity: cfg.Complexity,
|
|
}
|
|
}
|
|
|
|
type Config struct {
|
|
Resolvers ResolverRoot
|
|
Directives DirectiveRoot
|
|
Complexity ComplexityRoot
|
|
}
|
|
|
|
type ResolverRoot interface {
|
|
Accelerator() AcceleratorResolver
|
|
Job() JobResolver
|
|
Mutation() MutationResolver
|
|
Query() QueryResolver
|
|
}
|
|
|
|
type DirectiveRoot struct {
|
|
}
|
|
|
|
type ComplexityRoot struct {
|
|
Accelerator struct {
|
|
ID func(childComplexity int) int
|
|
Model func(childComplexity int) int
|
|
Type func(childComplexity int) int
|
|
}
|
|
|
|
Cluster struct {
|
|
ClusterID func(childComplexity int) int
|
|
CoresPerSocket func(childComplexity int) int
|
|
FilterRanges func(childComplexity int) int
|
|
FlopRateScalar func(childComplexity int) int
|
|
FlopRateSimd func(childComplexity int) int
|
|
MemoryBandwidth func(childComplexity int) int
|
|
MetricConfig func(childComplexity int) int
|
|
ProcessorType func(childComplexity int) int
|
|
SocketsPerNode func(childComplexity int) int
|
|
ThreadsPerCore func(childComplexity int) int
|
|
}
|
|
|
|
FilterRanges struct {
|
|
Duration func(childComplexity int) int
|
|
NumNodes func(childComplexity int) int
|
|
StartTime func(childComplexity int) int
|
|
}
|
|
|
|
HistoPoint struct {
|
|
Count func(childComplexity int) int
|
|
Value func(childComplexity int) int
|
|
}
|
|
|
|
IntRangeOutput struct {
|
|
From func(childComplexity int) int
|
|
To func(childComplexity int) int
|
|
}
|
|
|
|
Job struct {
|
|
ArrayJobID func(childComplexity int) int
|
|
Cluster func(childComplexity int) int
|
|
Duration func(childComplexity int) int
|
|
Exclusive func(childComplexity int) int
|
|
FileBwAvg func(childComplexity int) int
|
|
FlopsAnyAvg func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
JobID func(childComplexity int) int
|
|
LoadAvg func(childComplexity int) int
|
|
MemBwAvg func(childComplexity int) int
|
|
MemUsedMax func(childComplexity int) int
|
|
MonitoringStatus func(childComplexity int) int
|
|
NetBwAvg func(childComplexity int) int
|
|
NumAcc func(childComplexity int) int
|
|
NumHWThreads func(childComplexity int) int
|
|
NumNodes func(childComplexity int) int
|
|
Partition func(childComplexity int) int
|
|
Project func(childComplexity int) int
|
|
Resources func(childComplexity int) int
|
|
Smt func(childComplexity int) int
|
|
StartTime func(childComplexity int) int
|
|
State func(childComplexity int) int
|
|
Tags func(childComplexity int) int
|
|
User func(childComplexity int) int
|
|
}
|
|
|
|
JobMetric struct {
|
|
Scope func(childComplexity int) int
|
|
Series func(childComplexity int) int
|
|
Timestep func(childComplexity int) int
|
|
Unit func(childComplexity int) int
|
|
}
|
|
|
|
JobMetricSeries struct {
|
|
Data func(childComplexity int) int
|
|
Hostname func(childComplexity int) int
|
|
Id func(childComplexity int) int
|
|
Statistics func(childComplexity int) int
|
|
}
|
|
|
|
JobMetricStatistics struct {
|
|
Avg func(childComplexity int) int
|
|
Max func(childComplexity int) int
|
|
Min func(childComplexity int) int
|
|
}
|
|
|
|
JobMetricWithName struct {
|
|
Metric func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
JobResource struct {
|
|
Accelerators func(childComplexity int) int
|
|
HWThreads func(childComplexity int) int
|
|
Hostname func(childComplexity int) int
|
|
}
|
|
|
|
JobResultList struct {
|
|
Count func(childComplexity int) int
|
|
Items func(childComplexity int) int
|
|
Limit func(childComplexity int) int
|
|
Offset func(childComplexity int) int
|
|
}
|
|
|
|
JobTag struct {
|
|
ID func(childComplexity int) int
|
|
TagName func(childComplexity int) int
|
|
TagType func(childComplexity int) int
|
|
}
|
|
|
|
JobsStatistics struct {
|
|
HistNumNodes func(childComplexity int) int
|
|
HistWalltime func(childComplexity int) int
|
|
ID func(childComplexity int) int
|
|
ShortJobs func(childComplexity int) int
|
|
TotalCoreHours func(childComplexity int) int
|
|
TotalJobs func(childComplexity int) int
|
|
TotalWalltime func(childComplexity int) int
|
|
}
|
|
|
|
MetricConfig struct {
|
|
Alert func(childComplexity int) int
|
|
Caution func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
Normal func(childComplexity int) int
|
|
Peak func(childComplexity int) int
|
|
Scope func(childComplexity int) int
|
|
Timestep func(childComplexity int) int
|
|
Unit func(childComplexity int) int
|
|
}
|
|
|
|
MetricFootprints struct {
|
|
Footprints func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
Mutation struct {
|
|
AddTagsToJob func(childComplexity int, job string, tagIds []string) int
|
|
CreateTag func(childComplexity int, typeArg string, name string) int
|
|
DeleteTag func(childComplexity int, id string) int
|
|
RemoveTagsFromJob func(childComplexity int, job string, tagIds []string) int
|
|
UpdateConfiguration func(childComplexity int, name string, value string) int
|
|
}
|
|
|
|
NodeMetric struct {
|
|
Data func(childComplexity int) int
|
|
Name func(childComplexity int) int
|
|
}
|
|
|
|
NodeMetrics struct {
|
|
ID func(childComplexity int) int
|
|
Metrics func(childComplexity int) int
|
|
}
|
|
|
|
Query struct {
|
|
Clusters func(childComplexity int) int
|
|
Job func(childComplexity int, id string) int
|
|
JobMetrics func(childComplexity int, id string, metrics []string) int
|
|
Jobs func(childComplexity int, filter []*model.JobFilter, page *model.PageRequest, order *model.OrderByInput) int
|
|
JobsFootprints func(childComplexity int, filter []*model.JobFilter, metrics []string) int
|
|
JobsStatistics func(childComplexity int, filter []*model.JobFilter, groupBy *model.Aggregate) int
|
|
NodeMetrics func(childComplexity int, cluster string, nodes []string, metrics []string, from time.Time, to time.Time) int
|
|
RooflineHeatmap func(childComplexity int, filter []*model.JobFilter, rows int, cols int, minX float64, minY float64, maxX float64, maxY float64) int
|
|
Tags func(childComplexity int) int
|
|
}
|
|
|
|
TimeRangeOutput struct {
|
|
From func(childComplexity int) int
|
|
To func(childComplexity int) int
|
|
}
|
|
}
|
|
|
|
type AcceleratorResolver interface {
|
|
ID(ctx context.Context, obj *schema.Accelerator) (string, error)
|
|
}
|
|
type JobResolver interface {
|
|
Tags(ctx context.Context, obj *model.Job) ([]*model.JobTag, error)
|
|
}
|
|
type MutationResolver interface {
|
|
CreateTag(ctx context.Context, typeArg string, name string) (*model.JobTag, error)
|
|
DeleteTag(ctx context.Context, id string) (string, error)
|
|
AddTagsToJob(ctx context.Context, job string, tagIds []string) ([]*model.JobTag, error)
|
|
RemoveTagsFromJob(ctx context.Context, job string, tagIds []string) ([]*model.JobTag, error)
|
|
UpdateConfiguration(ctx context.Context, name string, value string) (*string, error)
|
|
}
|
|
type QueryResolver interface {
|
|
Clusters(ctx context.Context) ([]*model.Cluster, error)
|
|
Tags(ctx context.Context) ([]*model.JobTag, error)
|
|
Job(ctx context.Context, id string) (*model.Job, error)
|
|
JobMetrics(ctx context.Context, id string, metrics []string) ([]*model.JobMetricWithName, error)
|
|
JobsFootprints(ctx context.Context, filter []*model.JobFilter, metrics []string) ([]*model.MetricFootprints, error)
|
|
Jobs(ctx context.Context, filter []*model.JobFilter, page *model.PageRequest, order *model.OrderByInput) (*model.JobResultList, error)
|
|
JobsStatistics(ctx context.Context, filter []*model.JobFilter, groupBy *model.Aggregate) ([]*model.JobsStatistics, error)
|
|
RooflineHeatmap(ctx context.Context, filter []*model.JobFilter, rows int, cols int, minX float64, minY float64, maxX float64, maxY float64) ([][]float64, error)
|
|
NodeMetrics(ctx context.Context, cluster string, nodes []string, metrics []string, from time.Time, to time.Time) ([]*model.NodeMetrics, error)
|
|
}
|
|
|
|
type executableSchema struct {
|
|
resolvers ResolverRoot
|
|
directives DirectiveRoot
|
|
complexity ComplexityRoot
|
|
}
|
|
|
|
func (e *executableSchema) Schema() *ast.Schema {
|
|
return parsedSchema
|
|
}
|
|
|
|
func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
|
|
ec := executionContext{nil, e}
|
|
_ = ec
|
|
switch typeName + "." + field {
|
|
|
|
case "Accelerator.Id":
|
|
if e.complexity.Accelerator.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Accelerator.ID(childComplexity), true
|
|
|
|
case "Accelerator.Model":
|
|
if e.complexity.Accelerator.Model == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Accelerator.Model(childComplexity), true
|
|
|
|
case "Accelerator.Type":
|
|
if e.complexity.Accelerator.Type == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Accelerator.Type(childComplexity), true
|
|
|
|
case "Cluster.ClusterID":
|
|
if e.complexity.Cluster.ClusterID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.ClusterID(childComplexity), true
|
|
|
|
case "Cluster.CoresPerSocket":
|
|
if e.complexity.Cluster.CoresPerSocket == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.CoresPerSocket(childComplexity), true
|
|
|
|
case "Cluster.FilterRanges":
|
|
if e.complexity.Cluster.FilterRanges == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.FilterRanges(childComplexity), true
|
|
|
|
case "Cluster.FlopRateScalar":
|
|
if e.complexity.Cluster.FlopRateScalar == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.FlopRateScalar(childComplexity), true
|
|
|
|
case "Cluster.FlopRateSimd":
|
|
if e.complexity.Cluster.FlopRateSimd == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.FlopRateSimd(childComplexity), true
|
|
|
|
case "Cluster.MemoryBandwidth":
|
|
if e.complexity.Cluster.MemoryBandwidth == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.MemoryBandwidth(childComplexity), true
|
|
|
|
case "Cluster.MetricConfig":
|
|
if e.complexity.Cluster.MetricConfig == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.MetricConfig(childComplexity), true
|
|
|
|
case "Cluster.ProcessorType":
|
|
if e.complexity.Cluster.ProcessorType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.ProcessorType(childComplexity), true
|
|
|
|
case "Cluster.SocketsPerNode":
|
|
if e.complexity.Cluster.SocketsPerNode == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.SocketsPerNode(childComplexity), true
|
|
|
|
case "Cluster.ThreadsPerCore":
|
|
if e.complexity.Cluster.ThreadsPerCore == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Cluster.ThreadsPerCore(childComplexity), true
|
|
|
|
case "FilterRanges.duration":
|
|
if e.complexity.FilterRanges.Duration == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.FilterRanges.Duration(childComplexity), true
|
|
|
|
case "FilterRanges.numNodes":
|
|
if e.complexity.FilterRanges.NumNodes == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.FilterRanges.NumNodes(childComplexity), true
|
|
|
|
case "FilterRanges.startTime":
|
|
if e.complexity.FilterRanges.StartTime == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.FilterRanges.StartTime(childComplexity), true
|
|
|
|
case "HistoPoint.count":
|
|
if e.complexity.HistoPoint.Count == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoPoint.Count(childComplexity), true
|
|
|
|
case "HistoPoint.value":
|
|
if e.complexity.HistoPoint.Value == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.HistoPoint.Value(childComplexity), true
|
|
|
|
case "IntRangeOutput.from":
|
|
if e.complexity.IntRangeOutput.From == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.IntRangeOutput.From(childComplexity), true
|
|
|
|
case "IntRangeOutput.to":
|
|
if e.complexity.IntRangeOutput.To == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.IntRangeOutput.To(childComplexity), true
|
|
|
|
case "Job.ArrayJobId":
|
|
if e.complexity.Job.ArrayJobID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.ArrayJobID(childComplexity), true
|
|
|
|
case "Job.Cluster":
|
|
if e.complexity.Job.Cluster == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Cluster(childComplexity), true
|
|
|
|
case "Job.Duration":
|
|
if e.complexity.Job.Duration == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Duration(childComplexity), true
|
|
|
|
case "Job.Exclusive":
|
|
if e.complexity.Job.Exclusive == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Exclusive(childComplexity), true
|
|
|
|
case "Job.FileBwAvg":
|
|
if e.complexity.Job.FileBwAvg == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.FileBwAvg(childComplexity), true
|
|
|
|
case "Job.FlopsAnyAvg":
|
|
if e.complexity.Job.FlopsAnyAvg == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.FlopsAnyAvg(childComplexity), true
|
|
|
|
case "Job.Id":
|
|
if e.complexity.Job.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.ID(childComplexity), true
|
|
|
|
case "Job.JobId":
|
|
if e.complexity.Job.JobID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.JobID(childComplexity), true
|
|
|
|
case "Job.LoadAvg":
|
|
if e.complexity.Job.LoadAvg == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.LoadAvg(childComplexity), true
|
|
|
|
case "Job.MemBwAvg":
|
|
if e.complexity.Job.MemBwAvg == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.MemBwAvg(childComplexity), true
|
|
|
|
case "Job.MemUsedMax":
|
|
if e.complexity.Job.MemUsedMax == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.MemUsedMax(childComplexity), true
|
|
|
|
case "Job.MonitoringStatus":
|
|
if e.complexity.Job.MonitoringStatus == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.MonitoringStatus(childComplexity), true
|
|
|
|
case "Job.NetBwAvg":
|
|
if e.complexity.Job.NetBwAvg == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.NetBwAvg(childComplexity), true
|
|
|
|
case "Job.NumAcc":
|
|
if e.complexity.Job.NumAcc == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.NumAcc(childComplexity), true
|
|
|
|
case "Job.NumHWThreads":
|
|
if e.complexity.Job.NumHWThreads == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.NumHWThreads(childComplexity), true
|
|
|
|
case "Job.NumNodes":
|
|
if e.complexity.Job.NumNodes == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.NumNodes(childComplexity), true
|
|
|
|
case "Job.Partition":
|
|
if e.complexity.Job.Partition == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Partition(childComplexity), true
|
|
|
|
case "Job.Project":
|
|
if e.complexity.Job.Project == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Project(childComplexity), true
|
|
|
|
case "Job.Resources":
|
|
if e.complexity.Job.Resources == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Resources(childComplexity), true
|
|
|
|
case "Job.SMT":
|
|
if e.complexity.Job.Smt == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Smt(childComplexity), true
|
|
|
|
case "Job.StartTime":
|
|
if e.complexity.Job.StartTime == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.StartTime(childComplexity), true
|
|
|
|
case "Job.State":
|
|
if e.complexity.Job.State == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.State(childComplexity), true
|
|
|
|
case "Job.Tags":
|
|
if e.complexity.Job.Tags == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.Tags(childComplexity), true
|
|
|
|
case "Job.User":
|
|
if e.complexity.Job.User == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Job.User(childComplexity), true
|
|
|
|
case "JobMetric.Scope":
|
|
if e.complexity.JobMetric.Scope == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetric.Scope(childComplexity), true
|
|
|
|
case "JobMetric.Series":
|
|
if e.complexity.JobMetric.Series == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetric.Series(childComplexity), true
|
|
|
|
case "JobMetric.Timestep":
|
|
if e.complexity.JobMetric.Timestep == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetric.Timestep(childComplexity), true
|
|
|
|
case "JobMetric.Unit":
|
|
if e.complexity.JobMetric.Unit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetric.Unit(childComplexity), true
|
|
|
|
case "JobMetricSeries.Data":
|
|
if e.complexity.JobMetricSeries.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricSeries.Data(childComplexity), true
|
|
|
|
case "JobMetricSeries.Hostname":
|
|
if e.complexity.JobMetricSeries.Hostname == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricSeries.Hostname(childComplexity), true
|
|
|
|
case "JobMetricSeries.Id":
|
|
if e.complexity.JobMetricSeries.Id == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricSeries.Id(childComplexity), true
|
|
|
|
case "JobMetricSeries.Statistics":
|
|
if e.complexity.JobMetricSeries.Statistics == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricSeries.Statistics(childComplexity), true
|
|
|
|
case "JobMetricStatistics.Avg":
|
|
if e.complexity.JobMetricStatistics.Avg == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricStatistics.Avg(childComplexity), true
|
|
|
|
case "JobMetricStatistics.Max":
|
|
if e.complexity.JobMetricStatistics.Max == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricStatistics.Max(childComplexity), true
|
|
|
|
case "JobMetricStatistics.Min":
|
|
if e.complexity.JobMetricStatistics.Min == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricStatistics.Min(childComplexity), true
|
|
|
|
case "JobMetricWithName.metric":
|
|
if e.complexity.JobMetricWithName.Metric == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricWithName.Metric(childComplexity), true
|
|
|
|
case "JobMetricWithName.name":
|
|
if e.complexity.JobMetricWithName.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobMetricWithName.Name(childComplexity), true
|
|
|
|
case "JobResource.Accelerators":
|
|
if e.complexity.JobResource.Accelerators == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResource.Accelerators(childComplexity), true
|
|
|
|
case "JobResource.HWThreads":
|
|
if e.complexity.JobResource.HWThreads == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResource.HWThreads(childComplexity), true
|
|
|
|
case "JobResource.Hostname":
|
|
if e.complexity.JobResource.Hostname == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResource.Hostname(childComplexity), true
|
|
|
|
case "JobResultList.count":
|
|
if e.complexity.JobResultList.Count == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResultList.Count(childComplexity), true
|
|
|
|
case "JobResultList.items":
|
|
if e.complexity.JobResultList.Items == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResultList.Items(childComplexity), true
|
|
|
|
case "JobResultList.limit":
|
|
if e.complexity.JobResultList.Limit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResultList.Limit(childComplexity), true
|
|
|
|
case "JobResultList.offset":
|
|
if e.complexity.JobResultList.Offset == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobResultList.Offset(childComplexity), true
|
|
|
|
case "JobTag.Id":
|
|
if e.complexity.JobTag.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobTag.ID(childComplexity), true
|
|
|
|
case "JobTag.TagName":
|
|
if e.complexity.JobTag.TagName == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobTag.TagName(childComplexity), true
|
|
|
|
case "JobTag.TagType":
|
|
if e.complexity.JobTag.TagType == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobTag.TagType(childComplexity), true
|
|
|
|
case "JobsStatistics.histNumNodes":
|
|
if e.complexity.JobsStatistics.HistNumNodes == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.HistNumNodes(childComplexity), true
|
|
|
|
case "JobsStatistics.histWalltime":
|
|
if e.complexity.JobsStatistics.HistWalltime == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.HistWalltime(childComplexity), true
|
|
|
|
case "JobsStatistics.id":
|
|
if e.complexity.JobsStatistics.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.ID(childComplexity), true
|
|
|
|
case "JobsStatistics.shortJobs":
|
|
if e.complexity.JobsStatistics.ShortJobs == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.ShortJobs(childComplexity), true
|
|
|
|
case "JobsStatistics.totalCoreHours":
|
|
if e.complexity.JobsStatistics.TotalCoreHours == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.TotalCoreHours(childComplexity), true
|
|
|
|
case "JobsStatistics.totalJobs":
|
|
if e.complexity.JobsStatistics.TotalJobs == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.TotalJobs(childComplexity), true
|
|
|
|
case "JobsStatistics.totalWalltime":
|
|
if e.complexity.JobsStatistics.TotalWalltime == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.JobsStatistics.TotalWalltime(childComplexity), true
|
|
|
|
case "MetricConfig.Alert":
|
|
if e.complexity.MetricConfig.Alert == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Alert(childComplexity), true
|
|
|
|
case "MetricConfig.Caution":
|
|
if e.complexity.MetricConfig.Caution == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Caution(childComplexity), true
|
|
|
|
case "MetricConfig.Name":
|
|
if e.complexity.MetricConfig.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Name(childComplexity), true
|
|
|
|
case "MetricConfig.Normal":
|
|
if e.complexity.MetricConfig.Normal == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Normal(childComplexity), true
|
|
|
|
case "MetricConfig.Peak":
|
|
if e.complexity.MetricConfig.Peak == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Peak(childComplexity), true
|
|
|
|
case "MetricConfig.Scope":
|
|
if e.complexity.MetricConfig.Scope == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Scope(childComplexity), true
|
|
|
|
case "MetricConfig.Timestep":
|
|
if e.complexity.MetricConfig.Timestep == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Timestep(childComplexity), true
|
|
|
|
case "MetricConfig.Unit":
|
|
if e.complexity.MetricConfig.Unit == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricConfig.Unit(childComplexity), true
|
|
|
|
case "MetricFootprints.footprints":
|
|
if e.complexity.MetricFootprints.Footprints == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricFootprints.Footprints(childComplexity), true
|
|
|
|
case "MetricFootprints.name":
|
|
if e.complexity.MetricFootprints.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.MetricFootprints.Name(childComplexity), true
|
|
|
|
case "Mutation.addTagsToJob":
|
|
if e.complexity.Mutation.AddTagsToJob == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_addTagsToJob_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.AddTagsToJob(childComplexity, args["job"].(string), args["tagIds"].([]string)), true
|
|
|
|
case "Mutation.createTag":
|
|
if e.complexity.Mutation.CreateTag == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_createTag_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.CreateTag(childComplexity, args["type"].(string), args["name"].(string)), true
|
|
|
|
case "Mutation.deleteTag":
|
|
if e.complexity.Mutation.DeleteTag == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_deleteTag_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.DeleteTag(childComplexity, args["id"].(string)), true
|
|
|
|
case "Mutation.removeTagsFromJob":
|
|
if e.complexity.Mutation.RemoveTagsFromJob == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_removeTagsFromJob_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.RemoveTagsFromJob(childComplexity, args["job"].(string), args["tagIds"].([]string)), true
|
|
|
|
case "Mutation.updateConfiguration":
|
|
if e.complexity.Mutation.UpdateConfiguration == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Mutation_updateConfiguration_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Mutation.UpdateConfiguration(childComplexity, args["name"].(string), args["value"].(string)), true
|
|
|
|
case "NodeMetric.data":
|
|
if e.complexity.NodeMetric.Data == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.NodeMetric.Data(childComplexity), true
|
|
|
|
case "NodeMetric.name":
|
|
if e.complexity.NodeMetric.Name == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.NodeMetric.Name(childComplexity), true
|
|
|
|
case "NodeMetrics.id":
|
|
if e.complexity.NodeMetrics.ID == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.NodeMetrics.ID(childComplexity), true
|
|
|
|
case "NodeMetrics.metrics":
|
|
if e.complexity.NodeMetrics.Metrics == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.NodeMetrics.Metrics(childComplexity), true
|
|
|
|
case "Query.clusters":
|
|
if e.complexity.Query.Clusters == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Clusters(childComplexity), true
|
|
|
|
case "Query.job":
|
|
if e.complexity.Query.Job == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_job_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Job(childComplexity, args["id"].(string)), true
|
|
|
|
case "Query.jobMetrics":
|
|
if e.complexity.Query.JobMetrics == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_jobMetrics_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.JobMetrics(childComplexity, args["id"].(string), args["metrics"].([]string)), true
|
|
|
|
case "Query.jobs":
|
|
if e.complexity.Query.Jobs == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_jobs_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.Jobs(childComplexity, args["filter"].([]*model.JobFilter), args["page"].(*model.PageRequest), args["order"].(*model.OrderByInput)), true
|
|
|
|
case "Query.jobsFootprints":
|
|
if e.complexity.Query.JobsFootprints == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_jobsFootprints_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.JobsFootprints(childComplexity, args["filter"].([]*model.JobFilter), args["metrics"].([]string)), true
|
|
|
|
case "Query.jobsStatistics":
|
|
if e.complexity.Query.JobsStatistics == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_jobsStatistics_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.JobsStatistics(childComplexity, args["filter"].([]*model.JobFilter), args["groupBy"].(*model.Aggregate)), true
|
|
|
|
case "Query.nodeMetrics":
|
|
if e.complexity.Query.NodeMetrics == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_nodeMetrics_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.NodeMetrics(childComplexity, args["cluster"].(string), args["nodes"].([]string), args["metrics"].([]string), args["from"].(time.Time), args["to"].(time.Time)), true
|
|
|
|
case "Query.rooflineHeatmap":
|
|
if e.complexity.Query.RooflineHeatmap == nil {
|
|
break
|
|
}
|
|
|
|
args, err := ec.field_Query_rooflineHeatmap_args(context.TODO(), rawArgs)
|
|
if err != nil {
|
|
return 0, false
|
|
}
|
|
|
|
return e.complexity.Query.RooflineHeatmap(childComplexity, args["filter"].([]*model.JobFilter), args["rows"].(int), args["cols"].(int), args["minX"].(float64), args["minY"].(float64), args["maxX"].(float64), args["maxY"].(float64)), true
|
|
|
|
case "Query.tags":
|
|
if e.complexity.Query.Tags == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.Query.Tags(childComplexity), true
|
|
|
|
case "TimeRangeOutput.from":
|
|
if e.complexity.TimeRangeOutput.From == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TimeRangeOutput.From(childComplexity), true
|
|
|
|
case "TimeRangeOutput.to":
|
|
if e.complexity.TimeRangeOutput.To == nil {
|
|
break
|
|
}
|
|
|
|
return e.complexity.TimeRangeOutput.To(childComplexity), true
|
|
|
|
}
|
|
return 0, false
|
|
}
|
|
|
|
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
|
|
rc := graphql.GetOperationContext(ctx)
|
|
ec := executionContext{rc, e}
|
|
first := true
|
|
|
|
switch rc.Operation.Operation {
|
|
case ast.Query:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
data := ec._Query(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
case ast.Mutation:
|
|
return func(ctx context.Context) *graphql.Response {
|
|
if !first {
|
|
return nil
|
|
}
|
|
first = false
|
|
data := ec._Mutation(ctx, rc.Operation.SelectionSet)
|
|
var buf bytes.Buffer
|
|
data.MarshalGQL(&buf)
|
|
|
|
return &graphql.Response{
|
|
Data: buf.Bytes(),
|
|
}
|
|
}
|
|
|
|
default:
|
|
return graphql.OneShot(graphql.ErrorResponse(ctx, "unsupported GraphQL operation"))
|
|
}
|
|
}
|
|
|
|
type executionContext struct {
|
|
*graphql.OperationContext
|
|
*executableSchema
|
|
}
|
|
|
|
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapSchema(parsedSchema), nil
|
|
}
|
|
|
|
func (ec *executionContext) introspectType(name string) (*introspection.Type, error) {
|
|
if ec.DisableIntrospection {
|
|
return nil, errors.New("introspection disabled")
|
|
}
|
|
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
|
|
}
|
|
|
|
var sources = []*ast.Source{
|
|
{Name: "graph/schema.graphqls", Input: `type Job {
|
|
Id: ID! # Database ID, unique
|
|
JobId: Int! # ID given to the job by the cluster scheduler
|
|
User: String! # Username
|
|
Project: String! # Project
|
|
Cluster: String! # Name of the cluster this job was running on
|
|
StartTime: Time! # RFC3339 formated string
|
|
Duration: Int! # For running jobs, the time it has already run
|
|
NumNodes: Int! # Number of nodes this job was running on
|
|
NumHWThreads: Int!
|
|
NumAcc: Int!
|
|
SMT: Int!
|
|
Exclusive: Int!
|
|
Partition: String!
|
|
ArrayJobId: Int!
|
|
MonitoringStatus: Int!
|
|
State: JobState! # State of the job
|
|
Tags: [JobTag!]! # List of tags this job has
|
|
Resources: [JobResource!]! # List of hosts/hwthreads/gpus/...
|
|
|
|
# Will be null for running jobs.
|
|
LoadAvg: Float
|
|
MemUsedMax: Float
|
|
FlopsAnyAvg: Float
|
|
MemBwAvg: Float
|
|
NetBwAvg: Float
|
|
FileBwAvg: Float
|
|
}
|
|
|
|
type JobResource {
|
|
Hostname: String!
|
|
HWThreads: [Int!]
|
|
Accelerators: [Accelerator!]
|
|
}
|
|
|
|
type Accelerator {
|
|
Id: String!
|
|
Type: String!
|
|
Model: String!
|
|
}
|
|
|
|
# TODO: Extend by more possible states?
|
|
enum JobState {
|
|
running
|
|
completed
|
|
failed
|
|
canceled
|
|
stopped
|
|
timeout
|
|
}
|
|
|
|
type JobTag {
|
|
Id: ID! # Database ID, unique
|
|
TagType: String! # Type
|
|
TagName: String! # Name
|
|
}
|
|
|
|
type Cluster {
|
|
ClusterID: String!
|
|
ProcessorType: String!
|
|
SocketsPerNode: Int!
|
|
CoresPerSocket: Int!
|
|
ThreadsPerCore: Int!
|
|
FlopRateScalar: Int!
|
|
FlopRateSimd: Int!
|
|
MemoryBandwidth: Int!
|
|
MetricConfig: [MetricConfig!]!
|
|
FilterRanges: FilterRanges!
|
|
}
|
|
|
|
type MetricConfig {
|
|
Name: String!
|
|
Unit: String!
|
|
Timestep: Int!
|
|
Peak: Int!
|
|
Normal: Int!
|
|
Caution: Int!
|
|
Alert: Int!
|
|
Scope: String!
|
|
}
|
|
|
|
type JobMetric {
|
|
Unit: String!
|
|
Scope: JobMetricScope!
|
|
Timestep: Int!
|
|
Series: [JobMetricSeries!]!
|
|
}
|
|
|
|
type JobMetricSeries {
|
|
Hostname: String!
|
|
Id: Int
|
|
Statistics: JobMetricStatistics
|
|
Data: [NullableFloat!]!
|
|
}
|
|
|
|
type JobMetricStatistics {
|
|
Avg: Float!
|
|
Min: Float!
|
|
Max: Float!
|
|
}
|
|
|
|
type JobMetricWithName {
|
|
name: String!
|
|
metric: JobMetric!
|
|
}
|
|
|
|
type MetricFootprints {
|
|
name: String!
|
|
footprints: [NullableFloat!]!
|
|
}
|
|
|
|
enum Aggregate { USER, PROJECT, CLUSTER }
|
|
|
|
type NodeMetric {
|
|
name: String!
|
|
data: [NullableFloat!]!
|
|
}
|
|
|
|
type NodeMetrics {
|
|
id: String!
|
|
metrics: [NodeMetric!]!
|
|
}
|
|
|
|
type Query {
|
|
clusters: [Cluster!]! # List of all clusters
|
|
tags: [JobTag!]! # List of all tags
|
|
|
|
job(id: ID!): Job
|
|
jobMetrics(id: ID!, metrics: [String!]): [JobMetricWithName!]!
|
|
jobsFootprints(filter: [JobFilter!], metrics: [String!]!): [MetricFootprints]!
|
|
|
|
jobs(filter: [JobFilter!], page: PageRequest, order: OrderByInput): JobResultList!
|
|
jobsStatistics(filter: [JobFilter!], groupBy: Aggregate): [JobsStatistics!]!
|
|
|
|
rooflineHeatmap(filter: [JobFilter!]!, rows: Int!, cols: Int!, minX: Float!, minY: Float!, maxX: Float!, maxY: Float!): [[Float!]!]!
|
|
|
|
nodeMetrics(cluster: ID!, nodes: [String!], metrics: [String!], from: Time!, to: Time!): [NodeMetrics!]!
|
|
}
|
|
|
|
type Mutation {
|
|
createTag(type: String!, name: String!): JobTag!
|
|
deleteTag(id: ID!): ID!
|
|
addTagsToJob(job: ID!, tagIds: [ID!]!): [JobTag!]!
|
|
removeTagsFromJob(job: ID!, tagIds: [ID!]!): [JobTag!]!
|
|
|
|
updateConfiguration(name: String!, value: String!): String
|
|
}
|
|
|
|
type IntRangeOutput {
|
|
from: Int!
|
|
to: Int!
|
|
}
|
|
|
|
type TimeRangeOutput {
|
|
from: Time!
|
|
to: Time!
|
|
}
|
|
|
|
type FilterRanges {
|
|
duration: IntRangeOutput!
|
|
numNodes: IntRangeOutput!
|
|
startTime: TimeRangeOutput!
|
|
}
|
|
|
|
input JobFilter {
|
|
tags: [ID!]
|
|
jobId: StringInput
|
|
user: StringInput
|
|
project: StringInput
|
|
cluster: StringInput
|
|
duration: IntRange
|
|
numNodes: IntRange
|
|
startTime: TimeRange
|
|
jobState: [JobState!]
|
|
flopsAnyAvg: FloatRange
|
|
memBwAvg: FloatRange
|
|
loadAvg: FloatRange
|
|
memUsedMax: FloatRange
|
|
}
|
|
|
|
input OrderByInput {
|
|
field: String!
|
|
order: SortDirectionEnum! = ASC
|
|
}
|
|
|
|
enum SortDirectionEnum {
|
|
DESC
|
|
ASC
|
|
}
|
|
|
|
input StringInput {
|
|
eq: String
|
|
contains: String
|
|
startsWith: String
|
|
endsWith: String
|
|
}
|
|
|
|
input IntRange {
|
|
from: Int!
|
|
to: Int!
|
|
}
|
|
|
|
input FloatRange {
|
|
from: Float!
|
|
to: Float!
|
|
}
|
|
|
|
input TimeRange {
|
|
from: Time
|
|
to: Time
|
|
}
|
|
|
|
type JobResultList {
|
|
items: [Job!]!
|
|
offset: Int
|
|
limit: Int
|
|
count: Int
|
|
}
|
|
|
|
type HistoPoint {
|
|
count: Int!
|
|
value: Int!
|
|
}
|
|
|
|
type JobsStatistics {
|
|
id: ID! # If ` + "`" + `groupBy` + "`" + ` was used, ID of the user/project/cluster
|
|
totalJobs: Int! # Number of jobs that matched
|
|
shortJobs: Int! # Number of jobs with a duration of less than 2 minutes
|
|
totalWalltime: Int! # Sum of the duration of all matched jobs in hours
|
|
totalCoreHours: Int! # Sum of the core hours of all matched jobs
|
|
histWalltime: [HistoPoint!]! # value: hour, count: number of jobs with a rounded duration of value
|
|
histNumNodes: [HistoPoint!]! # value: number of nodes, count: number of jobs with that number of nodes
|
|
}
|
|
|
|
input PageRequest {
|
|
itemsPerPage: Int!
|
|
page: Int!
|
|
}
|
|
|
|
scalar Time
|
|
scalar NullableFloat
|
|
scalar JobMetricScope
|
|
`, BuiltIn: false},
|
|
}
|
|
var parsedSchema = gqlparser.MustLoadSchema(sources...)
|
|
|
|
// endregion ************************** generated!.gotpl **************************
|
|
|
|
// region ***************************** args.gotpl *****************************
|
|
|
|
func (ec *executionContext) field_Mutation_addTagsToJob_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["job"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("job"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["job"] = arg0
|
|
var arg1 []string
|
|
if tmp, ok := rawArgs["tagIds"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tagIds"))
|
|
arg1, err = ec.unmarshalNID2ᚕstringᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["tagIds"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_createTag_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["type"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("type"))
|
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["type"] = 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_deleteTag_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["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_removeTagsFromJob_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["job"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("job"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["job"] = arg0
|
|
var arg1 []string
|
|
if tmp, ok := rawArgs["tagIds"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tagIds"))
|
|
arg1, err = ec.unmarshalNID2ᚕstringᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["tagIds"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Mutation_updateConfiguration_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
|
|
var arg1 string
|
|
if tmp, ok := rawArgs["value"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("value"))
|
|
arg1, err = ec.unmarshalNString2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["value"] = arg1
|
|
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_jobMetrics_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["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
var arg1 []string
|
|
if tmp, ok := rawArgs["metrics"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metrics"))
|
|
arg1, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["metrics"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_job_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["id"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["id"] = arg0
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_jobsFootprints_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 []*model.JobFilter
|
|
if tmp, ok := rawArgs["filter"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
|
arg0, err = ec.unmarshalOJobFilter2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilterᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 []string
|
|
if tmp, ok := rawArgs["metrics"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metrics"))
|
|
arg1, err = ec.unmarshalNString2ᚕstringᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["metrics"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_jobsStatistics_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 []*model.JobFilter
|
|
if tmp, ok := rawArgs["filter"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
|
arg0, err = ec.unmarshalOJobFilter2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilterᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.Aggregate
|
|
if tmp, ok := rawArgs["groupBy"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("groupBy"))
|
|
arg1, err = ec.unmarshalOAggregate2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐAggregate(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["groupBy"] = arg1
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_jobs_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 []*model.JobFilter
|
|
if tmp, ok := rawArgs["filter"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
|
arg0, err = ec.unmarshalOJobFilter2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilterᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 *model.PageRequest
|
|
if tmp, ok := rawArgs["page"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
arg1, err = ec.unmarshalOPageRequest2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐPageRequest(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["page"] = arg1
|
|
var arg2 *model.OrderByInput
|
|
if tmp, ok := rawArgs["order"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
arg2, err = ec.unmarshalOOrderByInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐOrderByInput(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["order"] = arg2
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_nodeMetrics_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["cluster"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster"))
|
|
arg0, err = ec.unmarshalNID2string(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cluster"] = arg0
|
|
var arg1 []string
|
|
if tmp, ok := rawArgs["nodes"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nodes"))
|
|
arg1, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["nodes"] = arg1
|
|
var arg2 []string
|
|
if tmp, ok := rawArgs["metrics"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("metrics"))
|
|
arg2, err = ec.unmarshalOString2ᚕstringᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["metrics"] = arg2
|
|
var arg3 time.Time
|
|
if tmp, ok := rawArgs["from"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("from"))
|
|
arg3, err = ec.unmarshalNTime2timeᚐTime(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["from"] = arg3
|
|
var arg4 time.Time
|
|
if tmp, ok := rawArgs["to"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("to"))
|
|
arg4, err = ec.unmarshalNTime2timeᚐTime(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["to"] = arg4
|
|
return args, nil
|
|
}
|
|
|
|
func (ec *executionContext) field_Query_rooflineHeatmap_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
|
var err error
|
|
args := map[string]interface{}{}
|
|
var arg0 []*model.JobFilter
|
|
if tmp, ok := rawArgs["filter"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
|
arg0, err = ec.unmarshalNJobFilter2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilterᚄ(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["filter"] = arg0
|
|
var arg1 int
|
|
if tmp, ok := rawArgs["rows"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("rows"))
|
|
arg1, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["rows"] = arg1
|
|
var arg2 int
|
|
if tmp, ok := rawArgs["cols"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cols"))
|
|
arg2, err = ec.unmarshalNInt2int(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["cols"] = arg2
|
|
var arg3 float64
|
|
if tmp, ok := rawArgs["minX"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minX"))
|
|
arg3, err = ec.unmarshalNFloat2float64(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["minX"] = arg3
|
|
var arg4 float64
|
|
if tmp, ok := rawArgs["minY"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("minY"))
|
|
arg4, err = ec.unmarshalNFloat2float64(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["minY"] = arg4
|
|
var arg5 float64
|
|
if tmp, ok := rawArgs["maxX"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxX"))
|
|
arg5, err = ec.unmarshalNFloat2float64(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["maxX"] = arg5
|
|
var arg6 float64
|
|
if tmp, ok := rawArgs["maxY"]; ok {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("maxY"))
|
|
arg6, err = ec.unmarshalNFloat2float64(ctx, tmp)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
args["maxY"] = arg6
|
|
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) _Accelerator_Id(ctx context.Context, field graphql.CollectedField, obj *schema.Accelerator) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Accelerator",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Accelerator().ID(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) _Accelerator_Type(ctx context.Context, field graphql.CollectedField, obj *schema.Accelerator) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Accelerator",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Accelerator_Model(ctx context.Context, field graphql.CollectedField, obj *schema.Accelerator) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Accelerator",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Model, 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) _Cluster_ClusterID(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ClusterID, 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) _Cluster_ProcessorType(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ProcessorType, 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) _Cluster_SocketsPerNode(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SocketsPerNode, 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) _Cluster_CoresPerSocket(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.CoresPerSocket, 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) _Cluster_ThreadsPerCore(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ThreadsPerCore, 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) _Cluster_FlopRateScalar(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FlopRateScalar, 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) _Cluster_FlopRateSimd(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FlopRateSimd, 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) _Cluster_MemoryBandwidth(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MemoryBandwidth, 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) _Cluster_MetricConfig(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MetricConfig, 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.MetricConfig)
|
|
fc.Result = res
|
|
return ec.marshalNMetricConfig2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricConfigᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Cluster_FilterRanges(ctx context.Context, field graphql.CollectedField, obj *model.Cluster) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Cluster",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FilterRanges, 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.FilterRanges)
|
|
fc.Result = res
|
|
return ec.marshalNFilterRanges2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFilterRanges(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _FilterRanges_duration(ctx context.Context, field graphql.CollectedField, obj *model.FilterRanges) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "FilterRanges",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Duration, 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.IntRangeOutput)
|
|
fc.Result = res
|
|
return ec.marshalNIntRangeOutput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐIntRangeOutput(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _FilterRanges_numNodes(ctx context.Context, field graphql.CollectedField, obj *model.FilterRanges) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "FilterRanges",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NumNodes, 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.IntRangeOutput)
|
|
fc.Result = res
|
|
return ec.marshalNIntRangeOutput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐIntRangeOutput(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _FilterRanges_startTime(ctx context.Context, field graphql.CollectedField, obj *model.FilterRanges) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "FilterRanges",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.StartTime, 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.TimeRangeOutput)
|
|
fc.Result = res
|
|
return ec.marshalNTimeRangeOutput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐTimeRangeOutput(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _HistoPoint_count(ctx context.Context, field graphql.CollectedField, obj *model.HistoPoint) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "HistoPoint",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Count, 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) _HistoPoint_value(ctx context.Context, field graphql.CollectedField, obj *model.HistoPoint) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "HistoPoint",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Value, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
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) _IntRangeOutput_from(ctx context.Context, field graphql.CollectedField, obj *model.IntRangeOutput) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "IntRangeOutput",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.From, 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) _IntRangeOutput_to(ctx context.Context, field graphql.CollectedField, obj *model.IntRangeOutput) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "IntRangeOutput",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.To, 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) _Job_Id(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.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.(string)
|
|
fc.Result = res
|
|
return ec.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_JobId(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.JobID, 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) _Job_User(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.User, 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) _Job_Project(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Project, 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) _Job_Cluster(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Cluster, 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) _Job_StartTime(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.StartTime, 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.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_Duration(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Duration, 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) _Job_NumNodes(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NumNodes, 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) _Job_NumHWThreads(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NumHWThreads, 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) _Job_NumAcc(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NumAcc, 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) _Job_SMT(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Smt, 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) _Job_Exclusive(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Exclusive, 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) _Job_Partition(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Partition, 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) _Job_ArrayJobId(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ArrayJobID, 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) _Job_MonitoringStatus(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MonitoringStatus, 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) _Job_State(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.State, 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.JobState)
|
|
fc.Result = res
|
|
return ec.marshalNJobState2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobState(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_Tags(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Job().Tags(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.JobTag)
|
|
fc.Result = res
|
|
return ec.marshalNJobTag2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTagᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_Resources(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Resources, 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.([]*schema.JobResource)
|
|
fc.Result = res
|
|
return ec.marshalNJobResource2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐJobResourceᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_LoadAvg(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.LoadAvg, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_MemUsedMax(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MemUsedMax, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_FlopsAnyAvg(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FlopsAnyAvg, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_MemBwAvg(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MemBwAvg, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_NetBwAvg(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.NetBwAvg, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Job_FileBwAvg(ctx context.Context, field graphql.CollectedField, obj *model.Job) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Job",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.FileBwAvg, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*float64)
|
|
fc.Result = res
|
|
return ec.marshalOFloat2ᚖfloat64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetric_Unit(ctx context.Context, field graphql.CollectedField, obj *schema.JobMetric) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetric",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Unit, 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) _JobMetric_Scope(ctx context.Context, field graphql.CollectedField, obj *schema.JobMetric) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetric",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Scope, 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.(schema.MetricScope)
|
|
fc.Result = res
|
|
return ec.marshalNJobMetricScope2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricScope(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetric_Timestep(ctx context.Context, field graphql.CollectedField, obj *schema.JobMetric) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetric",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Timestep, 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) _JobMetric_Series(ctx context.Context, field graphql.CollectedField, obj *schema.JobMetric) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetric",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Series, 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.([]*schema.MetricSeries)
|
|
fc.Result = res
|
|
return ec.marshalNJobMetricSeries2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricSeriesᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricSeries_Hostname(ctx context.Context, field graphql.CollectedField, obj *schema.MetricSeries) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricSeries",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Hostname, 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) _JobMetricSeries_Id(ctx context.Context, field graphql.CollectedField, obj *schema.MetricSeries) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricSeries",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Id, 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.marshalOInt2int(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricSeries_Statistics(ctx context.Context, field graphql.CollectedField, obj *schema.MetricSeries) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricSeries",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Statistics, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*schema.MetricStatistics)
|
|
fc.Result = res
|
|
return ec.marshalOJobMetricStatistics2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricStatistics(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricSeries_Data(ctx context.Context, field graphql.CollectedField, obj *schema.MetricSeries) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricSeries",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, 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.([]schema.Float)
|
|
fc.Result = res
|
|
return ec.marshalNNullableFloat2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloatᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricStatistics_Avg(ctx context.Context, field graphql.CollectedField, obj *schema.MetricStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Avg, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(float64)
|
|
fc.Result = res
|
|
return ec.marshalNFloat2float64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricStatistics_Min(ctx context.Context, field graphql.CollectedField, obj *schema.MetricStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Min, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(float64)
|
|
fc.Result = res
|
|
return ec.marshalNFloat2float64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricStatistics_Max(ctx context.Context, field graphql.CollectedField, obj *schema.MetricStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Max, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(float64)
|
|
fc.Result = res
|
|
return ec.marshalNFloat2float64(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricWithName_name(ctx context.Context, field graphql.CollectedField, obj *model.JobMetricWithName) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricWithName",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobMetricWithName_metric(ctx context.Context, field graphql.CollectedField, obj *model.JobMetricWithName) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobMetricWithName",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Metric, 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.(*schema.JobMetric)
|
|
fc.Result = res
|
|
return ec.marshalNJobMetric2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐJobMetric(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobResource_Hostname(ctx context.Context, field graphql.CollectedField, obj *schema.JobResource) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResource",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Hostname, 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) _JobResource_HWThreads(ctx context.Context, field graphql.CollectedField, obj *schema.JobResource) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResource",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.HWThreads, 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) _JobResource_Accelerators(ctx context.Context, field graphql.CollectedField, obj *schema.JobResource) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResource",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Accelerators, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]schema.Accelerator)
|
|
fc.Result = res
|
|
return ec.marshalOAccelerator2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐAcceleratorᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobResultList_items(ctx context.Context, field graphql.CollectedField, obj *model.JobResultList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResultList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Items, 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.Job)
|
|
fc.Result = res
|
|
return ec.marshalNJob2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobResultList_offset(ctx context.Context, field graphql.CollectedField, obj *model.JobResultList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResultList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Offset, 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) _JobResultList_limit(ctx context.Context, field graphql.CollectedField, obj *model.JobResultList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResultList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Limit, 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) _JobResultList_count(ctx context.Context, field graphql.CollectedField, obj *model.JobResultList) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobResultList",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Count, 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) _JobTag_Id(ctx context.Context, field graphql.CollectedField, obj *model.JobTag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobTag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.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.(string)
|
|
fc.Result = res
|
|
return ec.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobTag_TagType(ctx context.Context, field graphql.CollectedField, obj *model.JobTag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobTag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.TagType, 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) _JobTag_TagName(ctx context.Context, field graphql.CollectedField, obj *model.JobTag) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobTag",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.TagName, 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) _JobsStatistics_id(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.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.(string)
|
|
fc.Result = res
|
|
return ec.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobsStatistics_totalJobs(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.TotalJobs, 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) _JobsStatistics_shortJobs(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.ShortJobs, 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) _JobsStatistics_totalWalltime(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.TotalWalltime, 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) _JobsStatistics_totalCoreHours(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.TotalCoreHours, 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) _JobsStatistics_histWalltime(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.HistWalltime, 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.HistoPoint)
|
|
fc.Result = res
|
|
return ec.marshalNHistoPoint2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐHistoPointᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _JobsStatistics_histNumNodes(ctx context.Context, field graphql.CollectedField, obj *model.JobsStatistics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "JobsStatistics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.HistNumNodes, 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.HistoPoint)
|
|
fc.Result = res
|
|
return ec.marshalNHistoPoint2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐHistoPointᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MetricConfig_Name(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MetricConfig_Unit(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Unit, 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) _MetricConfig_Timestep(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Timestep, 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) _MetricConfig_Peak(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Peak, 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) _MetricConfig_Normal(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Normal, 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) _MetricConfig_Caution(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Caution, 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) _MetricConfig_Alert(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Alert, 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) _MetricConfig_Scope(ctx context.Context, field graphql.CollectedField, obj *model.MetricConfig) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricConfig",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Scope, 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) _MetricFootprints_name(ctx context.Context, field graphql.CollectedField, obj *model.MetricFootprints) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricFootprints",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _MetricFootprints_footprints(ctx context.Context, field graphql.CollectedField, obj *model.MetricFootprints) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "MetricFootprints",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Footprints, 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.([]schema.Float)
|
|
fc.Result = res
|
|
return ec.marshalNNullableFloat2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloatᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_createTag_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().CreateTag(rctx, args["type"].(string), args["name"].(string))
|
|
})
|
|
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.JobTag)
|
|
fc.Result = res
|
|
return ec.marshalNJobTag2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTag(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_deleteTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_deleteTag_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().DeleteTag(rctx, args["id"].(string))
|
|
})
|
|
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.marshalNID2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_addTagsToJob(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_addTagsToJob_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().AddTagsToJob(rctx, args["job"].(string), args["tagIds"].([]string))
|
|
})
|
|
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.JobTag)
|
|
fc.Result = res
|
|
return ec.marshalNJobTag2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTagᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_removeTagsFromJob(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_removeTagsFromJob_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().RemoveTagsFromJob(rctx, args["job"].(string), args["tagIds"].([]string))
|
|
})
|
|
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.JobTag)
|
|
fc.Result = res
|
|
return ec.marshalNJobTag2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTagᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Mutation_updateConfiguration(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Mutation_updateConfiguration_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Mutation().UpdateConfiguration(rctx, args["name"].(string), args["value"].(string))
|
|
})
|
|
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) _NodeMetric_name(ctx context.Context, field graphql.CollectedField, obj *model.NodeMetric) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "NodeMetric",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _NodeMetric_data(ctx context.Context, field graphql.CollectedField, obj *model.NodeMetric) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "NodeMetric",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Data, 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.([]schema.Float)
|
|
fc.Result = res
|
|
return ec.marshalNNullableFloat2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloatᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _NodeMetrics_id(ctx context.Context, field graphql.CollectedField, obj *model.NodeMetrics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "NodeMetrics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.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.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _NodeMetrics_metrics(ctx context.Context, field graphql.CollectedField, obj *model.NodeMetrics) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "NodeMetrics",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Metrics, 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.NodeMetric)
|
|
fc.Result = res
|
|
return ec.marshalNNodeMetric2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetricᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_clusters(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Clusters(rctx)
|
|
})
|
|
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.Cluster)
|
|
fc.Result = res
|
|
return ec.marshalNCluster2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐClusterᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Tags(rctx)
|
|
})
|
|
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.JobTag)
|
|
fc.Result = res
|
|
return ec.marshalNJobTag2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTagᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_job(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_job_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Job(rctx, args["id"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*model.Job)
|
|
fc.Result = res
|
|
return ec.marshalOJob2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJob(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_jobMetrics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_jobMetrics_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().JobMetrics(rctx, args["id"].(string), args["metrics"].([]string))
|
|
})
|
|
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.JobMetricWithName)
|
|
fc.Result = res
|
|
return ec.marshalNJobMetricWithName2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobMetricWithNameᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_jobsFootprints(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_jobsFootprints_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().JobsFootprints(rctx, args["filter"].([]*model.JobFilter), args["metrics"].([]string))
|
|
})
|
|
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.MetricFootprints)
|
|
fc.Result = res
|
|
return ec.marshalNMetricFootprints2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricFootprints(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_jobs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_jobs_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().Jobs(rctx, args["filter"].([]*model.JobFilter), args["page"].(*model.PageRequest), args["order"].(*model.OrderByInput))
|
|
})
|
|
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.JobResultList)
|
|
fc.Result = res
|
|
return ec.marshalNJobResultList2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobResultList(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_jobsStatistics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_jobsStatistics_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().JobsStatistics(rctx, args["filter"].([]*model.JobFilter), args["groupBy"].(*model.Aggregate))
|
|
})
|
|
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.JobsStatistics)
|
|
fc.Result = res
|
|
return ec.marshalNJobsStatistics2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobsStatisticsᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_rooflineHeatmap(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_rooflineHeatmap_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().RooflineHeatmap(rctx, args["filter"].([]*model.JobFilter), args["rows"].(int), args["cols"].(int), args["minX"].(float64), args["minY"].(float64), args["maxX"].(float64), args["maxY"].(float64))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([][]float64)
|
|
fc.Result = res
|
|
return ec.marshalNFloat2ᚕᚕfloat64ᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query_nodeMetrics(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: true,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query_nodeMetrics_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.resolvers.Query().NodeMetrics(rctx, args["cluster"].(string), args["nodes"].([]string), args["metrics"].([]string), args["from"].(time.Time), args["to"].(time.Time))
|
|
})
|
|
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.NodeMetrics)
|
|
fc.Result = res
|
|
return ec.marshalNNodeMetrics2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetricsᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field_Query___type_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectType(args["name"].(string))
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "Query",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return ec.introspectSchema()
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Schema)
|
|
fc.Result = res
|
|
return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TimeRangeOutput_from(ctx context.Context, field graphql.CollectedField, obj *model.TimeRangeOutput) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TimeRangeOutput",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.From, 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.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) _TimeRangeOutput_to(ctx context.Context, field graphql.CollectedField, obj *model.TimeRangeOutput) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "TimeRangeOutput",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.To, 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.(time.Time)
|
|
fc.Result = res
|
|
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Locations, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]string)
|
|
fc.Result = res
|
|
return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Directive",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__EnumValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Args, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.IsDeprecated(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(bool)
|
|
fc.Result = res
|
|
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Field",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DeprecationReason(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Type, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__InputValue",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: false,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.DefaultValue, nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Types(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.QueryType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.MutationType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.SubscriptionType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Schema",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Directives(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Directive)
|
|
fc.Result = res
|
|
return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Kind(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
if !graphql.HasFieldError(ctx, fc) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Name(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*string)
|
|
fc.Result = res
|
|
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Description(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(string)
|
|
fc.Result = res
|
|
return ec.marshalOString2string(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field___Type_fields_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Fields(args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Field)
|
|
fc.Result = res
|
|
return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.Interfaces(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.PossibleTypes(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
rawArgs := field.ArgumentMap(ec.Variables)
|
|
args, err := ec.field___Type_enumValues_args(ctx, rawArgs)
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
fc.Args = args
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.EnumValues(args["includeDeprecated"].(bool)), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.EnumValue)
|
|
fc.Result = res
|
|
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.InputFields(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.([]introspection.InputValue)
|
|
fc.Result = res
|
|
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res)
|
|
}
|
|
|
|
func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = graphql.Null
|
|
}
|
|
}()
|
|
fc := &graphql.FieldContext{
|
|
Object: "__Type",
|
|
Field: field,
|
|
Args: nil,
|
|
IsMethod: true,
|
|
IsResolver: false,
|
|
}
|
|
|
|
ctx = graphql.WithFieldContext(ctx, fc)
|
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
|
ctx = rctx // use context from middleware stack in children
|
|
return obj.OfType(), nil
|
|
})
|
|
if err != nil {
|
|
ec.Error(ctx, err)
|
|
return graphql.Null
|
|
}
|
|
if resTmp == nil {
|
|
return graphql.Null
|
|
}
|
|
res := resTmp.(*introspection.Type)
|
|
fc.Result = res
|
|
return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
|
|
}
|
|
|
|
// endregion **************************** field.gotpl *****************************
|
|
|
|
// region **************************** input.gotpl *****************************
|
|
|
|
func (ec *executionContext) unmarshalInputFloatRange(ctx context.Context, obj interface{}) (model.FloatRange, error) {
|
|
var it model.FloatRange
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "from":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("from"))
|
|
it.From, err = ec.unmarshalNFloat2float64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "to":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("to"))
|
|
it.To, err = ec.unmarshalNFloat2float64(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputIntRange(ctx context.Context, obj interface{}) (model.IntRange, error) {
|
|
var it model.IntRange
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "from":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("from"))
|
|
it.From, err = ec.unmarshalNInt2int(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "to":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("to"))
|
|
it.To, err = ec.unmarshalNInt2int(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputJobFilter(ctx context.Context, obj interface{}) (model.JobFilter, error) {
|
|
var it model.JobFilter
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "tags":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("tags"))
|
|
it.Tags, err = ec.unmarshalOID2ᚕstringᚄ(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "jobId":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("jobId"))
|
|
it.JobID, err = ec.unmarshalOStringInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐStringInput(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "user":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("user"))
|
|
it.User, err = ec.unmarshalOStringInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐStringInput(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "project":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("project"))
|
|
it.Project, err = ec.unmarshalOStringInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐStringInput(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "cluster":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cluster"))
|
|
it.Cluster, err = ec.unmarshalOStringInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐStringInput(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "duration":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("duration"))
|
|
it.Duration, err = ec.unmarshalOIntRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐIntRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "numNodes":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("numNodes"))
|
|
it.NumNodes, err = ec.unmarshalOIntRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐIntRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "startTime":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("startTime"))
|
|
it.StartTime, err = ec.unmarshalOTimeRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐTimeRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "jobState":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("jobState"))
|
|
it.JobState, err = ec.unmarshalOJobState2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobStateᚄ(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "flopsAnyAvg":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("flopsAnyAvg"))
|
|
it.FlopsAnyAvg, err = ec.unmarshalOFloatRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFloatRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "memBwAvg":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("memBwAvg"))
|
|
it.MemBwAvg, err = ec.unmarshalOFloatRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFloatRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "loadAvg":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("loadAvg"))
|
|
it.LoadAvg, err = ec.unmarshalOFloatRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFloatRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "memUsedMax":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("memUsedMax"))
|
|
it.MemUsedMax, err = ec.unmarshalOFloatRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFloatRange(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputOrderByInput(ctx context.Context, obj interface{}) (model.OrderByInput, error) {
|
|
var it model.OrderByInput
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
if _, present := asMap["order"]; !present {
|
|
asMap["order"] = "ASC"
|
|
}
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "field":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field"))
|
|
it.Field, err = ec.unmarshalNString2string(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "order":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("order"))
|
|
it.Order, err = ec.unmarshalNSortDirectionEnum2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐSortDirectionEnum(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputPageRequest(ctx context.Context, obj interface{}) (model.PageRequest, error) {
|
|
var it model.PageRequest
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "itemsPerPage":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("itemsPerPage"))
|
|
it.ItemsPerPage, err = ec.unmarshalNInt2int(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "page":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page"))
|
|
it.Page, err = ec.unmarshalNInt2int(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputStringInput(ctx context.Context, obj interface{}) (model.StringInput, error) {
|
|
var it model.StringInput
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "eq":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("eq"))
|
|
it.Eq, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "contains":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contains"))
|
|
it.Contains, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "startsWith":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("startsWith"))
|
|
it.StartsWith, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "endsWith":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("endsWith"))
|
|
it.EndsWith, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalInputTimeRange(ctx context.Context, obj interface{}) (model.TimeRange, error) {
|
|
var it model.TimeRange
|
|
var asMap = obj.(map[string]interface{})
|
|
|
|
for k, v := range asMap {
|
|
switch k {
|
|
case "from":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("from"))
|
|
it.From, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
case "to":
|
|
var err error
|
|
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("to"))
|
|
it.To, err = ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v)
|
|
if err != nil {
|
|
return it, err
|
|
}
|
|
}
|
|
}
|
|
|
|
return it, nil
|
|
}
|
|
|
|
// endregion **************************** input.gotpl *****************************
|
|
|
|
// region ************************** interface.gotpl ***************************
|
|
|
|
// endregion ************************** interface.gotpl ***************************
|
|
|
|
// region **************************** object.gotpl ****************************
|
|
|
|
var acceleratorImplementors = []string{"Accelerator"}
|
|
|
|
func (ec *executionContext) _Accelerator(ctx context.Context, sel ast.SelectionSet, obj *schema.Accelerator) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, acceleratorImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Accelerator")
|
|
case "Id":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Accelerator_Id(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "Type":
|
|
out.Values[i] = ec._Accelerator_Type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Model":
|
|
out.Values[i] = ec._Accelerator_Model(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var clusterImplementors = []string{"Cluster"}
|
|
|
|
func (ec *executionContext) _Cluster(ctx context.Context, sel ast.SelectionSet, obj *model.Cluster) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, clusterImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Cluster")
|
|
case "ClusterID":
|
|
out.Values[i] = ec._Cluster_ClusterID(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "ProcessorType":
|
|
out.Values[i] = ec._Cluster_ProcessorType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "SocketsPerNode":
|
|
out.Values[i] = ec._Cluster_SocketsPerNode(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "CoresPerSocket":
|
|
out.Values[i] = ec._Cluster_CoresPerSocket(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "ThreadsPerCore":
|
|
out.Values[i] = ec._Cluster_ThreadsPerCore(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "FlopRateScalar":
|
|
out.Values[i] = ec._Cluster_FlopRateScalar(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "FlopRateSimd":
|
|
out.Values[i] = ec._Cluster_FlopRateSimd(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "MemoryBandwidth":
|
|
out.Values[i] = ec._Cluster_MemoryBandwidth(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "MetricConfig":
|
|
out.Values[i] = ec._Cluster_MetricConfig(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "FilterRanges":
|
|
out.Values[i] = ec._Cluster_FilterRanges(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var filterRangesImplementors = []string{"FilterRanges"}
|
|
|
|
func (ec *executionContext) _FilterRanges(ctx context.Context, sel ast.SelectionSet, obj *model.FilterRanges) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, filterRangesImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("FilterRanges")
|
|
case "duration":
|
|
out.Values[i] = ec._FilterRanges_duration(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "numNodes":
|
|
out.Values[i] = ec._FilterRanges_numNodes(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "startTime":
|
|
out.Values[i] = ec._FilterRanges_startTime(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var histoPointImplementors = []string{"HistoPoint"}
|
|
|
|
func (ec *executionContext) _HistoPoint(ctx context.Context, sel ast.SelectionSet, obj *model.HistoPoint) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, histoPointImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("HistoPoint")
|
|
case "count":
|
|
out.Values[i] = ec._HistoPoint_count(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "value":
|
|
out.Values[i] = ec._HistoPoint_value(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var intRangeOutputImplementors = []string{"IntRangeOutput"}
|
|
|
|
func (ec *executionContext) _IntRangeOutput(ctx context.Context, sel ast.SelectionSet, obj *model.IntRangeOutput) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, intRangeOutputImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("IntRangeOutput")
|
|
case "from":
|
|
out.Values[i] = ec._IntRangeOutput_from(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "to":
|
|
out.Values[i] = ec._IntRangeOutput_to(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobImplementors = []string{"Job"}
|
|
|
|
func (ec *executionContext) _Job(ctx context.Context, sel ast.SelectionSet, obj *model.Job) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Job")
|
|
case "Id":
|
|
out.Values[i] = ec._Job_Id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "JobId":
|
|
out.Values[i] = ec._Job_JobId(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "User":
|
|
out.Values[i] = ec._Job_User(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Project":
|
|
out.Values[i] = ec._Job_Project(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Cluster":
|
|
out.Values[i] = ec._Job_Cluster(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "StartTime":
|
|
out.Values[i] = ec._Job_StartTime(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Duration":
|
|
out.Values[i] = ec._Job_Duration(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "NumNodes":
|
|
out.Values[i] = ec._Job_NumNodes(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "NumHWThreads":
|
|
out.Values[i] = ec._Job_NumHWThreads(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "NumAcc":
|
|
out.Values[i] = ec._Job_NumAcc(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "SMT":
|
|
out.Values[i] = ec._Job_SMT(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Exclusive":
|
|
out.Values[i] = ec._Job_Exclusive(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Partition":
|
|
out.Values[i] = ec._Job_Partition(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "ArrayJobId":
|
|
out.Values[i] = ec._Job_ArrayJobId(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "MonitoringStatus":
|
|
out.Values[i] = ec._Job_MonitoringStatus(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "State":
|
|
out.Values[i] = ec._Job_State(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "Tags":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Job_Tags(ctx, field, obj)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "Resources":
|
|
out.Values[i] = ec._Job_Resources(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
case "LoadAvg":
|
|
out.Values[i] = ec._Job_LoadAvg(ctx, field, obj)
|
|
case "MemUsedMax":
|
|
out.Values[i] = ec._Job_MemUsedMax(ctx, field, obj)
|
|
case "FlopsAnyAvg":
|
|
out.Values[i] = ec._Job_FlopsAnyAvg(ctx, field, obj)
|
|
case "MemBwAvg":
|
|
out.Values[i] = ec._Job_MemBwAvg(ctx, field, obj)
|
|
case "NetBwAvg":
|
|
out.Values[i] = ec._Job_NetBwAvg(ctx, field, obj)
|
|
case "FileBwAvg":
|
|
out.Values[i] = ec._Job_FileBwAvg(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobMetricImplementors = []string{"JobMetric"}
|
|
|
|
func (ec *executionContext) _JobMetric(ctx context.Context, sel ast.SelectionSet, obj *schema.JobMetric) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobMetricImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobMetric")
|
|
case "Unit":
|
|
out.Values[i] = ec._JobMetric_Unit(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Scope":
|
|
out.Values[i] = ec._JobMetric_Scope(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Timestep":
|
|
out.Values[i] = ec._JobMetric_Timestep(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Series":
|
|
out.Values[i] = ec._JobMetric_Series(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobMetricSeriesImplementors = []string{"JobMetricSeries"}
|
|
|
|
func (ec *executionContext) _JobMetricSeries(ctx context.Context, sel ast.SelectionSet, obj *schema.MetricSeries) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobMetricSeriesImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobMetricSeries")
|
|
case "Hostname":
|
|
out.Values[i] = ec._JobMetricSeries_Hostname(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Id":
|
|
out.Values[i] = ec._JobMetricSeries_Id(ctx, field, obj)
|
|
case "Statistics":
|
|
out.Values[i] = ec._JobMetricSeries_Statistics(ctx, field, obj)
|
|
case "Data":
|
|
out.Values[i] = ec._JobMetricSeries_Data(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobMetricStatisticsImplementors = []string{"JobMetricStatistics"}
|
|
|
|
func (ec *executionContext) _JobMetricStatistics(ctx context.Context, sel ast.SelectionSet, obj *schema.MetricStatistics) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobMetricStatisticsImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobMetricStatistics")
|
|
case "Avg":
|
|
out.Values[i] = ec._JobMetricStatistics_Avg(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Min":
|
|
out.Values[i] = ec._JobMetricStatistics_Min(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Max":
|
|
out.Values[i] = ec._JobMetricStatistics_Max(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobMetricWithNameImplementors = []string{"JobMetricWithName"}
|
|
|
|
func (ec *executionContext) _JobMetricWithName(ctx context.Context, sel ast.SelectionSet, obj *model.JobMetricWithName) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobMetricWithNameImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobMetricWithName")
|
|
case "name":
|
|
out.Values[i] = ec._JobMetricWithName_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "metric":
|
|
out.Values[i] = ec._JobMetricWithName_metric(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobResourceImplementors = []string{"JobResource"}
|
|
|
|
func (ec *executionContext) _JobResource(ctx context.Context, sel ast.SelectionSet, obj *schema.JobResource) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobResourceImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobResource")
|
|
case "Hostname":
|
|
out.Values[i] = ec._JobResource_Hostname(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "HWThreads":
|
|
out.Values[i] = ec._JobResource_HWThreads(ctx, field, obj)
|
|
case "Accelerators":
|
|
out.Values[i] = ec._JobResource_Accelerators(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobResultListImplementors = []string{"JobResultList"}
|
|
|
|
func (ec *executionContext) _JobResultList(ctx context.Context, sel ast.SelectionSet, obj *model.JobResultList) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobResultListImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobResultList")
|
|
case "items":
|
|
out.Values[i] = ec._JobResultList_items(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "offset":
|
|
out.Values[i] = ec._JobResultList_offset(ctx, field, obj)
|
|
case "limit":
|
|
out.Values[i] = ec._JobResultList_limit(ctx, field, obj)
|
|
case "count":
|
|
out.Values[i] = ec._JobResultList_count(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobTagImplementors = []string{"JobTag"}
|
|
|
|
func (ec *executionContext) _JobTag(ctx context.Context, sel ast.SelectionSet, obj *model.JobTag) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobTagImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobTag")
|
|
case "Id":
|
|
out.Values[i] = ec._JobTag_Id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "TagType":
|
|
out.Values[i] = ec._JobTag_TagType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "TagName":
|
|
out.Values[i] = ec._JobTag_TagName(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var jobsStatisticsImplementors = []string{"JobsStatistics"}
|
|
|
|
func (ec *executionContext) _JobsStatistics(ctx context.Context, sel ast.SelectionSet, obj *model.JobsStatistics) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, jobsStatisticsImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("JobsStatistics")
|
|
case "id":
|
|
out.Values[i] = ec._JobsStatistics_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "totalJobs":
|
|
out.Values[i] = ec._JobsStatistics_totalJobs(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "shortJobs":
|
|
out.Values[i] = ec._JobsStatistics_shortJobs(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "totalWalltime":
|
|
out.Values[i] = ec._JobsStatistics_totalWalltime(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "totalCoreHours":
|
|
out.Values[i] = ec._JobsStatistics_totalCoreHours(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "histWalltime":
|
|
out.Values[i] = ec._JobsStatistics_histWalltime(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "histNumNodes":
|
|
out.Values[i] = ec._JobsStatistics_histNumNodes(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var metricConfigImplementors = []string{"MetricConfig"}
|
|
|
|
func (ec *executionContext) _MetricConfig(ctx context.Context, sel ast.SelectionSet, obj *model.MetricConfig) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, metricConfigImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MetricConfig")
|
|
case "Name":
|
|
out.Values[i] = ec._MetricConfig_Name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Unit":
|
|
out.Values[i] = ec._MetricConfig_Unit(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Timestep":
|
|
out.Values[i] = ec._MetricConfig_Timestep(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Peak":
|
|
out.Values[i] = ec._MetricConfig_Peak(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Normal":
|
|
out.Values[i] = ec._MetricConfig_Normal(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Caution":
|
|
out.Values[i] = ec._MetricConfig_Caution(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Alert":
|
|
out.Values[i] = ec._MetricConfig_Alert(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "Scope":
|
|
out.Values[i] = ec._MetricConfig_Scope(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var metricFootprintsImplementors = []string{"MetricFootprints"}
|
|
|
|
func (ec *executionContext) _MetricFootprints(ctx context.Context, sel ast.SelectionSet, obj *model.MetricFootprints) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, metricFootprintsImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("MetricFootprints")
|
|
case "name":
|
|
out.Values[i] = ec._MetricFootprints_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "footprints":
|
|
out.Values[i] = ec._MetricFootprints_footprints(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var mutationImplementors = []string{"Mutation"}
|
|
|
|
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors)
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Mutation",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Mutation")
|
|
case "createTag":
|
|
out.Values[i] = ec._Mutation_createTag(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deleteTag":
|
|
out.Values[i] = ec._Mutation_deleteTag(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "addTagsToJob":
|
|
out.Values[i] = ec._Mutation_addTagsToJob(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "removeTagsFromJob":
|
|
out.Values[i] = ec._Mutation_removeTagsFromJob(ctx, field)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "updateConfiguration":
|
|
out.Values[i] = ec._Mutation_updateConfiguration(ctx, field)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var nodeMetricImplementors = []string{"NodeMetric"}
|
|
|
|
func (ec *executionContext) _NodeMetric(ctx context.Context, sel ast.SelectionSet, obj *model.NodeMetric) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, nodeMetricImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("NodeMetric")
|
|
case "name":
|
|
out.Values[i] = ec._NodeMetric_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "data":
|
|
out.Values[i] = ec._NodeMetric_data(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var nodeMetricsImplementors = []string{"NodeMetrics"}
|
|
|
|
func (ec *executionContext) _NodeMetrics(ctx context.Context, sel ast.SelectionSet, obj *model.NodeMetrics) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, nodeMetricsImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("NodeMetrics")
|
|
case "id":
|
|
out.Values[i] = ec._NodeMetrics_id(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "metrics":
|
|
out.Values[i] = ec._NodeMetrics_metrics(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var queryImplementors = []string{"Query"}
|
|
|
|
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
|
|
|
|
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
|
|
Object: "Query",
|
|
})
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("Query")
|
|
case "clusters":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_clusters(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "tags":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_tags(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "job":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_job(ctx, field)
|
|
return res
|
|
})
|
|
case "jobMetrics":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_jobMetrics(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "jobsFootprints":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_jobsFootprints(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "jobs":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_jobs(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "jobsStatistics":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_jobsStatistics(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "rooflineHeatmap":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_rooflineHeatmap(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "nodeMetrics":
|
|
field := field
|
|
out.Concurrently(i, func() (res graphql.Marshaler) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
}
|
|
}()
|
|
res = ec._Query_nodeMetrics(ctx, field)
|
|
if res == graphql.Null {
|
|
atomic.AddUint32(&invalids, 1)
|
|
}
|
|
return res
|
|
})
|
|
case "__type":
|
|
out.Values[i] = ec._Query___type(ctx, field)
|
|
case "__schema":
|
|
out.Values[i] = ec._Query___schema(ctx, field)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var timeRangeOutputImplementors = []string{"TimeRangeOutput"}
|
|
|
|
func (ec *executionContext) _TimeRangeOutput(ctx context.Context, sel ast.SelectionSet, obj *model.TimeRangeOutput) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, timeRangeOutputImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("TimeRangeOutput")
|
|
case "from":
|
|
out.Values[i] = ec._TimeRangeOutput_from(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "to":
|
|
out.Values[i] = ec._TimeRangeOutput_to(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __DirectiveImplementors = []string{"__Directive"}
|
|
|
|
func (ec *executionContext) ___Directive(ctx context.Context, sel ast.SelectionSet, obj *introspection.Directive) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __DirectiveImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Directive")
|
|
case "name":
|
|
out.Values[i] = ec.___Directive_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Directive_description(ctx, field, obj)
|
|
case "locations":
|
|
out.Values[i] = ec.___Directive_locations(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "args":
|
|
out.Values[i] = ec.___Directive_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __EnumValueImplementors = []string{"__EnumValue"}
|
|
|
|
func (ec *executionContext) ___EnumValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.EnumValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __EnumValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__EnumValue")
|
|
case "name":
|
|
out.Values[i] = ec.___EnumValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___EnumValue_description(ctx, field, obj)
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___EnumValue_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___EnumValue_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __FieldImplementors = []string{"__Field"}
|
|
|
|
func (ec *executionContext) ___Field(ctx context.Context, sel ast.SelectionSet, obj *introspection.Field) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __FieldImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Field")
|
|
case "name":
|
|
out.Values[i] = ec.___Field_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___Field_description(ctx, field, obj)
|
|
case "args":
|
|
out.Values[i] = ec.___Field_args(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "type":
|
|
out.Values[i] = ec.___Field_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "isDeprecated":
|
|
out.Values[i] = ec.___Field_isDeprecated(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "deprecationReason":
|
|
out.Values[i] = ec.___Field_deprecationReason(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __InputValueImplementors = []string{"__InputValue"}
|
|
|
|
func (ec *executionContext) ___InputValue(ctx context.Context, sel ast.SelectionSet, obj *introspection.InputValue) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __InputValueImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__InputValue")
|
|
case "name":
|
|
out.Values[i] = ec.___InputValue_name(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "description":
|
|
out.Values[i] = ec.___InputValue_description(ctx, field, obj)
|
|
case "type":
|
|
out.Values[i] = ec.___InputValue_type(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "defaultValue":
|
|
out.Values[i] = ec.___InputValue_defaultValue(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __SchemaImplementors = []string{"__Schema"}
|
|
|
|
func (ec *executionContext) ___Schema(ctx context.Context, sel ast.SelectionSet, obj *introspection.Schema) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __SchemaImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Schema")
|
|
case "types":
|
|
out.Values[i] = ec.___Schema_types(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "queryType":
|
|
out.Values[i] = ec.___Schema_queryType(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "mutationType":
|
|
out.Values[i] = ec.___Schema_mutationType(ctx, field, obj)
|
|
case "subscriptionType":
|
|
out.Values[i] = ec.___Schema_subscriptionType(ctx, field, obj)
|
|
case "directives":
|
|
out.Values[i] = ec.___Schema_directives(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
var __TypeImplementors = []string{"__Type"}
|
|
|
|
func (ec *executionContext) ___Type(ctx context.Context, sel ast.SelectionSet, obj *introspection.Type) graphql.Marshaler {
|
|
fields := graphql.CollectFields(ec.OperationContext, sel, __TypeImplementors)
|
|
|
|
out := graphql.NewFieldSet(fields)
|
|
var invalids uint32
|
|
for i, field := range fields {
|
|
switch field.Name {
|
|
case "__typename":
|
|
out.Values[i] = graphql.MarshalString("__Type")
|
|
case "kind":
|
|
out.Values[i] = ec.___Type_kind(ctx, field, obj)
|
|
if out.Values[i] == graphql.Null {
|
|
invalids++
|
|
}
|
|
case "name":
|
|
out.Values[i] = ec.___Type_name(ctx, field, obj)
|
|
case "description":
|
|
out.Values[i] = ec.___Type_description(ctx, field, obj)
|
|
case "fields":
|
|
out.Values[i] = ec.___Type_fields(ctx, field, obj)
|
|
case "interfaces":
|
|
out.Values[i] = ec.___Type_interfaces(ctx, field, obj)
|
|
case "possibleTypes":
|
|
out.Values[i] = ec.___Type_possibleTypes(ctx, field, obj)
|
|
case "enumValues":
|
|
out.Values[i] = ec.___Type_enumValues(ctx, field, obj)
|
|
case "inputFields":
|
|
out.Values[i] = ec.___Type_inputFields(ctx, field, obj)
|
|
case "ofType":
|
|
out.Values[i] = ec.___Type_ofType(ctx, field, obj)
|
|
default:
|
|
panic("unknown field " + strconv.Quote(field.Name))
|
|
}
|
|
}
|
|
out.Dispatch()
|
|
if invalids > 0 {
|
|
return graphql.Null
|
|
}
|
|
return out
|
|
}
|
|
|
|
// endregion **************************** object.gotpl ****************************
|
|
|
|
// region ***************************** type.gotpl *****************************
|
|
|
|
func (ec *executionContext) marshalNAccelerator2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐAccelerator(ctx context.Context, sel ast.SelectionSet, v schema.Accelerator) graphql.Marshaler {
|
|
return ec._Accelerator(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
res := graphql.MarshalBoolean(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNCluster2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐClusterᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Cluster) 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.marshalNCluster2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐCluster(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNCluster2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐCluster(ctx context.Context, sel ast.SelectionSet, v *model.Cluster) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Cluster(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNFilterRanges2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFilterRanges(ctx context.Context, sel ast.SelectionSet, v *model.FilterRanges) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._FilterRanges(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) {
|
|
res, err := graphql.UnmarshalFloat(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
|
|
res := graphql.MarshalFloat(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNFloat2ᚕfloat64ᚄ(ctx context.Context, v interface{}) ([]float64, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]float64, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNFloat2float64(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNFloat2ᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v []float64) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNFloat2float64(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNFloat2ᚕᚕfloat64ᚄ(ctx context.Context, v interface{}) ([][]float64, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([][]float64, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNFloat2ᚕfloat64ᚄ(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNFloat2ᚕᚕfloat64ᚄ(ctx context.Context, sel ast.SelectionSet, v [][]float64) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNFloat2ᚕfloat64ᚄ(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNHistoPoint2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐHistoPointᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.HistoPoint) 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.marshalNHistoPoint2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐHistoPoint(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNHistoPoint2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐHistoPoint(ctx context.Context, sel ast.SelectionSet, v *model.HistoPoint) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._HistoPoint(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalID(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNID2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalID(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNID2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNID2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNID2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNID2string(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNIntRangeOutput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐIntRangeOutput(ctx context.Context, sel ast.SelectionSet, v *model.IntRangeOutput) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._IntRangeOutput(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJob2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Job) 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.marshalNJob2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJob(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJob2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJob(ctx context.Context, sel ast.SelectionSet, v *model.Job) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._Job(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNJobFilter2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilterᚄ(ctx context.Context, v interface{}) ([]*model.JobFilter, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]*model.JobFilter, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNJobFilter2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilter(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNJobFilter2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilter(ctx context.Context, v interface{}) (*model.JobFilter, error) {
|
|
res, err := ec.unmarshalInputJobFilter(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobMetric2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐJobMetric(ctx context.Context, sel ast.SelectionSet, v *schema.JobMetric) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobMetric(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNJobMetricScope2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricScope(ctx context.Context, v interface{}) (schema.MetricScope, error) {
|
|
var res schema.MetricScope
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobMetricScope2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricScope(ctx context.Context, sel ast.SelectionSet, v schema.MetricScope) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobMetricSeries2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricSeriesᚄ(ctx context.Context, sel ast.SelectionSet, v []*schema.MetricSeries) 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.marshalNJobMetricSeries2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricSeries(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobMetricSeries2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricSeries(ctx context.Context, sel ast.SelectionSet, v *schema.MetricSeries) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobMetricSeries(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobMetricWithName2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobMetricWithNameᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.JobMetricWithName) 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.marshalNJobMetricWithName2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobMetricWithName(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobMetricWithName2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobMetricWithName(ctx context.Context, sel ast.SelectionSet, v *model.JobMetricWithName) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobMetricWithName(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobResource2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐJobResourceᚄ(ctx context.Context, sel ast.SelectionSet, v []*schema.JobResource) 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.marshalNJobResource2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐJobResource(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobResource2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐJobResource(ctx context.Context, sel ast.SelectionSet, v *schema.JobResource) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobResource(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobResultList2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobResultList(ctx context.Context, sel ast.SelectionSet, v model.JobResultList) graphql.Marshaler {
|
|
return ec._JobResultList(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobResultList2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobResultList(ctx context.Context, sel ast.SelectionSet, v *model.JobResultList) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobResultList(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNJobState2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobState(ctx context.Context, v interface{}) (model.JobState, error) {
|
|
var res model.JobState
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobState2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobState(ctx context.Context, sel ast.SelectionSet, v model.JobState) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobTag2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTag(ctx context.Context, sel ast.SelectionSet, v model.JobTag) graphql.Marshaler {
|
|
return ec._JobTag(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobTag2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTagᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.JobTag) 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.marshalNJobTag2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTag(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobTag2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobTag(ctx context.Context, sel ast.SelectionSet, v *model.JobTag) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobTag(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobsStatistics2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobsStatisticsᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.JobsStatistics) 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.marshalNJobsStatistics2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobsStatistics(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNJobsStatistics2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobsStatistics(ctx context.Context, sel ast.SelectionSet, v *model.JobsStatistics) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._JobsStatistics(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMetricConfig2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricConfigᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.MetricConfig) 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.marshalNMetricConfig2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricConfig(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMetricConfig2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricConfig(ctx context.Context, sel ast.SelectionSet, v *model.MetricConfig) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._MetricConfig(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNMetricFootprints2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricFootprints(ctx context.Context, sel ast.SelectionSet, v []*model.MetricFootprints) 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.marshalOMetricFootprints2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricFootprints(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNNodeMetric2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetricᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.NodeMetric) 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.marshalNNodeMetric2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetric(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNNodeMetric2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetric(ctx context.Context, sel ast.SelectionSet, v *model.NodeMetric) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._NodeMetric(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNNodeMetrics2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetricsᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.NodeMetrics) 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.marshalNNodeMetrics2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetrics(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalNNodeMetrics2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐNodeMetrics(ctx context.Context, sel ast.SelectionSet, v *model.NodeMetrics) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._NodeMetrics(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNNullableFloat2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloat(ctx context.Context, v interface{}) (schema.Float, error) {
|
|
var res schema.Float
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNNullableFloat2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloat(ctx context.Context, sel ast.SelectionSet, v schema.Float) graphql.Marshaler {
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNNullableFloat2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloatᚄ(ctx context.Context, v interface{}) ([]schema.Float, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]schema.Float, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNNullableFloat2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloat(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNNullableFloat2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloatᚄ(ctx context.Context, sel ast.SelectionSet, v []schema.Float) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNNullableFloat2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐFloat(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNSortDirectionEnum2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐSortDirectionEnum(ctx context.Context, v interface{}) (model.SortDirectionEnum, error) {
|
|
var res model.SortDirectionEnum
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNSortDirectionEnum2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐSortDirectionEnum(ctx context.Context, sel ast.SelectionSet, v model.SortDirectionEnum) graphql.Marshaler {
|
|
return 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, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalNString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNString2string(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalNTime2timeᚐTime(ctx context.Context, v interface{}) (time.Time, error) {
|
|
res, err := graphql.UnmarshalTime(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel ast.SelectionSet, v time.Time) graphql.Marshaler {
|
|
res := graphql.MarshalTime(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalNTimeRangeOutput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐTimeRangeOutput(ctx context.Context, sel ast.SelectionSet, v *model.TimeRangeOutput) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec._TimeRangeOutput(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()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalN__DirectiveLocation2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__DirectiveLocation2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__DirectiveLocation2string(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx context.Context, sel ast.SelectionSet, v introspection.EnumValue) graphql.Marshaler {
|
|
return ec.___EnumValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx context.Context, sel ast.SelectionSet, v introspection.Field) graphql.Marshaler {
|
|
return ec.___Field(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx context.Context, sel ast.SelectionSet, v introspection.InputValue) graphql.Marshaler {
|
|
return ec.___InputValue(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v introspection.Type) graphql.Marshaler {
|
|
return ec.___Type(ctx, sel, &v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalN__TypeKind2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalN__TypeKind2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
res := graphql.MarshalString(v)
|
|
if res == graphql.Null {
|
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
|
ec.Errorf(ctx, "must not be null")
|
|
}
|
|
}
|
|
return res
|
|
}
|
|
|
|
func (ec *executionContext) marshalOAccelerator2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐAcceleratorᚄ(ctx context.Context, sel ast.SelectionSet, v []schema.Accelerator) 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.marshalNAccelerator2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐAccelerator(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOAggregate2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐAggregate(ctx context.Context, v interface{}) (*model.Aggregate, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var res = new(model.Aggregate)
|
|
err := res.UnmarshalGQL(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOAggregate2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐAggregate(ctx context.Context, sel ast.SelectionSet, v *model.Aggregate) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return v
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2bool(ctx context.Context, v interface{}) (bool, error) {
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2bool(ctx context.Context, sel ast.SelectionSet, v bool) graphql.Marshaler {
|
|
return graphql.MarshalBoolean(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOBoolean2ᚖbool(ctx context.Context, v interface{}) (*bool, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalBoolean(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast.SelectionSet, v *bool) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalBoolean(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOFloat2ᚖfloat64(ctx context.Context, v interface{}) (*float64, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalFloat(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOFloat2ᚖfloat64(ctx context.Context, sel ast.SelectionSet, v *float64) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalFloat(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOFloatRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐFloatRange(ctx context.Context, v interface{}) (*model.FloatRange, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputFloatRange(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOID2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNID2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOID2ᚕ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.marshalNID2string(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOInt2int(ctx context.Context, v interface{}) (int, error) {
|
|
res, err := graphql.UnmarshalInt(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOInt2int(ctx context.Context, sel ast.SelectionSet, v int) graphql.Marshaler {
|
|
return graphql.MarshalInt(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOInt2ᚕintᚄ(ctx context.Context, v interface{}) ([]int, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]int, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNInt2int(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOInt2ᚕintᚄ(ctx context.Context, sel ast.SelectionSet, v []int) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNInt2int(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
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
|
|
}
|
|
return graphql.MarshalInt(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOIntRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐIntRange(ctx context.Context, v interface{}) (*model.IntRange, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputIntRange(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOJob2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJob(ctx context.Context, sel ast.SelectionSet, v *model.Job) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._Job(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOJobFilter2ᚕᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilterᚄ(ctx context.Context, v interface{}) ([]*model.JobFilter, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]*model.JobFilter, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNJobFilter2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobFilter(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOJobMetricStatistics2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋschemaᚐMetricStatistics(ctx context.Context, sel ast.SelectionSet, v *schema.MetricStatistics) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._JobMetricStatistics(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOJobState2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobStateᚄ(ctx context.Context, v interface{}) ([]model.JobState, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]model.JobState, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNJobState2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobState(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOJobState2ᚕgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobStateᚄ(ctx context.Context, sel ast.SelectionSet, v []model.JobState) 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.marshalNJobState2githubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐJobState(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalOMetricFootprints2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐMetricFootprints(ctx context.Context, sel ast.SelectionSet, v *model.MetricFootprints) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec._MetricFootprints(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOOrderByInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐOrderByInput(ctx context.Context, v interface{}) (*model.OrderByInput, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputOrderByInput(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOPageRequest2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐPageRequest(ctx context.Context, v interface{}) (*model.PageRequest, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputPageRequest(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2string(ctx context.Context, v interface{}) (string, error) {
|
|
res, err := graphql.UnmarshalString(v)
|
|
return res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2string(ctx context.Context, sel ast.SelectionSet, v string) graphql.Marshaler {
|
|
return graphql.MarshalString(v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚕstringᚄ(ctx context.Context, v interface{}) ([]string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
var vSlice []interface{}
|
|
if v != nil {
|
|
if tmp1, ok := v.([]interface{}); ok {
|
|
vSlice = tmp1
|
|
} else {
|
|
vSlice = []interface{}{v}
|
|
}
|
|
}
|
|
var err error
|
|
res := make([]string, len(vSlice))
|
|
for i := range vSlice {
|
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i))
|
|
res[i], err = ec.unmarshalNString2string(ctx, vSlice[i])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
return res, nil
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚕstringᚄ(ctx context.Context, sel ast.SelectionSet, v []string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
for i := range v {
|
|
ret[i] = ec.marshalNString2string(ctx, sel, v[i])
|
|
}
|
|
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOString2ᚖstring(ctx context.Context, v interface{}) (*string, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalString(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOString2ᚖstring(ctx context.Context, sel ast.SelectionSet, v *string) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalString(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOStringInput2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐStringInput(ctx context.Context, v interface{}) (*model.StringInput, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputStringInput(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTime2ᚖtimeᚐTime(ctx context.Context, v interface{}) (*time.Time, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := graphql.UnmarshalTime(v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalOTime2ᚖtimeᚐTime(ctx context.Context, sel ast.SelectionSet, v *time.Time) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return graphql.MarshalTime(*v)
|
|
}
|
|
|
|
func (ec *executionContext) unmarshalOTimeRange2ᚖgithubᚗcomᚋClusterCockpitᚋccᚑjobarchiveᚋgraphᚋmodelᚐTimeRange(ctx context.Context, v interface{}) (*model.TimeRange, error) {
|
|
if v == nil {
|
|
return nil, nil
|
|
}
|
|
res, err := ec.unmarshalInputTimeRange(ctx, v)
|
|
return &res, graphql.ErrorOnPath(ctx, err)
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.EnumValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__EnumValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Field) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Field2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.InputValue) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__InputValue2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx context.Context, sel ast.SelectionSet, v *introspection.Schema) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Schema(ctx, sel, v)
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx context.Context, sel ast.SelectionSet, v []introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
ret := make(graphql.Array, len(v))
|
|
var wg sync.WaitGroup
|
|
isLen1 := len(v) == 1
|
|
if !isLen1 {
|
|
wg.Add(len(v))
|
|
}
|
|
for i := range v {
|
|
i := i
|
|
fc := &graphql.FieldContext{
|
|
Index: &i,
|
|
Result: &v[i],
|
|
}
|
|
ctx := graphql.WithFieldContext(ctx, fc)
|
|
f := func(i int) {
|
|
defer func() {
|
|
if r := recover(); r != nil {
|
|
ec.Error(ctx, ec.Recover(ctx, r))
|
|
ret = nil
|
|
}
|
|
}()
|
|
if !isLen1 {
|
|
defer wg.Done()
|
|
}
|
|
ret[i] = ec.marshalN__Type2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, sel, v[i])
|
|
}
|
|
if isLen1 {
|
|
f(i)
|
|
} else {
|
|
go f(i)
|
|
}
|
|
|
|
}
|
|
wg.Wait()
|
|
return ret
|
|
}
|
|
|
|
func (ec *executionContext) marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx context.Context, sel ast.SelectionSet, v *introspection.Type) graphql.Marshaler {
|
|
if v == nil {
|
|
return graphql.Null
|
|
}
|
|
return ec.___Type(ctx, sel, v)
|
|
}
|
|
|
|
// endregion ***************************** type.gotpl *****************************
|