move gqlgen
This commit is contained in:
parent
4d35c4b7e3
commit
e62df2e9fc
5 changed files with 54 additions and 59 deletions
16
Makefile
16
Makefile
|
@ -1,16 +0,0 @@
|
|||
generate-graphql: src/delivery/graphql/generated.go ui/lib/api/schema.graphql
|
||||
|
||||
src/delivery/graphql/generated.go: .gqlgen.yml cmd/generate-graphql/* $(shell find graphql -type f)
|
||||
go run cmd/generate-graphql/main.go
|
||||
|
||||
ui/lib/api/schema.graphql: src/delivery/graphql/* cmd/generate-graphql-schema/*
|
||||
go run cmd/generate-graphql-schema/main.go $@
|
||||
|
||||
bin/plugins/qittorrent-daemon.so:
|
||||
go build -o ./bin/plugins/qittorrent-daemon.so -buildmode=plugin git.kmsign.ru/royalcat/tstor/daemons/qbittorrent/plugin
|
||||
|
||||
bin/tstor:
|
||||
go build -o ./bin/tstor git.kmsign.ru/royalcat/tstor/cmd/tstor
|
||||
|
||||
run-debug: bin/tstor bin/plugins/qittorrent-daemon.so
|
||||
cd ./bin && ./tstor
|
|
@ -1,6 +1,6 @@
|
|||
schema:
|
||||
- graphql/*.graphql
|
||||
- graphql/**/*.graphql
|
||||
- ../graphql/*.graphql
|
||||
- ../graphql/**/*.graphql
|
||||
|
||||
exec:
|
||||
filename: src/delivery/graphql/generated.go
|
7
server/Makefile
Normal file
7
server/Makefile
Normal file
|
@ -0,0 +1,7 @@
|
|||
generate-graphql: src/delivery/graphql/generated.go ui/lib/api/schema.graphql
|
||||
|
||||
src/delivery/graphql/generated.go: .gqlgen.yml cmd/generate-graphql/* $(shell find ../graphql -type f)
|
||||
go run cmd/generate-graphql/main.go
|
||||
|
||||
../ui/lib/api/schema.graphql: src/delivery/graphql/* cmd/generate-graphql-schema/*
|
||||
go run cmd/generate-graphql-schema/main.go $@
|
|
@ -97,6 +97,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
|
@ -268,6 +269,7 @@ go.opentelemetry.io/contrib v1.26.0 h1:8/CmxLl5uDm37V9rdqbZcVLvYigAE2vMostBq3nGD
|
|||
go.opentelemetry.io/contrib v1.26.0/go.mod h1:Tmhw9grdWtmXy6DxZNpIAudzYJqLeEM2P6QTZQSRwU8=
|
||||
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
|
||||
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
|
||||
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0 h1:ZsXq73BERAiNuuFXYqP4MR5hBrjXfMGSO+Cx7qoOZiM=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.31.0/go.mod h1:hg1zaDMpyZJuUzjFxFsRYBoccE86tM9Uf4IqNMUxvrY=
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk=
|
||||
|
@ -278,6 +280,7 @@ go.opentelemetry.io/otel/exporters/prometheus v0.53.0 h1:QXobPHrwiGLM4ufrY3EOmDP
|
|||
go.opentelemetry.io/otel/exporters/prometheus v0.53.0/go.mod h1:WOAXGr3D00CfzmFxtTV1eR0GpoHuPEu+HJT8UWW2SIU=
|
||||
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
|
||||
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
|
||||
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
|
||||
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
|
||||
go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
|
||||
go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
|
||||
|
@ -285,6 +288,7 @@ go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4Jjx
|
|||
go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8=
|
||||
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
|
||||
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
|
||||
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
|
||||
go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
|
|
|
@ -521,7 +521,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
|
|||
}
|
||||
|
||||
var sources = []*ast.Source{
|
||||
{Name: "../../../graphql/mutation.graphql", Input: `type Mutation {
|
||||
{Name: "../../../../graphql/mutation.graphql", Input: `type Mutation {
|
||||
qbitTorrentDaemon: QBitTorrentDaemonMutation @resolver
|
||||
|
||||
uploadFile(dir: String!, file: Upload!): Boolean!
|
||||
|
@ -532,7 +532,7 @@ type Task {
|
|||
id: ID!
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/query.graphql", Input: `type Query {
|
||||
{Name: "../../../../graphql/query.graphql", Input: `type Query {
|
||||
plugins: [Plugin!]!
|
||||
fsEntry(path: String!): FsEntry
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ type Plugin {
|
|||
endpountSubPath: String
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/schema.graphql", Input: `# directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
|
||||
{Name: "../../../../graphql/schema.graphql", Input: `# directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
|
||||
directive @resolver on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
||||
|
||||
directive @stream on FIELD_DEFINITION
|
||||
|
@ -556,11 +556,11 @@ type Schema {
|
|||
mutation: Mutation
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/subscription.graphql", Input: `type Subscription {
|
||||
{Name: "../../../../graphql/subscription.graphql", Input: `type Subscription {
|
||||
taskProgress(taskID: ID!): Progress
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/sources/qbittorrent_mutation.graphql", Input: `type QBitTorrentDaemonMutation {
|
||||
{Name: "../../../../graphql/sources/qbittorrent_mutation.graphql", Input: `type QBitTorrentDaemonMutation {
|
||||
cleanup(run: Boolean!): QBitCleanupResponse! @resolver
|
||||
cleanupUnregistred(run: Boolean!): QBitCleanupUnregistredResponse! @resolver
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ type QBitCleanupUnregistredResponse {
|
|||
hashes: [String!]!
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/sources/qbittorrent_query.graphql", Input: `type QBitTorrentDaemonQuery {
|
||||
{Name: "../../../../graphql/sources/qbittorrent_query.graphql", Input: `type QBitTorrentDaemonQuery {
|
||||
torrents(filter: QBitTorrentDaemonFilter): [QTorrent!]! @resolver
|
||||
}
|
||||
|
||||
|
@ -583,13 +583,13 @@ input QBitTorrentDaemonFilter {
|
|||
sourcesCount: IntFilter
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/sources/qbittorrent_types.graphql", Input: `type QTorrent {
|
||||
{Name: "../../../../graphql/sources/qbittorrent_types.graphql", Input: `type QTorrent {
|
||||
name: String!
|
||||
hash: String!
|
||||
sourceFiles: [String!]! @resolver
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/types/filters.graphql", Input: `input Pagination {
|
||||
{Name: "../../../../graphql/types/filters.graphql", Input: `input Pagination {
|
||||
offset: Int!
|
||||
limit: Int!
|
||||
}
|
||||
|
@ -621,7 +621,7 @@ input BooleanFilter @oneOf {
|
|||
eq: Boolean
|
||||
}
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/types/fs.graphql", Input: `interface FsEntry {
|
||||
{Name: "../../../../graphql/types/fs.graphql", Input: `interface FsEntry {
|
||||
name: String!
|
||||
}
|
||||
|
||||
|
@ -657,7 +657,7 @@ type ResolverFS implements Dir & FsEntry {
|
|||
# size: Int!
|
||||
# }
|
||||
`, BuiltIn: false},
|
||||
{Name: "../../../graphql/types/progress.graphql", Input: `interface Progress {
|
||||
{Name: "../../../../graphql/types/progress.graphql", Input: `interface Progress {
|
||||
current: Int!
|
||||
total: Int!
|
||||
}
|
||||
|
@ -797,7 +797,7 @@ func (ec *executionContext) field_QBitTorrentDaemonQuery_torrents_argsFilter(
|
|||
|
||||
ctx = graphql.WithPathContext(ctx, graphql.NewPathWithField("filter"))
|
||||
if tmp, ok := rawArgs["filter"]; ok {
|
||||
return ec.unmarshalOQBitTorrentDaemonFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonFilter(ctx, tmp)
|
||||
return ec.unmarshalOQBitTorrentDaemonFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonFilter(ctx, tmp)
|
||||
}
|
||||
|
||||
var zeroVal *model.QBitTorrentDaemonFilter
|
||||
|
@ -1055,7 +1055,7 @@ func (ec *executionContext) _Mutation_qbitTorrentDaemon(ctx context.Context, fie
|
|||
}
|
||||
res := resTmp.(*model.QBitTorrentDaemonMutation)
|
||||
fc.Result = res
|
||||
return ec.marshalOQBitTorrentDaemonMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonMutation(ctx, field.Selections, res)
|
||||
return ec.marshalOQBitTorrentDaemonMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonMutation(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Mutation_qbitTorrentDaemon(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -1487,7 +1487,7 @@ func (ec *executionContext) _QBitTorrentDaemonMutation_cleanup(ctx context.Conte
|
|||
}
|
||||
res := resTmp.(*model.QBitCleanupResponse)
|
||||
fc.Result = res
|
||||
return ec.marshalNQBitCleanupResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupResponse(ctx, field.Selections, res)
|
||||
return ec.marshalNQBitCleanupResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupResponse(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_QBitTorrentDaemonMutation_cleanup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -1570,7 +1570,7 @@ func (ec *executionContext) _QBitTorrentDaemonMutation_cleanupUnregistred(ctx co
|
|||
}
|
||||
res := resTmp.(*model.QBitCleanupUnregistredResponse)
|
||||
fc.Result = res
|
||||
return ec.marshalNQBitCleanupUnregistredResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupUnregistredResponse(ctx, field.Selections, res)
|
||||
return ec.marshalNQBitCleanupUnregistredResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupUnregistredResponse(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_QBitTorrentDaemonMutation_cleanupUnregistred(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -1653,7 +1653,7 @@ func (ec *executionContext) _QBitTorrentDaemonQuery_torrents(ctx context.Context
|
|||
}
|
||||
res := resTmp.([]*model.QTorrent)
|
||||
fc.Result = res
|
||||
return ec.marshalNQTorrent2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrentᚄ(ctx, field.Selections, res)
|
||||
return ec.marshalNQTorrent2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrentᚄ(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_QBitTorrentDaemonQuery_torrents(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -1870,7 +1870,7 @@ func (ec *executionContext) _Query_plugins(ctx context.Context, field graphql.Co
|
|||
}
|
||||
res := resTmp.([]*model.Plugin)
|
||||
fc.Result = res
|
||||
return ec.marshalNPlugin2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPluginᚄ(ctx, field.Selections, res)
|
||||
return ec.marshalNPlugin2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPluginᚄ(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Query_plugins(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -1917,7 +1917,7 @@ func (ec *executionContext) _Query_fsEntry(ctx context.Context, field graphql.Co
|
|||
}
|
||||
res := resTmp.(model.FsEntry)
|
||||
fc.Result = res
|
||||
return ec.marshalOFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx, field.Selections, res)
|
||||
return ec.marshalOFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Query_fsEntry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -2169,7 +2169,7 @@ func (ec *executionContext) _ResolverFS_entries(ctx context.Context, field graph
|
|||
}
|
||||
res := resTmp.([]model.FsEntry)
|
||||
fc.Result = res
|
||||
return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
|
||||
return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_ResolverFS_entries(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -2199,7 +2199,7 @@ func (ec *executionContext) _Schema_query(ctx context.Context, field graphql.Col
|
|||
}()
|
||||
res := &model.Query{}
|
||||
fc.Result = res
|
||||
return ec.marshalOQuery2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQuery(ctx, field.Selections, res)
|
||||
return ec.marshalOQuery2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQuery(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Schema_query(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -2239,7 +2239,7 @@ func (ec *executionContext) _Schema_mutation(ctx context.Context, field graphql.
|
|||
}()
|
||||
res := &model.Mutation{}
|
||||
fc.Result = res
|
||||
return ec.marshalOMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐMutation(ctx, field.Selections, res)
|
||||
return ec.marshalOMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐMutation(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Schema_mutation(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -2357,7 +2357,7 @@ func (ec *executionContext) _SimpleDir_entries(ctx context.Context, field graphq
|
|||
}
|
||||
res := resTmp.([]model.FsEntry)
|
||||
fc.Result = res
|
||||
return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
|
||||
return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_SimpleDir_entries(_ context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
|
@ -2494,7 +2494,7 @@ func (ec *executionContext) _Subscription_taskProgress(ctx context.Context, fiel
|
|||
w.Write([]byte{'{'})
|
||||
graphql.MarshalString(field.Alias).MarshalGQL(w)
|
||||
w.Write([]byte{':'})
|
||||
ec.marshalOProgress2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐProgress(ctx, field.Selections, res).MarshalGQL(w)
|
||||
ec.marshalOProgress2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐProgress(ctx, field.Selections, res).MarshalGQL(w)
|
||||
w.Write([]byte{'}'})
|
||||
})
|
||||
case <-ctx.Done():
|
||||
|
@ -4716,7 +4716,7 @@ func (ec *executionContext) unmarshalInputQBitTorrentDaemonFilter(ctx context.Co
|
|||
switch k {
|
||||
case "sourcesCount":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sourcesCount"))
|
||||
data, err := ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
|
||||
data, err := ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
|
@ -6041,7 +6041,7 @@ func (ec *executionContext) marshalNBoolean2bool(ctx context.Context, sel ast.Se
|
|||
return res
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx context.Context, sel ast.SelectionSet, v model.FsEntry) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx context.Context, sel ast.SelectionSet, v model.FsEntry) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
|
@ -6051,7 +6051,7 @@ func (ec *executionContext) marshalNFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstor
|
|||
return ec._FsEntry(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []model.FsEntry) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []model.FsEntry) graphql.Marshaler {
|
||||
ret := make(graphql.Array, len(v))
|
||||
var wg sync.WaitGroup
|
||||
isLen1 := len(v) == 1
|
||||
|
@ -6075,7 +6075,7 @@ func (ec *executionContext) marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋts
|
|||
if !isLen1 {
|
||||
defer wg.Done()
|
||||
}
|
||||
ret[i] = ec.marshalNFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx, sel, v[i])
|
||||
ret[i] = ec.marshalNFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx, sel, v[i])
|
||||
}
|
||||
if isLen1 {
|
||||
f(i)
|
||||
|
@ -6125,7 +6125,7 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec
|
|||
return res
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNPlugin2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPluginᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Plugin) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNPlugin2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPluginᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.Plugin) graphql.Marshaler {
|
||||
ret := make(graphql.Array, len(v))
|
||||
var wg sync.WaitGroup
|
||||
isLen1 := len(v) == 1
|
||||
|
@ -6149,7 +6149,7 @@ func (ec *executionContext) marshalNPlugin2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋ
|
|||
if !isLen1 {
|
||||
defer wg.Done()
|
||||
}
|
||||
ret[i] = ec.marshalNPlugin2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPlugin(ctx, sel, v[i])
|
||||
ret[i] = ec.marshalNPlugin2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPlugin(ctx, sel, v[i])
|
||||
}
|
||||
if isLen1 {
|
||||
f(i)
|
||||
|
@ -6169,7 +6169,7 @@ func (ec *executionContext) marshalNPlugin2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋ
|
|||
return ret
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNPlugin2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPlugin(ctx context.Context, sel ast.SelectionSet, v *model.Plugin) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNPlugin2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐPlugin(ctx context.Context, sel ast.SelectionSet, v *model.Plugin) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
|
@ -6179,7 +6179,7 @@ func (ec *executionContext) marshalNPlugin2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtst
|
|||
return ec._Plugin(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNQBitCleanupResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupResponse(ctx context.Context, sel ast.SelectionSet, v *model.QBitCleanupResponse) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNQBitCleanupResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupResponse(ctx context.Context, sel ast.SelectionSet, v *model.QBitCleanupResponse) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
|
@ -6189,7 +6189,7 @@ func (ec *executionContext) marshalNQBitCleanupResponse2ᚖgitᚗkmsignᚗruᚋr
|
|||
return ec._QBitCleanupResponse(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNQBitCleanupUnregistredResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupUnregistredResponse(ctx context.Context, sel ast.SelectionSet, v *model.QBitCleanupUnregistredResponse) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNQBitCleanupUnregistredResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitCleanupUnregistredResponse(ctx context.Context, sel ast.SelectionSet, v *model.QBitCleanupUnregistredResponse) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
|
@ -6199,7 +6199,7 @@ func (ec *executionContext) marshalNQBitCleanupUnregistredResponse2ᚖgitᚗkmsi
|
|||
return ec._QBitCleanupUnregistredResponse(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNQTorrent2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrentᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.QTorrent) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNQTorrent2ᚕᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrentᚄ(ctx context.Context, sel ast.SelectionSet, v []*model.QTorrent) graphql.Marshaler {
|
||||
ret := make(graphql.Array, len(v))
|
||||
var wg sync.WaitGroup
|
||||
isLen1 := len(v) == 1
|
||||
|
@ -6223,7 +6223,7 @@ func (ec *executionContext) marshalNQTorrent2ᚕᚖgitᚗkmsignᚗruᚋroyalcat
|
|||
if !isLen1 {
|
||||
defer wg.Done()
|
||||
}
|
||||
ret[i] = ec.marshalNQTorrent2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrent(ctx, sel, v[i])
|
||||
ret[i] = ec.marshalNQTorrent2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrent(ctx, sel, v[i])
|
||||
}
|
||||
if isLen1 {
|
||||
f(i)
|
||||
|
@ -6243,7 +6243,7 @@ func (ec *executionContext) marshalNQTorrent2ᚕᚖgitᚗkmsignᚗruᚋroyalcat
|
|||
return ret
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNQTorrent2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrent(ctx context.Context, sel ast.SelectionSet, v *model.QTorrent) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalNQTorrent2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQTorrent(ctx context.Context, sel ast.SelectionSet, v *model.QTorrent) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
|
@ -6606,7 +6606,7 @@ func (ec *executionContext) marshalODateTime2ᚖtimeᚐTime(ctx context.Context,
|
|||
return res
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx context.Context, sel ast.SelectionSet, v model.FsEntry) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalOFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx context.Context, sel ast.SelectionSet, v model.FsEntry) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
|
@ -6665,7 +6665,7 @@ func (ec *executionContext) marshalOInt2ᚖint64(ctx context.Context, sel ast.Se
|
|||
return res
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx context.Context, v any) (*model.IntFilter, error) {
|
||||
func (ec *executionContext) unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx context.Context, v any) (*model.IntFilter, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -6673,21 +6673,21 @@ func (ec *executionContext) unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcat
|
|||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐMutation(ctx context.Context, sel ast.SelectionSet, v *model.Mutation) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalOMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐMutation(ctx context.Context, sel ast.SelectionSet, v *model.Mutation) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._Mutation(ctx, sel)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOProgress2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐProgress(ctx context.Context, sel ast.SelectionSet, v model.Progress) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalOProgress2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐProgress(ctx context.Context, sel ast.SelectionSet, v model.Progress) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._Progress(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) unmarshalOQBitTorrentDaemonFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonFilter(ctx context.Context, v any) (*model.QBitTorrentDaemonFilter, error) {
|
||||
func (ec *executionContext) unmarshalOQBitTorrentDaemonFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonFilter(ctx context.Context, v any) (*model.QBitTorrentDaemonFilter, error) {
|
||||
if v == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
@ -6695,14 +6695,14 @@ func (ec *executionContext) unmarshalOQBitTorrentDaemonFilter2ᚖgitᚗkmsignᚗ
|
|||
return &res, graphql.ErrorOnPath(ctx, err)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOQBitTorrentDaemonMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonMutation(ctx context.Context, sel ast.SelectionSet, v *model.QBitTorrentDaemonMutation) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalOQBitTorrentDaemonMutation2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQBitTorrentDaemonMutation(ctx context.Context, sel ast.SelectionSet, v *model.QBitTorrentDaemonMutation) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._QBitTorrentDaemonMutation(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOQuery2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQuery(ctx context.Context, sel ast.SelectionSet, v *model.Query) graphql.Marshaler {
|
||||
func (ec *executionContext) marshalOQuery2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋserverᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐQuery(ctx context.Context, sel ast.SelectionSet, v *model.Query) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue