diff --git a/.gqlgen.yml b/.gqlgen.yml
index 7363cf7..eae3b9c 100644
--- a/.gqlgen.yml
+++ b/.gqlgen.yml
@@ -42,7 +42,33 @@ models:
extraFields:
F:
type: "*github.com/anacrolix/torrent.PeerConn"
- # TorrentProgress:
- # fields:
- # torrent:
- # resolver: true
+ SimpleDir:
+ fields:
+ entries:
+ resolver: true
+ extraFields:
+ Path:
+ type: string
+ FS:
+ type: "git.kmsign.ru/royalcat/tstor/src/host/vfs.Filesystem"
+ TorrentFS:
+ fields:
+ entries:
+ resolver: true
+ extraFields:
+ FS:
+ type: "*git.kmsign.ru/royalcat/tstor/src/host/vfs.TorrentFS"
+ ResolverFS:
+ fields:
+ entries:
+ resolver: true
+ extraFields:
+ FS:
+ type: "*git.kmsign.ru/royalcat/tstor/src/host/vfs.ResolverFS"
+ ArchiveFS:
+ fields:
+ entries:
+ resolver: true
+ extraFields:
+ FS:
+ type: "*git.kmsign.ru/royalcat/tstor/src/host/vfs.ArchiveFS"
diff --git a/Makefile b/Makefile
index 028fa69..a171a40 100644
--- a/Makefile
+++ b/Makefile
@@ -1,40 +1,7 @@
-#-include .env
+generate-graphql: src/delivery/graphql/generated.go ui/lib/api/schema.graphql
-VERSION := $(shell git describe --tags)
-BUILD := $(shell git rev-parse --short HEAD)
-BIN_OUTPUT ?= bin/tstor-$(VERSION)-`go env GOOS`-`go env GOARCH``go env GOEXE`
-PROJECTNAME := $(shell basename "$(PWD)")
-
-# Use linker flags to provide version/build settings
-LDFLAGS=-X=main.Version=$(VERSION) -X=main.Build=$(BUILD) -linkmode external
-
-# Make is verbose in Linux. Make it silent.
-MAKEFLAGS += --silent
-
-## run: run from code.
-run:
- go run cmd/tstor/main.go examples/conf_example.yaml
-
-## build: build binary.
-build: go-generate go-build
-
-## test-race: execute all tests with race enabled.
-test-race:
- go test -v --race -coverprofile=coverage.out ./...
-
-## test: execute all tests
-test:
- go test -v -coverprofile=coverage.out ./...
-
-go-build:
- @echo " > Building binary on $(BIN_OUTPUT)..."
- go build -o $(BIN_OUTPUT) -tags "release" -ldflags='$(LDFLAGS)' cmd/tstor/main.go
-
-go-generate:
- @echo " > Generating code files..."
- go generate ./...
-
-generate-graphql: src/delivery/graph/generated.go
-
-src/delivery/graph/generated.go: .gqlgen.yml graphql/* graphql/types/* cmd/generate-graphql/*
+src/delivery/graphql/generated.go: .gqlgen.yml graphql/* graphql/types/* cmd/generate-graphql/*
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 $@
\ No newline at end of file
diff --git a/cmd/generate-graphql-schema/main.go b/cmd/generate-graphql-schema/main.go
new file mode 100644
index 0000000..5abdf1c
--- /dev/null
+++ b/cmd/generate-graphql-schema/main.go
@@ -0,0 +1,27 @@
+package main
+
+import (
+ "fmt"
+ "log"
+ "os"
+
+ graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
+ "github.com/vektah/gqlparser/v2/formatter"
+)
+
+func main() {
+ outFile := "schema.graphql"
+
+ if len(os.Args) > 1 {
+ outFile = os.Args[1]
+ }
+
+ file, err := os.OpenFile(outFile, os.O_CREATE|os.O_RDWR|os.O_TRUNC, os.ModePerm)
+ if err != nil {
+ log.Panic(fmt.Errorf("Failed to open %s: %w", outFile, err))
+ }
+ defer file.Close()
+
+ fmt := formatter.NewFormatter(file)
+ fmt.FormatSchema(graph.NewExecutableSchema(graph.Config{}).Schema())
+}
diff --git a/cmd/tstor/main.go b/cmd/tstor/main.go
index d039567..6c80826 100644
--- a/cmd/tstor/main.go
+++ b/cmd/tstor/main.go
@@ -70,18 +70,15 @@ func run(configPath string) error {
}
// dlog.Load(&conf.Log)
- if conf.OtelHttp != "" {
- ctx := context.Background()
- client, err := telemetry.Setup(ctx, conf.OtelHttp)
- if err != nil {
- return err
- }
-
- defer client.Shutdown(ctx)
+ ctx := context.Background()
+ client, err := telemetry.Setup(ctx, conf.OtelHttp)
+ if err != nil {
+ return err
}
+ defer client.Shutdown(ctx)
+
log := rlog.Component("run")
- ctx := context.Background()
// TODO make optional
err = syscall.Setpriority(syscall.PRIO_PGRP, 0, 19)
diff --git a/go.mod b/go.mod
index 7d9e013..8fcdb08 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module git.kmsign.ru/royalcat/tstor
go 1.22.1
require (
- github.com/99designs/gqlgen v0.17.43
+ github.com/99designs/gqlgen v0.17.45
github.com/agoda-com/opentelemetry-go/otelslog v0.1.1
github.com/agoda-com/opentelemetry-logs-go v0.3.0
github.com/anacrolix/dht/v2 v2.21.1
@@ -15,7 +15,6 @@ require (
github.com/dgraph-io/badger/v4 v4.2.0
github.com/dgraph-io/ristretto v0.1.1
github.com/dustin/go-humanize v1.0.0
- github.com/gin-contrib/pprof v1.4.0
github.com/gin-gonic/gin v1.9.1
github.com/go-git/go-billy/v5 v5.5.0
github.com/gofrs/uuid/v5 v5.0.0
@@ -29,6 +28,8 @@ require (
github.com/knadh/koanf/providers/file v0.1.0
github.com/knadh/koanf/providers/structs v0.1.0
github.com/knadh/koanf/v2 v2.0.1
+ github.com/labstack/echo-contrib v0.17.1
+ github.com/labstack/echo/v4 v4.12.0
github.com/nwaples/rardecode/v2 v2.0.0-beta.2
github.com/rasky/go-xdr v0.0.0-20170124162913-1a41d1a06c93
github.com/ravilushqa/otelgqlgen v0.15.0
@@ -36,9 +37,8 @@ require (
github.com/rs/zerolog v1.32.0
github.com/samber/slog-multi v1.0.2
github.com/samber/slog-zerolog v1.0.0
- github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c
github.com/stretchr/testify v1.9.0
- github.com/urfave/cli/v2 v2.27.0
+ github.com/urfave/cli/v2 v2.27.1
github.com/vektah/gqlparser/v2 v2.5.11
github.com/willscott/go-nfs-client v0.0.0-20240104095149-b44639837b00
github.com/willscott/memphis v0.0.0-20210922141505-529d4987ab7e
@@ -50,8 +50,8 @@ require (
go.opentelemetry.io/otel/trace v1.25.0
go.uber.org/multierr v1.11.0
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b
- golang.org/x/net v0.23.0
- golang.org/x/sys v0.18.0
+ golang.org/x/net v0.24.0
+ golang.org/x/sys v0.19.0
)
require (
@@ -81,7 +81,7 @@ require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
- github.com/cespare/xxhash/v2 v2.2.0 // indirect
+ github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
@@ -100,6 +100,7 @@ require (
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
+ github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.4 // indirect
@@ -115,6 +116,7 @@ require (
github.com/klauspost/compress v1.17.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/knadh/koanf/maps v0.1.1 // indirect
+ github.com/labstack/gommon v0.4.2 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
@@ -159,6 +161,8 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
+ github.com/valyala/bytebufferpool v1.0.0 // indirect
+ github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/warpfork/go-errcat v0.0.0-20180917083543-335044ffc86e // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
@@ -169,15 +173,15 @@ require (
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
go4.org v0.0.0-20200411211856-f5505b9728dd // indirect
golang.org/x/arch v0.3.0 // indirect
- golang.org/x/crypto v0.21.0 // indirect
- golang.org/x/mod v0.14.0 // indirect
+ golang.org/x/crypto v0.22.0 // indirect
+ golang.org/x/mod v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
- golang.org/x/tools v0.16.0 // indirect
+ golang.org/x/tools v0.19.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
- google.golang.org/grpc v1.63.0 // indirect
+ google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.22.3 // indirect
diff --git a/go.sum b/go.sum
index 8356481..ea15142 100644
--- a/go.sum
+++ b/go.sum
@@ -19,8 +19,8 @@ crawshaw.io/sqlite v0.3.2/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
-github.com/99designs/gqlgen v0.17.43 h1:I4SYg6ahjowErAQcHFVKy5EcWuwJ3+Xw9z2fLpuFCPo=
-github.com/99designs/gqlgen v0.17.43/go.mod h1:lO0Zjy8MkZgBdv4T1U91x09r0e0WFOdhVUutlQs1Rsc=
+github.com/99designs/gqlgen v0.17.45 h1:bH0AH67vIJo8JKNKPJP+pOPpQhZeuVRQLf53dKIpDik=
+github.com/99designs/gqlgen v0.17.45/go.mod h1:Bas0XQ+Jiu/Xm5E33jC8sES3G+iC2esHBMXcq0fUPs0=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
@@ -144,8 +144,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
-github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
+github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams=
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
@@ -195,11 +195,8 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
-github.com/gin-contrib/pprof v1.4.0 h1:XxiBSf5jWZ5i16lNOPbMTVdgHBdhfGRD5PZ1LWazzvg=
-github.com/gin-contrib/pprof v1.4.0/go.mod h1:RrehPJasUVBPK6yTUwOl8/NP6i0vbUgmxtis+Z5KE90=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
-github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
@@ -227,21 +224,16 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
-github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
-github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
-github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
-github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
-github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
@@ -251,6 +243,8 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
+github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68=
github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
@@ -379,7 +373,6 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
-github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
@@ -387,12 +380,16 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
+github.com/labstack/echo-contrib v0.17.1 h1:7I/he7ylVKsDUieaGRZ9XxxTYOjfQwVzHzUYrNykfCU=
+github.com/labstack/echo-contrib v0.17.1/go.mod h1:SnsCZtwHBAZm5uBSAtQtXQHI3wqEA73hvTn0bYMKnZA=
+github.com/labstack/echo/v4 v4.12.0 h1:IKpw49IMryVB2p1a4dzwlhP1O2Tf2E0Ir/450lH+kI0=
+github.com/labstack/echo/v4 v4.12.0/go.mod h1:UP9Cr2DJXbOK3Kr9ONYzNowSh7HP0aG0ShAyycHSJvM=
+github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
+github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
-github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
@@ -432,7 +429,6 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M=
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
-github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
@@ -549,8 +545,6 @@ github.com/samber/slog-zerolog v1.0.0/go.mod h1:N2/g/mNGRY1zqsydIYE0uKipSSFsPDjy
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
-github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs=
-github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
@@ -592,14 +586,16 @@ github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
-github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M=
-github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY=
github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=
github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8=
github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
-github.com/urfave/cli/v2 v2.27.0 h1:uNs1K8JwTFL84X68j5Fjny6hfANh9nTlJ6dRtZAFAHY=
-github.com/urfave/cli/v2 v2.27.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
+github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
+github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
+github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
+github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
+github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
+github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8=
github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc=
github.com/warpfork/go-errcat v0.0.0-20180917083543-335044ffc86e h1:FIB2fi7XJGHIdf5rWNsfFQqatIKxutT45G+wNuMQNgs=
@@ -666,14 +662,13 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220516162934-403b01795ae8/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
-golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
-golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
+golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
+golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -703,8 +698,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
-golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic=
+golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -741,8 +736,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
-golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
+golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
+golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -790,8 +785,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -807,8 +800,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
-golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
+golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -860,8 +853,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
-golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
+golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
+golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -910,8 +903,8 @@ google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
-google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8=
-google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
+google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
+google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -923,7 +916,6 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
@@ -944,7 +936,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/graphql/query.graphql b/graphql/query.graphql
index 8161a9f..c01db35 100644
--- a/graphql/query.graphql
+++ b/graphql/query.graphql
@@ -1,9 +1,10 @@
type Query {
torrents(filter: TorrentsFilter, pagination: Pagination): [Torrent!]!
- fsListDir(path: String!): ListDirResponse!
+ fsEntry(path: String!): FsEntry
}
input TorrentsFilter {
+ infohash: StringFilter
name: StringFilter
bytesCompleted: IntFilter
bytesMissing: IntFilter
@@ -11,11 +12,6 @@ input TorrentsFilter {
peersCount: IntFilter
}
-type ListDirResponse {
- root: DirEntry!
- entries: [DirEntry!]!
-}
-
input Pagination {
offset: Int!
limit: Int!
diff --git a/graphql/types/fs.graphql b/graphql/types/fs.graphql
index 73ca119..4174f04 100644
--- a/graphql/types/fs.graphql
+++ b/graphql/types/fs.graphql
@@ -1,26 +1,47 @@
-interface DirEntry {
+interface FsEntry {
name: String!
}
-type Dir implements DirEntry {
+interface Dir implements FsEntry {
name: String!
+ entries: [FsEntry!]!
}
-type File implements DirEntry {
+interface File implements FsEntry {
name: String!
size: Int!
}
-type ResolverFS implements DirEntry {
+type SimpleDir implements Dir & FsEntry {
name: String!
+ entries: [FsEntry!]!
}
-type TorrentFS implements DirEntry {
+type SimpleFile implements File & FsEntry {
+ name: String!
+ size: Int!
+}
+
+type ResolverFS implements Dir & FsEntry {
+ name: String!
+ entries: [FsEntry!]!
+}
+
+type ArchiveFS implements Dir & FsEntry {
+ name: String!
+ entries: [FsEntry!]!
+
+ size: Int!
+}
+
+type TorrentFS implements Dir & FsEntry {
name: String!
torrent: Torrent!
+ entries: [FsEntry!]!
}
-type ArchiveFS implements DirEntry {
+type TorrentFileEntry implements File & FsEntry {
name: String!
+ torrent: Torrent!
size: Int!
}
diff --git a/src/delivery/graphql/generated.go b/src/delivery/graphql/generated.go
index 3253c0c..63e1b56 100644
--- a/src/delivery/graphql/generated.go
+++ b/src/delivery/graphql/generated.go
@@ -40,10 +40,14 @@ type Config struct {
}
type ResolverRoot interface {
+ ArchiveFS() ArchiveFSResolver
Mutation() MutationResolver
Query() QueryResolver
+ ResolverFS() ResolverFSResolver
+ SimpleDir() SimpleDirResolver
Subscription() SubscriptionResolver
Torrent() TorrentResolver
+ TorrentFS() TorrentFSResolver
}
type DirectiveRoot struct {
@@ -53,8 +57,9 @@ type DirectiveRoot struct {
type ComplexityRoot struct {
ArchiveFS struct {
- Name func(childComplexity int) int
- Size func(childComplexity int) int
+ Entries func(childComplexity int) int
+ Name func(childComplexity int) int
+ Size func(childComplexity int) int
}
CleanupResponse struct {
@@ -62,24 +67,10 @@ type ComplexityRoot struct {
List func(childComplexity int) int
}
- Dir struct {
- Name func(childComplexity int) int
- }
-
DownloadTorrentResponse struct {
Task func(childComplexity int) int
}
- File struct {
- Name func(childComplexity int) int
- Size func(childComplexity int) int
- }
-
- ListDirResponse struct {
- Entries func(childComplexity int) int
- Root func(childComplexity int) int
- }
-
Mutation struct {
CleanupTorrents func(childComplexity int, files *bool, dryRun bool) int
DedupeStorage func(childComplexity int) int
@@ -88,12 +79,13 @@ type ComplexityRoot struct {
}
Query struct {
- FsListDir func(childComplexity int, path string) int
- Torrents func(childComplexity int, filter *model.TorrentsFilter, pagination *model.Pagination) int
+ FsEntry func(childComplexity int, path string) int
+ Torrents func(childComplexity int, filter *model.TorrentsFilter, pagination *model.Pagination) int
}
ResolverFS struct {
- Name func(childComplexity int) int
+ Entries func(childComplexity int) int
+ Name func(childComplexity int) int
}
Schema struct {
@@ -101,6 +93,16 @@ type ComplexityRoot struct {
Query func(childComplexity int) int
}
+ SimpleDir struct {
+ Entries func(childComplexity int) int
+ Name func(childComplexity int) int
+ }
+
+ SimpleFile struct {
+ Name func(childComplexity int) int
+ Size func(childComplexity int) int
+ }
+
Subscription struct {
TaskProgress func(childComplexity int, taskID string) int
TorrentDownloadUpdates func(childComplexity int) int
@@ -122,6 +124,7 @@ type ComplexityRoot struct {
}
TorrentFS struct {
+ Entries func(childComplexity int) int
Name func(childComplexity int) int
Torrent func(childComplexity int) int
}
@@ -132,6 +135,12 @@ type ComplexityRoot struct {
Size func(childComplexity int) int
}
+ TorrentFileEntry struct {
+ Name func(childComplexity int) int
+ Size func(childComplexity int) int
+ Torrent func(childComplexity int) int
+ }
+
TorrentPeer struct {
ClientName func(childComplexity int) int
Discovery func(childComplexity int) int
@@ -147,6 +156,9 @@ type ComplexityRoot struct {
}
}
+type ArchiveFSResolver interface {
+ Entries(ctx context.Context, obj *model.ArchiveFs) ([]model.FsEntry, error)
+}
type MutationResolver interface {
ValidateTorrents(ctx context.Context, filter model.TorrentFilter) (bool, error)
CleanupTorrents(ctx context.Context, files *bool, dryRun bool) (*model.CleanupResponse, error)
@@ -155,7 +167,13 @@ type MutationResolver interface {
}
type QueryResolver interface {
Torrents(ctx context.Context, filter *model.TorrentsFilter, pagination *model.Pagination) ([]*model.Torrent, error)
- FsListDir(ctx context.Context, path string) (*model.ListDirResponse, error)
+ FsEntry(ctx context.Context, path string) (model.FsEntry, error)
+}
+type ResolverFSResolver interface {
+ Entries(ctx context.Context, obj *model.ResolverFs) ([]model.FsEntry, error)
+}
+type SimpleDirResolver interface {
+ Entries(ctx context.Context, obj *model.SimpleDir) ([]model.FsEntry, error)
}
type SubscriptionResolver interface {
TaskProgress(ctx context.Context, taskID string) (<-chan model.Progress, error)
@@ -168,6 +186,9 @@ type TorrentResolver interface {
ExcludedFiles(ctx context.Context, obj *model.Torrent) ([]*model.TorrentFile, error)
Peers(ctx context.Context, obj *model.Torrent) ([]*model.TorrentPeer, error)
}
+type TorrentFSResolver interface {
+ Entries(ctx context.Context, obj *model.TorrentFs) ([]model.FsEntry, error)
+}
type executableSchema struct {
schema *ast.Schema
@@ -188,6 +209,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
_ = ec
switch typeName + "." + field {
+ case "ArchiveFS.entries":
+ if e.complexity.ArchiveFS.Entries == nil {
+ break
+ }
+
+ return e.complexity.ArchiveFS.Entries(childComplexity), true
+
case "ArchiveFS.name":
if e.complexity.ArchiveFS.Name == nil {
break
@@ -216,13 +244,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.CleanupResponse.List(childComplexity), true
- case "Dir.name":
- if e.complexity.Dir.Name == nil {
- break
- }
-
- return e.complexity.Dir.Name(childComplexity), true
-
case "DownloadTorrentResponse.task":
if e.complexity.DownloadTorrentResponse.Task == nil {
break
@@ -230,34 +251,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.DownloadTorrentResponse.Task(childComplexity), true
- case "File.name":
- if e.complexity.File.Name == nil {
- break
- }
-
- return e.complexity.File.Name(childComplexity), true
-
- case "File.size":
- if e.complexity.File.Size == nil {
- break
- }
-
- return e.complexity.File.Size(childComplexity), true
-
- case "ListDirResponse.entries":
- if e.complexity.ListDirResponse.Entries == nil {
- break
- }
-
- return e.complexity.ListDirResponse.Entries(childComplexity), true
-
- case "ListDirResponse.root":
- if e.complexity.ListDirResponse.Root == nil {
- break
- }
-
- return e.complexity.ListDirResponse.Root(childComplexity), true
-
case "Mutation.cleanupTorrents":
if e.complexity.Mutation.CleanupTorrents == nil {
break
@@ -301,17 +294,17 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Mutation.ValidateTorrents(childComplexity, args["filter"].(model.TorrentFilter)), true
- case "Query.fsListDir":
- if e.complexity.Query.FsListDir == nil {
+ case "Query.fsEntry":
+ if e.complexity.Query.FsEntry == nil {
break
}
- args, err := ec.field_Query_fsListDir_args(context.TODO(), rawArgs)
+ args, err := ec.field_Query_fsEntry_args(context.TODO(), rawArgs)
if err != nil {
return 0, false
}
- return e.complexity.Query.FsListDir(childComplexity, args["path"].(string)), true
+ return e.complexity.Query.FsEntry(childComplexity, args["path"].(string)), true
case "Query.torrents":
if e.complexity.Query.Torrents == nil {
@@ -325,6 +318,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Query.Torrents(childComplexity, args["filter"].(*model.TorrentsFilter), args["pagination"].(*model.Pagination)), true
+ case "ResolverFS.entries":
+ if e.complexity.ResolverFS.Entries == nil {
+ break
+ }
+
+ return e.complexity.ResolverFS.Entries(childComplexity), true
+
case "ResolverFS.name":
if e.complexity.ResolverFS.Name == nil {
break
@@ -346,6 +346,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Schema.Query(childComplexity), true
+ case "SimpleDir.entries":
+ if e.complexity.SimpleDir.Entries == nil {
+ break
+ }
+
+ return e.complexity.SimpleDir.Entries(childComplexity), true
+
+ case "SimpleDir.name":
+ if e.complexity.SimpleDir.Name == nil {
+ break
+ }
+
+ return e.complexity.SimpleDir.Name(childComplexity), true
+
+ case "SimpleFile.name":
+ if e.complexity.SimpleFile.Name == nil {
+ break
+ }
+
+ return e.complexity.SimpleFile.Name(childComplexity), true
+
+ case "SimpleFile.size":
+ if e.complexity.SimpleFile.Size == nil {
+ break
+ }
+
+ return e.complexity.SimpleFile.Size(childComplexity), true
+
case "Subscription.taskProgress":
if e.complexity.Subscription.TaskProgress == nil {
break
@@ -428,6 +456,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Torrent.TorrentFilePath(childComplexity), true
+ case "TorrentFS.entries":
+ if e.complexity.TorrentFS.Entries == nil {
+ break
+ }
+
+ return e.complexity.TorrentFS.Entries(childComplexity), true
+
case "TorrentFS.name":
if e.complexity.TorrentFS.Name == nil {
break
@@ -463,6 +498,27 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.TorrentFile.Size(childComplexity), true
+ case "TorrentFileEntry.name":
+ if e.complexity.TorrentFileEntry.Name == nil {
+ break
+ }
+
+ return e.complexity.TorrentFileEntry.Name(childComplexity), true
+
+ case "TorrentFileEntry.size":
+ if e.complexity.TorrentFileEntry.Size == nil {
+ break
+ }
+
+ return e.complexity.TorrentFileEntry.Size(childComplexity), true
+
+ case "TorrentFileEntry.torrent":
+ if e.complexity.TorrentFileEntry.Torrent == nil {
+ break
+ }
+
+ return e.complexity.TorrentFileEntry.Torrent(childComplexity), true
+
case "TorrentPeer.clientName":
if e.complexity.TorrentPeer.ClientName == nil {
break
@@ -676,10 +732,11 @@ type Task {
`, BuiltIn: false},
{Name: "../../../graphql/query.graphql", Input: `type Query {
torrents(filter: TorrentsFilter, pagination: Pagination): [Torrent!]!
- fsListDir(path: String!): ListDirResponse!
+ fsEntry(path: String!): FsEntry
}
input TorrentsFilter {
+ infohash: StringFilter
name: StringFilter
bytesCompleted: IntFilter
bytesMissing: IntFilter
@@ -687,11 +744,6 @@ input TorrentsFilter {
peersCount: IntFilter
}
-type ListDirResponse {
- root: DirEntry!
- entries: [DirEntry!]!
-}
-
input Pagination {
offset: Int!
limit: Int!
@@ -750,30 +802,51 @@ interface Progress {
current: Int!
total: Int!
}`, BuiltIn: false},
- {Name: "../../../graphql/types/fs.graphql", Input: `interface DirEntry {
+ {Name: "../../../graphql/types/fs.graphql", Input: `interface FsEntry {
name: String!
}
-type Dir implements DirEntry {
+interface Dir implements FsEntry {
name: String!
+ entries: [FsEntry!]!
}
-type File implements DirEntry {
+interface File implements FsEntry {
name: String!
size: Int!
}
-type ResolverFS implements DirEntry {
+type SimpleDir implements Dir & FsEntry {
name: String!
+ entries: [FsEntry!]!
}
-type TorrentFS implements DirEntry {
+type SimpleFile implements File & FsEntry {
+ name: String!
+ size: Int!
+}
+
+type ResolverFS implements Dir & FsEntry {
+ name: String!
+ entries: [FsEntry!]!
+}
+
+type ArchiveFS implements Dir & FsEntry {
+ name: String!
+ entries: [FsEntry!]!
+
+ size: Int!
+}
+
+type TorrentFS implements Dir & FsEntry {
name: String!
torrent: Torrent!
+ entries: [FsEntry!]!
}
-type ArchiveFS implements DirEntry {
+type TorrentFileEntry implements File & FsEntry {
name: String!
+ torrent: Torrent!
size: Int!
}
`, BuiltIn: false},
@@ -886,7 +959,7 @@ func (ec *executionContext) field_Query___type_args(ctx context.Context, rawArgs
return args, nil
}
-func (ec *executionContext) field_Query_fsListDir_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
+func (ec *executionContext) field_Query_fsEntry_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
var err error
args := map[string]interface{}{}
var arg0 string
@@ -1022,6 +1095,50 @@ func (ec *executionContext) fieldContext_ArchiveFS_name(ctx context.Context, fie
return fc, nil
}
+func (ec *executionContext) _ArchiveFS_entries(ctx context.Context, field graphql.CollectedField, obj *model.ArchiveFs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ArchiveFS_entries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.ArchiveFS().Entries(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.FsEntry)
+ fc.Result = res
+ return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ArchiveFS_entries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ArchiveFS",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _ArchiveFS_size(ctx context.Context, field graphql.CollectedField, obj *model.ArchiveFs) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ArchiveFS_size(ctx, field)
if err != nil {
@@ -1154,50 +1271,6 @@ func (ec *executionContext) fieldContext_CleanupResponse_list(ctx context.Contex
return fc, nil
}
-func (ec *executionContext) _Dir_name(ctx context.Context, field graphql.CollectedField, obj *model.Dir) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Dir_name(ctx, field)
- if err != nil {
- return graphql.Null
- }
- ctx = graphql.WithFieldContext(ctx, fc)
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) fieldContext_Dir_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
- fc = &graphql.FieldContext{
- Object: "Dir",
- Field: field,
- IsMethod: false,
- IsResolver: false,
- Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
- },
- }
- return fc, nil
-}
-
func (ec *executionContext) _DownloadTorrentResponse_task(ctx context.Context, field graphql.CollectedField, obj *model.DownloadTorrentResponse) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_DownloadTorrentResponse_task(ctx, field)
if err != nil {
@@ -1243,182 +1316,6 @@ func (ec *executionContext) fieldContext_DownloadTorrentResponse_task(ctx contex
return fc, nil
}
-func (ec *executionContext) _File_name(ctx context.Context, field graphql.CollectedField, obj *model.File) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_File_name(ctx, field)
- if err != nil {
- return graphql.Null
- }
- ctx = graphql.WithFieldContext(ctx, fc)
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Name, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(string)
- fc.Result = res
- return ec.marshalNString2string(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) fieldContext_File_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
- fc = &graphql.FieldContext{
- Object: "File",
- Field: field,
- IsMethod: false,
- IsResolver: false,
- Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type String does not have child fields")
- },
- }
- return fc, nil
-}
-
-func (ec *executionContext) _File_size(ctx context.Context, field graphql.CollectedField, obj *model.File) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_File_size(ctx, field)
- if err != nil {
- return graphql.Null
- }
- ctx = graphql.WithFieldContext(ctx, fc)
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Size, nil
- })
- if err != nil {
- ec.Error(ctx, err)
- return graphql.Null
- }
- if resTmp == nil {
- if !graphql.HasFieldError(ctx, fc) {
- ec.Errorf(ctx, "must not be null")
- }
- return graphql.Null
- }
- res := resTmp.(int64)
- fc.Result = res
- return ec.marshalNInt2int64(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) fieldContext_File_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
- fc = &graphql.FieldContext{
- Object: "File",
- Field: field,
- IsMethod: false,
- IsResolver: false,
- Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("field of type Int does not have child fields")
- },
- }
- return fc, nil
-}
-
-func (ec *executionContext) _ListDirResponse_root(ctx context.Context, field graphql.CollectedField, obj *model.ListDirResponse) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_ListDirResponse_root(ctx, field)
- if err != nil {
- return graphql.Null
- }
- ctx = graphql.WithFieldContext(ctx, fc)
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Root, nil
- })
- if err != nil {
- ec.Error(ctx, 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.DirEntry)
- fc.Result = res
- return ec.marshalNDirEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐDirEntry(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) fieldContext_ListDirResponse_root(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
- fc = &graphql.FieldContext{
- Object: "ListDirResponse",
- Field: field,
- IsMethod: false,
- IsResolver: false,
- Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
- },
- }
- return fc, nil
-}
-
-func (ec *executionContext) _ListDirResponse_entries(ctx context.Context, field graphql.CollectedField, obj *model.ListDirResponse) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_ListDirResponse_entries(ctx, field)
- if err != nil {
- return graphql.Null
- }
- ctx = graphql.WithFieldContext(ctx, fc)
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = graphql.Null
- }
- }()
- resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
- ctx = rctx // use context from middleware stack in children
- return obj.Entries, nil
- })
- if err != nil {
- ec.Error(ctx, 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.DirEntry)
- fc.Result = res
- return ec.marshalNDirEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐDirEntryᚄ(ctx, field.Selections, res)
-}
-
-func (ec *executionContext) fieldContext_ListDirResponse_entries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
- fc = &graphql.FieldContext{
- Object: "ListDirResponse",
- Field: field,
- IsMethod: false,
- IsResolver: false,
- Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
- },
- }
- return fc, nil
-}
-
func (ec *executionContext) _Mutation_validateTorrents(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Mutation_validateTorrents(ctx, field)
if err != nil {
@@ -1708,8 +1605,8 @@ func (ec *executionContext) fieldContext_Query_torrents(ctx context.Context, fie
return fc, nil
}
-func (ec *executionContext) _Query_fsListDir(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
- fc, err := ec.fieldContext_Query_fsListDir(ctx, field)
+func (ec *executionContext) _Query_fsEntry(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_Query_fsEntry(ctx, field)
if err != nil {
return graphql.Null
}
@@ -1722,37 +1619,28 @@ func (ec *executionContext) _Query_fsListDir(ctx context.Context, field graphql.
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
- return ec.resolvers.Query().FsListDir(rctx, fc.Args["path"].(string))
+ return ec.resolvers.Query().FsEntry(rctx, fc.Args["path"].(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.ListDirResponse)
+ res := resTmp.(model.FsEntry)
fc.Result = res
- return ec.marshalNListDirResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐListDirResponse(ctx, field.Selections, res)
+ return ec.marshalOFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx, field.Selections, res)
}
-func (ec *executionContext) fieldContext_Query_fsListDir(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+func (ec *executionContext) fieldContext_Query_fsEntry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Query",
Field: field,
IsMethod: true,
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
- switch field.Name {
- case "root":
- return ec.fieldContext_ListDirResponse_root(ctx, field)
- case "entries":
- return ec.fieldContext_ListDirResponse_entries(ctx, field)
- }
- return nil, fmt.Errorf("no field named %q was found under type ListDirResponse", field.Name)
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
},
}
defer func() {
@@ -1762,7 +1650,7 @@ func (ec *executionContext) fieldContext_Query_fsListDir(ctx context.Context, fi
}
}()
ctx = graphql.WithFieldContext(ctx, fc)
- if fc.Args, err = ec.field_Query_fsListDir_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ if fc.Args, err = ec.field_Query_fsEntry_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
ec.Error(ctx, err)
return fc, err
}
@@ -1942,6 +1830,50 @@ func (ec *executionContext) fieldContext_ResolverFS_name(ctx context.Context, fi
return fc, nil
}
+func (ec *executionContext) _ResolverFS_entries(ctx context.Context, field graphql.CollectedField, obj *model.ResolverFs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_ResolverFS_entries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.ResolverFS().Entries(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.FsEntry)
+ fc.Result = res
+ return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_ResolverFS_entries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "ResolverFS",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Schema_query(ctx context.Context, field graphql.CollectedField, obj *model.Schema) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Schema_query(ctx, field)
if err != nil {
@@ -1969,8 +1901,8 @@ func (ec *executionContext) fieldContext_Schema_query(ctx context.Context, field
switch field.Name {
case "torrents":
return ec.fieldContext_Query_torrents(ctx, field)
- case "fsListDir":
- return ec.fieldContext_Query_fsListDir(ctx, field)
+ case "fsEntry":
+ return ec.fieldContext_Query_fsEntry(ctx, field)
case "__schema":
return ec.fieldContext_Query___schema(ctx, field)
case "__type":
@@ -2022,6 +1954,182 @@ func (ec *executionContext) fieldContext_Schema_mutation(ctx context.Context, fi
return fc, nil
}
+func (ec *executionContext) _SimpleDir_name(ctx context.Context, field graphql.CollectedField, obj *model.SimpleDir) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SimpleDir_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_SimpleDir_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SimpleDir",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SimpleDir_entries(ctx context.Context, field graphql.CollectedField, obj *model.SimpleDir) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SimpleDir_entries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.SimpleDir().Entries(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.FsEntry)
+ fc.Result = res
+ return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_SimpleDir_entries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SimpleDir",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SimpleFile_name(ctx context.Context, field graphql.CollectedField, obj *model.SimpleFile) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SimpleFile_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_SimpleFile_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SimpleFile",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _SimpleFile_size(ctx context.Context, field graphql.CollectedField, obj *model.SimpleFile) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_SimpleFile_size(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Size, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int64)
+ fc.Result = res
+ return ec.marshalNInt2int64(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_SimpleFile_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "SimpleFile",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _Subscription_taskProgress(ctx context.Context, field graphql.CollectedField) (ret func(ctx context.Context) graphql.Marshaler) {
fc, err := ec.fieldContext_Subscription_taskProgress(ctx, field)
if err != nil {
@@ -2681,6 +2789,50 @@ func (ec *executionContext) fieldContext_TorrentFS_torrent(ctx context.Context,
return fc, nil
}
+func (ec *executionContext) _TorrentFS_entries(ctx context.Context, field graphql.CollectedField, obj *model.TorrentFs) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TorrentFS_entries(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return ec.resolvers.TorrentFS().Entries(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.FsEntry)
+ fc.Result = res
+ return ec.marshalNFsEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntryᚄ(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TorrentFS_entries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TorrentFS",
+ Field: field,
+ IsMethod: true,
+ IsResolver: true,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _TorrentFile_filename(ctx context.Context, field graphql.CollectedField, obj *model.TorrentFile) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TorrentFile_filename(ctx, field)
if err != nil {
@@ -2813,6 +2965,156 @@ func (ec *executionContext) fieldContext_TorrentFile_bytesCompleted(ctx context.
return fc, nil
}
+func (ec *executionContext) _TorrentFileEntry_name(ctx context.Context, field graphql.CollectedField, obj *model.TorrentFileEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TorrentFileEntry_name(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Name, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(string)
+ fc.Result = res
+ return ec.marshalNString2string(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TorrentFileEntry_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TorrentFileEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type String does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TorrentFileEntry_torrent(ctx context.Context, field graphql.CollectedField, obj *model.TorrentFileEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TorrentFileEntry_torrent(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Torrent, nil
+ })
+ if err != nil {
+ ec.Error(ctx, 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.Torrent)
+ fc.Result = res
+ return ec.marshalNTorrent2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐTorrent(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TorrentFileEntry_torrent(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TorrentFileEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ switch field.Name {
+ case "name":
+ return ec.fieldContext_Torrent_name(ctx, field)
+ case "infohash":
+ return ec.fieldContext_Torrent_infohash(ctx, field)
+ case "bytesCompleted":
+ return ec.fieldContext_Torrent_bytesCompleted(ctx, field)
+ case "torrentFilePath":
+ return ec.fieldContext_Torrent_torrentFilePath(ctx, field)
+ case "bytesMissing":
+ return ec.fieldContext_Torrent_bytesMissing(ctx, field)
+ case "files":
+ return ec.fieldContext_Torrent_files(ctx, field)
+ case "excludedFiles":
+ return ec.fieldContext_Torrent_excludedFiles(ctx, field)
+ case "peers":
+ return ec.fieldContext_Torrent_peers(ctx, field)
+ }
+ return nil, fmt.Errorf("no field named %q was found under type Torrent", field.Name)
+ },
+ }
+ return fc, nil
+}
+
+func (ec *executionContext) _TorrentFileEntry_size(ctx context.Context, field graphql.CollectedField, obj *model.TorrentFileEntry) (ret graphql.Marshaler) {
+ fc, err := ec.fieldContext_TorrentFileEntry_size(ctx, field)
+ if err != nil {
+ return graphql.Null
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ }()
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
+ ctx = rctx // use context from middleware stack in children
+ return obj.Size, nil
+ })
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
+ if resTmp == nil {
+ if !graphql.HasFieldError(ctx, fc) {
+ ec.Errorf(ctx, "must not be null")
+ }
+ return graphql.Null
+ }
+ res := resTmp.(int64)
+ fc.Result = res
+ return ec.marshalNInt2int64(ctx, field.Selections, res)
+}
+
+func (ec *executionContext) fieldContext_TorrentFileEntry_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: "TorrentFileEntry",
+ Field: field,
+ IsMethod: false,
+ IsResolver: false,
+ Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ return nil, errors.New("field of type Int does not have child fields")
+ },
+ }
+ return fc, nil
+}
+
func (ec *executionContext) _TorrentPeer_ip(ctx context.Context, field graphql.CollectedField, obj *model.TorrentPeer) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_TorrentPeer_ip(ctx, field)
if err != nil {
@@ -5471,109 +5773,48 @@ func (ec *executionContext) unmarshalInputTorrentsFilter(ctx context.Context, ob
asMap[k] = v
}
- fieldsInOrder := [...]string{"name", "bytesCompleted", "bytesMissing", "peersCount"}
+ fieldsInOrder := [...]string{"infohash", "name", "bytesCompleted", "bytesMissing", "peersCount"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
continue
}
switch k {
+ case "infohash":
+ ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("infohash"))
+ data, err := ec.unmarshalOStringFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐStringFilter(ctx, v)
+ if err != nil {
+ return it, err
+ }
+ it.Infohash = data
case "name":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name"))
- directive0 := func(ctx context.Context) (interface{}, error) {
- return ec.unmarshalOStringFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐStringFilter(ctx, v)
- }
- directive1 := func(ctx context.Context) (interface{}, error) {
- if ec.directives.OneOf == nil {
- return nil, errors.New("directive oneOf is not implemented")
- }
- return ec.directives.OneOf(ctx, obj, directive0)
- }
-
- tmp, err := directive1(ctx)
+ data, err := ec.unmarshalOStringFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐStringFilter(ctx, v)
if err != nil {
- return it, graphql.ErrorOnPath(ctx, err)
- }
- if data, ok := tmp.(*model.StringFilter); ok {
- it.Name = data
- } else if tmp == nil {
- it.Name = nil
- } else {
- err := fmt.Errorf(`unexpected type %T from directive, should be *git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model.StringFilter`, tmp)
- return it, graphql.ErrorOnPath(ctx, err)
+ return it, err
}
+ it.Name = data
case "bytesCompleted":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bytesCompleted"))
- directive0 := func(ctx context.Context) (interface{}, error) {
- return ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
- }
- directive1 := func(ctx context.Context) (interface{}, error) {
- if ec.directives.OneOf == nil {
- return nil, errors.New("directive oneOf is not implemented")
- }
- return ec.directives.OneOf(ctx, obj, directive0)
- }
-
- tmp, err := directive1(ctx)
+ data, err := ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
if err != nil {
- return it, graphql.ErrorOnPath(ctx, err)
- }
- if data, ok := tmp.(*model.IntFilter); ok {
- it.BytesCompleted = data
- } else if tmp == nil {
- it.BytesCompleted = nil
- } else {
- err := fmt.Errorf(`unexpected type %T from directive, should be *git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model.IntFilter`, tmp)
- return it, graphql.ErrorOnPath(ctx, err)
+ return it, err
}
+ it.BytesCompleted = data
case "bytesMissing":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bytesMissing"))
- directive0 := func(ctx context.Context) (interface{}, error) {
- return ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
- }
- directive1 := func(ctx context.Context) (interface{}, error) {
- if ec.directives.OneOf == nil {
- return nil, errors.New("directive oneOf is not implemented")
- }
- return ec.directives.OneOf(ctx, obj, directive0)
- }
-
- tmp, err := directive1(ctx)
+ data, err := ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
if err != nil {
- return it, graphql.ErrorOnPath(ctx, err)
- }
- if data, ok := tmp.(*model.IntFilter); ok {
- it.BytesMissing = data
- } else if tmp == nil {
- it.BytesMissing = nil
- } else {
- err := fmt.Errorf(`unexpected type %T from directive, should be *git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model.IntFilter`, tmp)
- return it, graphql.ErrorOnPath(ctx, err)
+ return it, err
}
+ it.BytesMissing = data
case "peersCount":
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("peersCount"))
- directive0 := func(ctx context.Context) (interface{}, error) {
- return ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
- }
- directive1 := func(ctx context.Context) (interface{}, error) {
- if ec.directives.OneOf == nil {
- return nil, errors.New("directive oneOf is not implemented")
- }
- return ec.directives.OneOf(ctx, obj, directive0)
- }
-
- tmp, err := directive1(ctx)
+ data, err := ec.unmarshalOIntFilter2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐIntFilter(ctx, v)
if err != nil {
- return it, graphql.ErrorOnPath(ctx, err)
- }
- if data, ok := tmp.(*model.IntFilter); ok {
- it.PeersCount = data
- } else if tmp == nil {
- it.PeersCount = nil
- } else {
- err := fmt.Errorf(`unexpected type %T from directive, should be *git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model.IntFilter`, tmp)
- return it, graphql.ErrorOnPath(ctx, err)
+ return it, err
}
+ it.PeersCount = data
}
}
@@ -5584,24 +5825,17 @@ func (ec *executionContext) unmarshalInputTorrentsFilter(ctx context.Context, ob
// region ************************** interface.gotpl ***************************
-func (ec *executionContext) _DirEntry(ctx context.Context, sel ast.SelectionSet, obj model.DirEntry) graphql.Marshaler {
+func (ec *executionContext) _Dir(ctx context.Context, sel ast.SelectionSet, obj model.Dir) graphql.Marshaler {
switch obj := (obj).(type) {
case nil:
return graphql.Null
- case model.Dir:
- return ec._Dir(ctx, sel, &obj)
- case *model.Dir:
+ case model.SimpleDir:
+ return ec._SimpleDir(ctx, sel, &obj)
+ case *model.SimpleDir:
if obj == nil {
return graphql.Null
}
- return ec._Dir(ctx, sel, obj)
- case model.File:
- return ec._File(ctx, sel, &obj)
- case *model.File:
- if obj == nil {
- return graphql.Null
- }
- return ec._File(ctx, sel, obj)
+ return ec._SimpleDir(ctx, sel, obj)
case model.ResolverFs:
return ec._ResolverFS(ctx, sel, &obj)
case *model.ResolverFs:
@@ -5609,13 +5843,6 @@ func (ec *executionContext) _DirEntry(ctx context.Context, sel ast.SelectionSet,
return graphql.Null
}
return ec._ResolverFS(ctx, sel, obj)
- case model.TorrentFs:
- return ec._TorrentFS(ctx, sel, &obj)
- case *model.TorrentFs:
- if obj == nil {
- return graphql.Null
- }
- return ec._TorrentFS(ctx, sel, obj)
case model.ArchiveFs:
return ec._ArchiveFS(ctx, sel, &obj)
case *model.ArchiveFs:
@@ -5623,6 +5850,97 @@ func (ec *executionContext) _DirEntry(ctx context.Context, sel ast.SelectionSet,
return graphql.Null
}
return ec._ArchiveFS(ctx, sel, obj)
+ case model.TorrentFs:
+ return ec._TorrentFS(ctx, sel, &obj)
+ case *model.TorrentFs:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._TorrentFS(ctx, sel, obj)
+ default:
+ panic(fmt.Errorf("unexpected type %T", obj))
+ }
+}
+
+func (ec *executionContext) _File(ctx context.Context, sel ast.SelectionSet, obj model.File) graphql.Marshaler {
+ switch obj := (obj).(type) {
+ case nil:
+ return graphql.Null
+ case model.SimpleFile:
+ return ec._SimpleFile(ctx, sel, &obj)
+ case *model.SimpleFile:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._SimpleFile(ctx, sel, obj)
+ case model.TorrentFileEntry:
+ return ec._TorrentFileEntry(ctx, sel, &obj)
+ case *model.TorrentFileEntry:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._TorrentFileEntry(ctx, sel, obj)
+ default:
+ panic(fmt.Errorf("unexpected type %T", obj))
+ }
+}
+
+func (ec *executionContext) _FsEntry(ctx context.Context, sel ast.SelectionSet, obj model.FsEntry) graphql.Marshaler {
+ switch obj := (obj).(type) {
+ case nil:
+ return graphql.Null
+ case model.SimpleDir:
+ return ec._SimpleDir(ctx, sel, &obj)
+ case *model.SimpleDir:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._SimpleDir(ctx, sel, obj)
+ case model.SimpleFile:
+ return ec._SimpleFile(ctx, sel, &obj)
+ case *model.SimpleFile:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._SimpleFile(ctx, sel, obj)
+ case model.ResolverFs:
+ return ec._ResolverFS(ctx, sel, &obj)
+ case *model.ResolverFs:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._ResolverFS(ctx, sel, obj)
+ case model.ArchiveFs:
+ return ec._ArchiveFS(ctx, sel, &obj)
+ case *model.ArchiveFs:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._ArchiveFS(ctx, sel, obj)
+ case model.TorrentFs:
+ return ec._TorrentFS(ctx, sel, &obj)
+ case *model.TorrentFs:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._TorrentFS(ctx, sel, obj)
+ case model.TorrentFileEntry:
+ return ec._TorrentFileEntry(ctx, sel, &obj)
+ case *model.TorrentFileEntry:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._TorrentFileEntry(ctx, sel, obj)
+ case model.Dir:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._Dir(ctx, sel, obj)
+ case model.File:
+ if obj == nil {
+ return graphql.Null
+ }
+ return ec._File(ctx, sel, obj)
default:
panic(fmt.Errorf("unexpected type %T", obj))
}
@@ -5648,7 +5966,7 @@ func (ec *executionContext) _Progress(ctx context.Context, sel ast.SelectionSet,
// region **************************** object.gotpl ****************************
-var archiveFSImplementors = []string{"ArchiveFS", "DirEntry"}
+var archiveFSImplementors = []string{"ArchiveFS", "Dir", "FsEntry"}
func (ec *executionContext) _ArchiveFS(ctx context.Context, sel ast.SelectionSet, obj *model.ArchiveFs) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, archiveFSImplementors)
@@ -5662,12 +5980,48 @@ func (ec *executionContext) _ArchiveFS(ctx context.Context, sel ast.SelectionSet
case "name":
out.Values[i] = ec._ArchiveFS_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
+ case "entries":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._ArchiveFS_entries(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
case "size":
out.Values[i] = ec._ArchiveFS_size(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
default:
panic("unknown field " + strconv.Quote(field.Name))
@@ -5736,45 +6090,6 @@ func (ec *executionContext) _CleanupResponse(ctx context.Context, sel ast.Select
return out
}
-var dirImplementors = []string{"Dir", "DirEntry"}
-
-func (ec *executionContext) _Dir(ctx context.Context, sel ast.SelectionSet, obj *model.Dir) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, dirImplementors)
-
- out := graphql.NewFieldSet(fields)
- deferred := make(map[string]*graphql.FieldSet)
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("Dir")
- case "name":
- out.Values[i] = ec._Dir_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch(ctx)
- if out.Invalids > 0 {
- return graphql.Null
- }
-
- atomic.AddInt32(&ec.deferred, int32(len(deferred)))
-
- for label, dfs := range deferred {
- ec.processDeferredGroup(graphql.DeferredGroup{
- Label: label,
- Path: graphql.GetPath(ctx),
- FieldSet: dfs,
- Context: ctx,
- })
- }
-
- return out
-}
-
var downloadTorrentResponseImplementors = []string{"DownloadTorrentResponse"}
func (ec *executionContext) _DownloadTorrentResponse(ctx context.Context, sel ast.SelectionSet, obj *model.DownloadTorrentResponse) graphql.Marshaler {
@@ -5811,94 +6126,6 @@ func (ec *executionContext) _DownloadTorrentResponse(ctx context.Context, sel as
return out
}
-var fileImplementors = []string{"File", "DirEntry"}
-
-func (ec *executionContext) _File(ctx context.Context, sel ast.SelectionSet, obj *model.File) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, fileImplementors)
-
- out := graphql.NewFieldSet(fields)
- deferred := make(map[string]*graphql.FieldSet)
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("File")
- case "name":
- out.Values[i] = ec._File_name(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
- }
- case "size":
- out.Values[i] = ec._File_size(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch(ctx)
- if out.Invalids > 0 {
- return graphql.Null
- }
-
- atomic.AddInt32(&ec.deferred, int32(len(deferred)))
-
- for label, dfs := range deferred {
- ec.processDeferredGroup(graphql.DeferredGroup{
- Label: label,
- Path: graphql.GetPath(ctx),
- FieldSet: dfs,
- Context: ctx,
- })
- }
-
- return out
-}
-
-var listDirResponseImplementors = []string{"ListDirResponse"}
-
-func (ec *executionContext) _ListDirResponse(ctx context.Context, sel ast.SelectionSet, obj *model.ListDirResponse) graphql.Marshaler {
- fields := graphql.CollectFields(ec.OperationContext, sel, listDirResponseImplementors)
-
- out := graphql.NewFieldSet(fields)
- deferred := make(map[string]*graphql.FieldSet)
- for i, field := range fields {
- switch field.Name {
- case "__typename":
- out.Values[i] = graphql.MarshalString("ListDirResponse")
- case "root":
- out.Values[i] = ec._ListDirResponse_root(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
- }
- case "entries":
- out.Values[i] = ec._ListDirResponse_entries(ctx, field, obj)
- if out.Values[i] == graphql.Null {
- out.Invalids++
- }
- default:
- panic("unknown field " + strconv.Quote(field.Name))
- }
- }
- out.Dispatch(ctx)
- if out.Invalids > 0 {
- return graphql.Null
- }
-
- atomic.AddInt32(&ec.deferred, int32(len(deferred)))
-
- for label, dfs := range deferred {
- ec.processDeferredGroup(graphql.DeferredGroup{
- Label: label,
- Path: graphql.GetPath(ctx),
- FieldSet: dfs,
- Context: ctx,
- })
- }
-
- return out
-}
-
var mutationImplementors = []string{"Mutation"}
func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
@@ -6007,7 +6234,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
}
out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) })
- case "fsListDir":
+ case "fsEntry":
field := field
innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
@@ -6016,10 +6243,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
ec.Error(ctx, ec.Recover(ctx, r))
}
}()
- res = ec._Query_fsListDir(ctx, field)
- if res == graphql.Null {
- atomic.AddUint32(&fs.Invalids, 1)
- }
+ res = ec._Query_fsEntry(ctx, field)
return res
}
@@ -6060,7 +6284,7 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
return out
}
-var resolverFSImplementors = []string{"ResolverFS", "DirEntry"}
+var resolverFSImplementors = []string{"ResolverFS", "Dir", "FsEntry"}
func (ec *executionContext) _ResolverFS(ctx context.Context, sel ast.SelectionSet, obj *model.ResolverFs) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, resolverFSImplementors)
@@ -6074,8 +6298,44 @@ func (ec *executionContext) _ResolverFS(ctx context.Context, sel ast.SelectionSe
case "name":
out.Values[i] = ec._ResolverFS_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
+ case "entries":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._ResolverFS_entries(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -6137,6 +6397,125 @@ func (ec *executionContext) _Schema(ctx context.Context, sel ast.SelectionSet, o
return out
}
+var simpleDirImplementors = []string{"SimpleDir", "Dir", "FsEntry"}
+
+func (ec *executionContext) _SimpleDir(ctx context.Context, sel ast.SelectionSet, obj *model.SimpleDir) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, simpleDirImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SimpleDir")
+ case "name":
+ out.Values[i] = ec._SimpleDir_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ atomic.AddUint32(&out.Invalids, 1)
+ }
+ case "entries":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._SimpleDir_entries(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
+var simpleFileImplementors = []string{"SimpleFile", "File", "FsEntry"}
+
+func (ec *executionContext) _SimpleFile(ctx context.Context, sel ast.SelectionSet, obj *model.SimpleFile) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, simpleFileImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("SimpleFile")
+ case "name":
+ out.Values[i] = ec._SimpleFile_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "size":
+ out.Values[i] = ec._SimpleFile_size(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
var subscriptionImplementors = []string{"Subscription"}
func (ec *executionContext) _Subscription(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler {
@@ -6396,7 +6775,7 @@ func (ec *executionContext) _Torrent(ctx context.Context, sel ast.SelectionSet,
return out
}
-var torrentFSImplementors = []string{"TorrentFS", "DirEntry"}
+var torrentFSImplementors = []string{"TorrentFS", "Dir", "FsEntry"}
func (ec *executionContext) _TorrentFS(ctx context.Context, sel ast.SelectionSet, obj *model.TorrentFs) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, torrentFSImplementors)
@@ -6410,13 +6789,49 @@ func (ec *executionContext) _TorrentFS(ctx context.Context, sel ast.SelectionSet
case "name":
out.Values[i] = ec._TorrentFS_name(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
case "torrent":
out.Values[i] = ec._TorrentFS_torrent(ctx, field, obj)
if out.Values[i] == graphql.Null {
- out.Invalids++
+ atomic.AddUint32(&out.Invalids, 1)
}
+ case "entries":
+ field := field
+
+ innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) {
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ }
+ }()
+ res = ec._TorrentFS_entries(ctx, field, obj)
+ if res == graphql.Null {
+ atomic.AddUint32(&fs.Invalids, 1)
+ }
+ return res
+ }
+
+ if field.Deferrable != nil {
+ dfs, ok := deferred[field.Deferrable.Label]
+ di := 0
+ if ok {
+ dfs.AddField(field)
+ di = len(dfs.Values) - 1
+ } else {
+ dfs = graphql.NewFieldSet([]graphql.CollectedField{field})
+ deferred[field.Deferrable.Label] = dfs
+ }
+ dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler {
+ return innerFunc(ctx, dfs)
+ })
+
+ // don't run the out.Concurrently() call below
+ out.Values[i] = graphql.Null
+ continue
+ }
+
+ out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) })
default:
panic("unknown field " + strconv.Quote(field.Name))
}
@@ -6489,6 +6904,55 @@ func (ec *executionContext) _TorrentFile(ctx context.Context, sel ast.SelectionS
return out
}
+var torrentFileEntryImplementors = []string{"TorrentFileEntry", "File", "FsEntry"}
+
+func (ec *executionContext) _TorrentFileEntry(ctx context.Context, sel ast.SelectionSet, obj *model.TorrentFileEntry) graphql.Marshaler {
+ fields := graphql.CollectFields(ec.OperationContext, sel, torrentFileEntryImplementors)
+
+ out := graphql.NewFieldSet(fields)
+ deferred := make(map[string]*graphql.FieldSet)
+ for i, field := range fields {
+ switch field.Name {
+ case "__typename":
+ out.Values[i] = graphql.MarshalString("TorrentFileEntry")
+ case "name":
+ out.Values[i] = ec._TorrentFileEntry_name(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "torrent":
+ out.Values[i] = ec._TorrentFileEntry_torrent(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ case "size":
+ out.Values[i] = ec._TorrentFileEntry_size(ctx, field, obj)
+ if out.Values[i] == graphql.Null {
+ out.Invalids++
+ }
+ default:
+ panic("unknown field " + strconv.Quote(field.Name))
+ }
+ }
+ out.Dispatch(ctx)
+ if out.Invalids > 0 {
+ return graphql.Null
+ }
+
+ atomic.AddInt32(&ec.deferred, int32(len(deferred)))
+
+ for label, dfs := range deferred {
+ ec.processDeferredGroup(graphql.DeferredGroup{
+ Label: label,
+ Path: graphql.GetPath(ctx),
+ FieldSet: dfs,
+ Context: ctx,
+ })
+ }
+
+ return out
+}
+
var torrentPeerImplementors = []string{"TorrentPeer"}
func (ec *executionContext) _TorrentPeer(ctx context.Context, sel ast.SelectionSet, obj *model.TorrentPeer) graphql.Marshaler {
@@ -6952,17 +7416,32 @@ func (ec *executionContext) marshalNCleanupResponse2ᚖgitᚗkmsignᚗruᚋroyal
return ec._CleanupResponse(ctx, sel, v)
}
-func (ec *executionContext) marshalNDirEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐDirEntry(ctx context.Context, sel ast.SelectionSet, v model.DirEntry) graphql.Marshaler {
+func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) {
+ res, err := graphql.UnmarshalFloatContext(ctx, v)
+ return res, graphql.ErrorOnPath(ctx, err)
+}
+
+func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
+ res := graphql.MarshalFloatContext(v)
+ if res == graphql.Null {
+ if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
+ }
+ }
+ return graphql.WrapContextMarshaler(ctx, 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 {
if v == nil {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
return graphql.Null
}
- return ec._DirEntry(ctx, sel, v)
+ return ec._FsEntry(ctx, sel, v)
}
-func (ec *executionContext) marshalNDirEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐDirEntryᚄ(ctx context.Context, sel ast.SelectionSet, v []model.DirEntry) graphql.Marshaler {
+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 {
ret := make(graphql.Array, len(v))
var wg sync.WaitGroup
isLen1 := len(v) == 1
@@ -6986,7 +7465,7 @@ func (ec *executionContext) marshalNDirEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋt
if !isLen1 {
defer wg.Done()
}
- ret[i] = ec.marshalNDirEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐDirEntry(ctx, sel, v[i])
+ ret[i] = ec.marshalNFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx, sel, v[i])
}
if isLen1 {
f(i)
@@ -7006,21 +7485,6 @@ func (ec *executionContext) marshalNDirEntry2ᚕgitᚗkmsignᚗruᚋroyalcatᚋt
return ret
}
-func (ec *executionContext) unmarshalNFloat2float64(ctx context.Context, v interface{}) (float64, error) {
- res, err := graphql.UnmarshalFloatContext(ctx, v)
- return res, graphql.ErrorOnPath(ctx, err)
-}
-
-func (ec *executionContext) marshalNFloat2float64(ctx context.Context, sel ast.SelectionSet, v float64) graphql.Marshaler {
- res := graphql.MarshalFloatContext(v)
- if res == graphql.Null {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "the requested element is null which the schema does not allow")
- }
- }
- return graphql.WrapContextMarshaler(ctx, res)
-}
-
func (ec *executionContext) unmarshalNID2string(ctx context.Context, v interface{}) (string, error) {
res, err := graphql.UnmarshalID(v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -7051,20 +7515,6 @@ func (ec *executionContext) marshalNInt2int64(ctx context.Context, sel ast.Selec
return res
}
-func (ec *executionContext) marshalNListDirResponse2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐListDirResponse(ctx context.Context, sel ast.SelectionSet, v model.ListDirResponse) graphql.Marshaler {
- return ec._ListDirResponse(ctx, sel, &v)
-}
-
-func (ec *executionContext) marshalNListDirResponse2ᚖgitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐListDirResponse(ctx context.Context, sel ast.SelectionSet, v *model.ListDirResponse) graphql.Marshaler {
- if v == nil {
- if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "the requested element is null which the schema does not allow")
- }
- return graphql.Null
- }
- return ec._ListDirResponse(ctx, sel, v)
-}
-
func (ec *executionContext) unmarshalNString2string(ctx context.Context, v interface{}) (string, error) {
res, err := graphql.UnmarshalString(v)
return res, graphql.ErrorOnPath(ctx, err)
@@ -7581,6 +8031,13 @@ func (ec *executionContext) marshalODownloadTorrentResponse2ᚖgitᚗkmsignᚗru
return ec._DownloadTorrentResponse(ctx, sel, v)
}
+func (ec *executionContext) marshalOFsEntry2gitᚗkmsignᚗruᚋroyalcatᚋtstorᚋsrcᚋdeliveryᚋgraphqlᚋmodelᚐFsEntry(ctx context.Context, sel ast.SelectionSet, v model.FsEntry) graphql.Marshaler {
+ if v == nil {
+ return graphql.Null
+ }
+ return ec._FsEntry(ctx, sel, v)
+}
+
func (ec *executionContext) unmarshalOInt2ᚕint64ᚄ(ctx context.Context, v interface{}) ([]int64, error) {
if v == nil {
return nil, nil
diff --git a/src/delivery/graphql/model/entry.go b/src/delivery/graphql/model/entry.go
new file mode 100644
index 0000000..940e9cc
--- /dev/null
+++ b/src/delivery/graphql/model/entry.go
@@ -0,0 +1,47 @@
+package model
+
+import (
+ "git.kmsign.ru/royalcat/tstor/src/host/vfs"
+)
+
+type FsElem interface {
+ Name() string
+ IsDir() bool
+}
+
+func FillFsEntry(e FsElem, fs vfs.Filesystem, path string) FsEntry {
+ switch e.(type) {
+ case *vfs.ArchiveFS:
+ e := e.(*vfs.ArchiveFS)
+ return ArchiveFs{
+ Name: e.Name(),
+ Size: e.Size(),
+ FS: e,
+ }
+ case *vfs.ResolverFS:
+ e := e.(*vfs.ResolverFS)
+ return ResolverFs{
+ Name: e.Name(),
+ FS: e,
+ }
+ case *vfs.TorrentFS:
+ e := e.(*vfs.TorrentFS)
+ return TorrentFs{
+ Name: e.Name(),
+ Torrent: MapTorrent(e.Torrent),
+ FS: e,
+ }
+ default:
+ if e.IsDir() {
+ return SimpleDir{
+ Name: e.Name(),
+ FS: fs,
+ Path: path,
+ }
+ } else {
+ return SimpleFile{
+ Name: e.Name(),
+ }
+ }
+ }
+}
diff --git a/src/delivery/graphql/model/filter.go b/src/delivery/graphql/model/filter.go
index 0c96e46..6ae7fc8 100644
--- a/src/delivery/graphql/model/filter.go
+++ b/src/delivery/graphql/model/filter.go
@@ -1,9 +1,18 @@
package model
-import "slices"
+import (
+ "slices"
+ "strings"
+)
+
+type Filter[T any] interface {
+ Include(v T) bool
+}
func (f *IntFilter) Include(v int64) bool {
- if f.Eq != nil {
+ if f == nil {
+ return true
+ } else if f.Eq != nil {
return v == *f.Eq
} else if f.Gt != nil {
return v > *f.Gt
@@ -19,3 +28,17 @@ func (f *IntFilter) Include(v int64) bool {
return true
}
+
+func (f *StringFilter) Include(v string) bool {
+ if f == nil {
+ return true
+ } else if f.Eq != nil {
+ return v == *f.Eq
+ } else if f.Substr != nil {
+ return strings.Contains(v, *f.Substr)
+ } else if f.In != nil {
+ return slices.Contains(f.In, v)
+ }
+
+ return true
+}
diff --git a/src/delivery/graphql/model/models_gen.go b/src/delivery/graphql/model/models_gen.go
index 6852932..b7f4807 100644
--- a/src/delivery/graphql/model/models_gen.go
+++ b/src/delivery/graphql/model/models_gen.go
@@ -6,11 +6,26 @@ import (
"time"
"git.kmsign.ru/royalcat/tstor/src/host/controller"
+ "git.kmsign.ru/royalcat/tstor/src/host/vfs"
"github.com/anacrolix/torrent"
)
-type DirEntry interface {
- IsDirEntry()
+type Dir interface {
+ IsFsEntry()
+ IsDir()
+ GetName() string
+ GetEntries() []FsEntry
+}
+
+type File interface {
+ IsFsEntry()
+ IsFile()
+ GetName() string
+ GetSize() int64
+}
+
+type FsEntry interface {
+ IsFsEntry()
GetName() string
}
@@ -21,12 +36,26 @@ type Progress interface {
}
type ArchiveFs struct {
- Name string `json:"name"`
- Size int64 `json:"size"`
+ Name string `json:"name"`
+ Entries []FsEntry `json:"entries"`
+ Size int64 `json:"size"`
+ FS *vfs.ArchiveFS `json:"-"`
}
-func (ArchiveFs) IsDirEntry() {}
+func (ArchiveFs) IsDir() {}
func (this ArchiveFs) GetName() string { return this.Name }
+func (this ArchiveFs) GetEntries() []FsEntry {
+ if this.Entries == nil {
+ return nil
+ }
+ interfaceSlice := make([]FsEntry, 0, len(this.Entries))
+ for _, concrete := range this.Entries {
+ interfaceSlice = append(interfaceSlice, concrete)
+ }
+ return interfaceSlice
+}
+
+func (ArchiveFs) IsFsEntry() {}
type BooleanFilter struct {
Eq *bool `json:"eq,omitempty"`
@@ -45,25 +74,10 @@ type DateTimeFilter struct {
Lte *time.Time `json:"lte,omitempty"`
}
-type Dir struct {
- Name string `json:"name"`
-}
-
-func (Dir) IsDirEntry() {}
-func (this Dir) GetName() string { return this.Name }
-
type DownloadTorrentResponse struct {
Task *Task `json:"task,omitempty"`
}
-type File struct {
- Name string `json:"name"`
- Size int64 `json:"size"`
-}
-
-func (File) IsDirEntry() {}
-func (this File) GetName() string { return this.Name }
-
type IntFilter struct {
Eq *int64 `json:"eq,omitempty"`
Gt *int64 `json:"gt,omitempty"`
@@ -73,11 +87,6 @@ type IntFilter struct {
In []int64 `json:"in,omitempty"`
}
-type ListDirResponse struct {
- Root DirEntry `json:"root"`
- Entries []DirEntry `json:"entries"`
-}
-
type Mutation struct {
}
@@ -90,17 +99,64 @@ type Query struct {
}
type ResolverFs struct {
- Name string `json:"name"`
+ Name string `json:"name"`
+ Entries []FsEntry `json:"entries"`
+ FS *vfs.ResolverFS `json:"-"`
}
-func (ResolverFs) IsDirEntry() {}
+func (ResolverFs) IsDir() {}
func (this ResolverFs) GetName() string { return this.Name }
+func (this ResolverFs) GetEntries() []FsEntry {
+ if this.Entries == nil {
+ return nil
+ }
+ interfaceSlice := make([]FsEntry, 0, len(this.Entries))
+ for _, concrete := range this.Entries {
+ interfaceSlice = append(interfaceSlice, concrete)
+ }
+ return interfaceSlice
+}
+
+func (ResolverFs) IsFsEntry() {}
type Schema struct {
Query *Query `json:"query,omitempty"`
Mutation *Mutation `json:"mutation,omitempty"`
}
+type SimpleDir struct {
+ Name string `json:"name"`
+ Entries []FsEntry `json:"entries"`
+ FS vfs.Filesystem `json:"-"`
+ Path string `json:"-"`
+}
+
+func (SimpleDir) IsDir() {}
+func (this SimpleDir) GetName() string { return this.Name }
+func (this SimpleDir) GetEntries() []FsEntry {
+ if this.Entries == nil {
+ return nil
+ }
+ interfaceSlice := make([]FsEntry, 0, len(this.Entries))
+ for _, concrete := range this.Entries {
+ interfaceSlice = append(interfaceSlice, concrete)
+ }
+ return interfaceSlice
+}
+
+func (SimpleDir) IsFsEntry() {}
+
+type SimpleFile struct {
+ Name string `json:"name"`
+ Size int64 `json:"size"`
+}
+
+func (SimpleFile) IsFile() {}
+func (this SimpleFile) GetName() string { return this.Name }
+func (this SimpleFile) GetSize() int64 { return this.Size }
+
+func (SimpleFile) IsFsEntry() {}
+
type StringFilter struct {
Eq *string `json:"eq,omitempty"`
Substr *string `json:"substr,omitempty"`
@@ -127,12 +183,26 @@ type Torrent struct {
}
type TorrentFs struct {
- Name string `json:"name"`
- Torrent *Torrent `json:"torrent"`
+ Name string `json:"name"`
+ Torrent *Torrent `json:"torrent"`
+ Entries []FsEntry `json:"entries"`
+ FS *vfs.TorrentFS `json:"-"`
}
-func (TorrentFs) IsDirEntry() {}
+func (TorrentFs) IsDir() {}
func (this TorrentFs) GetName() string { return this.Name }
+func (this TorrentFs) GetEntries() []FsEntry {
+ if this.Entries == nil {
+ return nil
+ }
+ interfaceSlice := make([]FsEntry, 0, len(this.Entries))
+ for _, concrete := range this.Entries {
+ interfaceSlice = append(interfaceSlice, concrete)
+ }
+ return interfaceSlice
+}
+
+func (TorrentFs) IsFsEntry() {}
type TorrentFile struct {
Filename string `json:"filename"`
@@ -141,6 +211,18 @@ type TorrentFile struct {
F *torrent.File `json:"-"`
}
+type TorrentFileEntry struct {
+ Name string `json:"name"`
+ Torrent *Torrent `json:"torrent"`
+ Size int64 `json:"size"`
+}
+
+func (TorrentFileEntry) IsFile() {}
+func (this TorrentFileEntry) GetName() string { return this.Name }
+func (this TorrentFileEntry) GetSize() int64 { return this.Size }
+
+func (TorrentFileEntry) IsFsEntry() {}
+
type TorrentFilter struct {
Everything *bool `json:"everything,omitempty"`
Infohash *string `json:"infohash,omitempty"`
@@ -166,6 +248,7 @@ func (this TorrentProgress) GetCurrent() int64 { return this.Current }
func (this TorrentProgress) GetTotal() int64 { return this.Total }
type TorrentsFilter struct {
+ Infohash *StringFilter `json:"infohash,omitempty"`
Name *StringFilter `json:"name,omitempty"`
BytesCompleted *IntFilter `json:"bytesCompleted,omitempty"`
BytesMissing *IntFilter `json:"bytesMissing,omitempty"`
diff --git a/src/delivery/graphql/resolver/fs.resolvers.go b/src/delivery/graphql/resolver/fs.resolvers.go
new file mode 100644
index 0000000..999fd9b
--- /dev/null
+++ b/src/delivery/graphql/resolver/fs.resolvers.go
@@ -0,0 +1,81 @@
+package resolver
+
+// This file will be automatically regenerated based on the schema, any resolver implementations
+// will be copied through when generating and any unknown code will be moved to the end.
+// Code generated by github.com/99designs/gqlgen version v0.17.45
+
+import (
+ "context"
+
+ graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
+ "git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model"
+)
+
+// Entries is the resolver for the entries field.
+func (r *archiveFSResolver) Entries(ctx context.Context, obj *model.ArchiveFs) ([]model.FsEntry, error) {
+ entries, err := obj.FS.ReadDir(ctx, ".")
+ if err != nil {
+ return nil, err
+ }
+ out := []model.FsEntry{}
+ for _, e := range entries {
+ out = append(out, model.FillFsEntry(e, obj.FS, "."))
+ }
+ return out, nil
+}
+
+// Entries is the resolver for the entries field.
+func (r *resolverFSResolver) Entries(ctx context.Context, obj *model.ResolverFs) ([]model.FsEntry, error) {
+ entries, err := obj.FS.ReadDir(ctx, ".")
+ if err != nil {
+ return nil, err
+ }
+ out := []model.FsEntry{}
+ for _, e := range entries {
+ out = append(out, model.FillFsEntry(e, obj.FS, "."))
+ }
+ return out, nil
+}
+
+// Entries is the resolver for the entries field.
+func (r *simpleDirResolver) Entries(ctx context.Context, obj *model.SimpleDir) ([]model.FsEntry, error) {
+ entries, err := obj.FS.ReadDir(ctx, obj.Path)
+ if err != nil {
+ return nil, err
+ }
+ out := []model.FsEntry{}
+ for _, e := range entries {
+ out = append(out, model.FillFsEntry(e, obj.FS, obj.Path))
+ }
+ return out, nil
+}
+
+// Entries is the resolver for the entries field.
+func (r *torrentFSResolver) Entries(ctx context.Context, obj *model.TorrentFs) ([]model.FsEntry, error) {
+ entries, err := obj.FS.ReadDir(ctx, ".")
+ if err != nil {
+ return nil, err
+ }
+ out := []model.FsEntry{}
+ for _, e := range entries {
+ out = append(out, model.FillFsEntry(e, obj.FS, "."))
+ }
+ return out, nil
+}
+
+// ArchiveFS returns graph.ArchiveFSResolver implementation.
+func (r *Resolver) ArchiveFS() graph.ArchiveFSResolver { return &archiveFSResolver{r} }
+
+// ResolverFS returns graph.ResolverFSResolver implementation.
+func (r *Resolver) ResolverFS() graph.ResolverFSResolver { return &resolverFSResolver{r} }
+
+// SimpleDir returns graph.SimpleDirResolver implementation.
+func (r *Resolver) SimpleDir() graph.SimpleDirResolver { return &simpleDirResolver{r} }
+
+// TorrentFS returns graph.TorrentFSResolver implementation.
+func (r *Resolver) TorrentFS() graph.TorrentFSResolver { return &torrentFSResolver{r} }
+
+type archiveFSResolver struct{ *Resolver }
+type resolverFSResolver struct{ *Resolver }
+type simpleDirResolver struct{ *Resolver }
+type torrentFSResolver struct{ *Resolver }
diff --git a/src/delivery/graphql/resolver/mutation.resolvers.go b/src/delivery/graphql/resolver/mutation.resolvers.go
index ed7dc31..0ec91aa 100644
--- a/src/delivery/graphql/resolver/mutation.resolvers.go
+++ b/src/delivery/graphql/resolver/mutation.resolvers.go
@@ -2,7 +2,7 @@ package resolver
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
-// Code generated by github.com/99designs/gqlgen version v0.17.43
+// Code generated by github.com/99designs/gqlgen version v0.17.45
import (
"context"
diff --git a/src/delivery/graphql/resolver/query.resolvers.go b/src/delivery/graphql/resolver/query.resolvers.go
index 1b6aa43..705cb65 100644
--- a/src/delivery/graphql/resolver/query.resolvers.go
+++ b/src/delivery/graphql/resolver/query.resolvers.go
@@ -2,15 +2,16 @@ package resolver
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
-// Code generated by github.com/99designs/gqlgen version v0.17.43
+// Code generated by github.com/99designs/gqlgen version v0.17.45
import (
"context"
- "io/fs"
+ "slices"
+ "strings"
graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
"git.kmsign.ru/royalcat/tstor/src/delivery/graphql/model"
- "git.kmsign.ru/royalcat/tstor/src/host/vfs"
+ "git.kmsign.ru/royalcat/tstor/src/host/controller"
)
// Torrents is the resolver for the torrents field.
@@ -40,6 +41,13 @@ func (r *queryResolver) Torrents(ctx context.Context, filter *model.TorrentsFilt
)
})
}
+ if filter.Infohash != nil {
+ filterFuncs = append(filterFuncs, func(torrent *model.Torrent) bool {
+ return filter.Infohash.Include(
+ torrent.Infohash,
+ )
+ })
+ }
}
@@ -62,78 +70,21 @@ func (r *queryResolver) Torrents(ctx context.Context, filter *model.TorrentsFilt
tr = append(tr, d)
}
+ slices.SortStableFunc(torrents, func(t1, t2 *controller.Torrent) int {
+ return strings.Compare(t1.InfoHash(), t2.InfoHash())
+ })
+
return tr, nil
}
-type dirEntry interface {
- Name() string
- IsDir() bool
-}
-
-func fillDirEntry(e dirEntry) model.DirEntry {
- switch e.(type) {
- case *vfs.ArchiveFS:
- e := e.(*vfs.ArchiveFS)
- return model.ArchiveFs{
- Name: e.Name(),
- Size: e.Size(),
- }
- case *vfs.ResolverFS:
- e := e.(*vfs.ResolverFS)
- return model.ResolverFs{
- Name: e.Name(),
- }
- case *vfs.TorrentFs:
- e := e.(*vfs.TorrentFs)
- return model.TorrentFs{
- Name: e.Name(),
- Torrent: model.MapTorrent(e.Torrent),
- }
- default:
- if e.IsDir() {
- return model.Dir{
- Name: e.Name(),
- }
- }
- if de, ok := e.(fs.DirEntry); ok {
- info, _ := de.Info()
- return model.File{
- Name: e.Name(),
- Size: info.Size(),
- }
- }
-
- if fe, ok := e.(fs.FileInfo); ok {
- return model.File{
- Name: fe.Name(),
- Size: fe.Size(),
- }
- }
- }
-
- panic("this dir entry is strange af")
-}
-
-// FsListDir is the resolver for the fsListDir field.
-func (r *queryResolver) FsListDir(ctx context.Context, path string) (*model.ListDirResponse, error) {
- root, err := r.VFS.Stat(ctx, path)
+// FsEntry is the resolver for the fsEntry field.
+func (r *queryResolver) FsEntry(ctx context.Context, path string) (model.FsEntry, error) {
+ entry, err := r.VFS.Stat(ctx, path)
if err != nil {
return nil, err
}
- entries, err := r.VFS.ReadDir(ctx, path)
- if err != nil {
- return nil, err
- }
- out := []model.DirEntry{}
- for _, e := range entries {
- out = append(out, fillDirEntry(e))
- }
-
- return &model.ListDirResponse{
- Root: fillDirEntry(root),
- Entries: out,
- }, nil
+ return model.FillFsEntry(entry, r.VFS, path), nil
}
// Query returns graph.QueryResolver implementation.
diff --git a/src/delivery/graphql/resolver/subscription.resolvers.go b/src/delivery/graphql/resolver/subscription.resolvers.go
index f30af50..7011caf 100644
--- a/src/delivery/graphql/resolver/subscription.resolvers.go
+++ b/src/delivery/graphql/resolver/subscription.resolvers.go
@@ -2,7 +2,7 @@ package resolver
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
-// Code generated by github.com/99designs/gqlgen version v0.17.43
+// Code generated by github.com/99designs/gqlgen version v0.17.45
import (
"context"
diff --git a/src/delivery/graphql/resolver/torrent.resolvers.go b/src/delivery/graphql/resolver/torrent.resolvers.go
index ef231ad..dab9b3b 100644
--- a/src/delivery/graphql/resolver/torrent.resolvers.go
+++ b/src/delivery/graphql/resolver/torrent.resolvers.go
@@ -2,7 +2,7 @@ package resolver
// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.
-// Code generated by github.com/99designs/gqlgen version v0.17.43
+// Code generated by github.com/99designs/gqlgen version v0.17.45
import (
"context"
diff --git a/src/delivery/http.go b/src/delivery/http.go
index 92dbc55..52f7ff4 100644
--- a/src/delivery/http.go
+++ b/src/delivery/http.go
@@ -5,84 +5,84 @@ import (
"log/slog"
"net/http"
- "git.kmsign.ru/royalcat/tstor"
+ "git.kmsign.ru/royalcat/tstor/pkg/rlog"
"git.kmsign.ru/royalcat/tstor/src/config"
"git.kmsign.ru/royalcat/tstor/src/host/service"
"git.kmsign.ru/royalcat/tstor/src/host/vfs"
"github.com/anacrolix/missinggo/v2/filecache"
- "github.com/gin-contrib/pprof"
- "github.com/gin-gonic/gin"
- "github.com/shurcooL/httpfs/html/vfstemplate"
+ echopprof "github.com/labstack/echo-contrib/pprof"
+ "github.com/labstack/echo/v4"
+ "github.com/labstack/echo/v4/middleware"
)
func New(fc *filecache.Cache, ss *service.Stats, s *service.Service, vfs vfs.Filesystem, logPath string, cfg *config.Settings) error {
log := slog.With()
- gin.SetMode(gin.ReleaseMode)
- r := gin.New()
- r.Use(gin.Recovery())
- r.Use(gin.ErrorLogger())
- r.Use(Logger())
- pprof.Register(r)
+ r := echo.New()
+ r.Use(
+ middleware.Recover(),
+ middleware.Gzip(),
+ middleware.Decompress(),
+ Logger(),
+ )
- r.GET("/assets/*filepath", func(c *gin.Context) {
- c.FileFromFS(c.Request.URL.Path, http.FS(tstor.Assets))
- })
+ echopprof.Register(r)
- t, err := vfstemplate.ParseGlob(http.FS(tstor.Templates), nil, "/templates/*")
- if err != nil {
- return fmt.Errorf("error parsing html: %w", err)
- }
+ // r.GET("/assets/*filepath", func(c *echo.Context) {
+ // c.FileFromFS(c.Request.URL.Path, http.FS(tstor.Assets))
+ // })
- r.SetHTMLTemplate(t)
+ // t, err := vfstemplate.ParseGlob(http.FS(tstor.Templates), nil, "/templates/*")
+ // if err != nil {
+ // return fmt.Errorf("error parsing html: %w", err)
+ // }
- r.GET("/", indexHandler)
- // r.GET("/routes", routesHandler(ss))
- r.GET("/logs", logsHandler)
- r.GET("/servers", serversFoldersHandler())
- r.Any("/graphql", gin.WrapH(GraphQLHandler(s, vfs)))
+ // r.SetHTMLTemplate(t)
- api := r.Group("/api")
- {
- api.GET("/log", apiLogHandler(logPath))
- api.GET("/status", apiStatusHandler(fc, ss))
- // api.GET("/servers", apiServersHandler(tss))
- // api.GET("/routes", apiRoutesHandler(ss))
- // api.POST("/routes/:route/torrent", apiAddTorrentHandler(s))
- // api.DELETE("/routes/:route/torrent/:torrent_hash", apiDelTorrentHandler(s))
- }
+ // r.GET("/", indexHandler)
+ // // r.GET("/routes", routesHandler(ss))
+ // r.GET("/logs", logsHandler)
+ // r.GET("/servers", serversFoldersHandler())
+ r.Any("/graphql", echo.WrapHandler((GraphQLHandler(s, vfs))))
+
+ // api := r.Group("/api")
+ // {
+ // api.GET("/log", apiLogHandler(logPath))
+ // api.GET("/status", apiStatusHandler(fc, ss))
+ // // api.GET("/servers", apiServersHandler(tss))
+ // // api.GET("/routes", apiRoutesHandler(ss))
+ // // api.POST("/routes/:route/torrent", apiAddTorrentHandler(s))
+ // // api.DELETE("/routes/:route/torrent/:torrent_hash", apiDelTorrentHandler(s))
+ // }
log.Info("starting webserver", "host", fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port))
- if err := r.Run(fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port)); err != nil {
- return fmt.Errorf("error initializing server: %w", err)
- }
+ // if err := r.Run(fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port)); err != nil {
+ // return fmt.Errorf("error initializing server: %w", err)
+ // }
+
+ go r.Start((fmt.Sprintf("%s:%d", cfg.WebUi.IP, cfg.WebUi.Port)))
return nil
}
-func Logger() gin.HandlerFunc {
- l := slog.With("component", "http")
- return func(c *gin.Context) {
- path := c.Request.URL.Path
- raw := c.Request.URL.RawQuery
- c.Next()
- if raw != "" {
- path = path + "?" + raw
- }
- msg := c.Errors.String()
- if msg == "" {
- msg = "Request"
- }
-
- s := c.Writer.Status()
- switch {
- case s >= 400 && s < 500:
- l.Warn(msg, "path", path, "status", s)
- case s >= 500:
- l.Error(msg, "path", path, "status", s)
- default:
- l.Debug(msg, "path", path, "status", s)
- }
- }
+func Logger() echo.MiddlewareFunc {
+ l := rlog.Component("http")
+ return middleware.BodyDumpWithConfig(middleware.BodyDumpConfig{
+ Skipper: func(c echo.Context) bool {
+ return c.Request().Method == http.MethodGet
+ },
+ Handler: func(c echo.Context, reqBody, resBody []byte) {
+ log := l.With(
+ slog.String("method", c.Request().Method),
+ slog.String("uri", c.Request().RequestURI),
+ )
+ if c.Request().Header.Get("Content-Type") == "application/json" {
+ log.Info(c.Request().Context(), "Request body", slog.String("body", string(reqBody)))
+ }
+ if c.Response().Header().Get("Content-Type") == "application/json" {
+ log.Info(c.Request().Context(), "Response body", slog.String("body", string(resBody)))
+ }
+ },
+ })
}
diff --git a/src/delivery/router.go b/src/delivery/router.go
index e9e108f..be5f72f 100644
--- a/src/delivery/router.go
+++ b/src/delivery/router.go
@@ -1,8 +1,11 @@
package delivery
import (
+ "context"
+ "log/slog"
"net/http"
+ "git.kmsign.ru/royalcat/tstor/pkg/rlog"
graph "git.kmsign.ru/royalcat/tstor/src/delivery/graphql"
"git.kmsign.ru/royalcat/tstor/src/delivery/graphql/resolver"
"git.kmsign.ru/royalcat/tstor/src/host/service"
@@ -27,6 +30,15 @@ func GraphQLHandler(service *service.Service, vfs vfs.Filesystem) http.Handler {
),
)
+ log := rlog.Component("graphql")
+
+ graphqlHandler.AroundResponses(func(ctx context.Context, next graphql.ResponseHandler) *graphql.Response {
+ resp := next(ctx)
+ responseJson, _ := resp.Data.MarshalJSON()
+ log.Info(ctx, "response", slog.String("body", string(responseJson)))
+ return resp
+ })
+
graphqlHandler.AddTransport(&transport.POST{})
graphqlHandler.AddTransport(&transport.Websocket{})
graphqlHandler.AddTransport(&transport.SSE{})
@@ -39,6 +51,5 @@ func GraphQLHandler(service *service.Service, vfs vfs.Filesystem) http.Handler {
return ctx.Field.Directives.ForName("link") != nil
}),
))
-
return graphqlHandler
}
diff --git a/src/host/service/queue.go b/src/host/service/queue.go
index a67f286..16eb4ae 100644
--- a/src/host/service/queue.go
+++ b/src/host/service/queue.go
@@ -36,10 +36,12 @@ func (s *Service) Download(ctx context.Context, task *TorrentDownloadTask) error
}
file.Download()
- return nil
+ } else {
+ for _, file := range t.Files() {
+ file.Download()
+ }
}
- t.DownloadAll()
return nil
}
@@ -111,15 +113,19 @@ func (s *Service) DownloadProgress(ctx context.Context) (<-chan TorrentProgress,
defer close(out)
for _, t := range torrents {
sub := t.Torrent().SubscribePieceStateChanges()
- go func() {
- for range sub.Values {
+ go func(t *controller.Torrent) {
+ for stateChange := range sub.Values {
+ if !stateChange.Complete && !stateChange.Partial {
+ continue
+ }
+
out <- TorrentProgress{
Torrent: t,
Current: t.BytesCompleted(),
Total: t.Length(),
}
}
- }()
+ }(t)
defer sub.Close()
}
diff --git a/src/host/vfs/resolver.go b/src/host/vfs/resolver.go
index c81a37b..fa8dd39 100644
--- a/src/host/vfs/resolver.go
+++ b/src/host/vfs/resolver.go
@@ -342,7 +342,7 @@ func getFile[F File](m map[string]F, name string) (File, error) {
func listDirFromFiles[F File](m map[string]F, name string) ([]fs.DirEntry, error) {
out := make([]fs.DirEntry, 0, len(m))
- name = AddTrailSlash(name)
+ name = AddTrailSlash(path.Clean(name))
for p, f := range m {
if strings.HasPrefix(p, name) {
parts := strings.Split(trimRelPath(p, name), Separator)
diff --git a/src/host/vfs/torrent.go b/src/host/vfs/torrent.go
index dd75760..1f76470 100644
--- a/src/host/vfs/torrent.go
+++ b/src/host/vfs/torrent.go
@@ -19,7 +19,7 @@ import (
"golang.org/x/exp/maps"
)
-type TorrentFs struct {
+type TorrentFS struct {
name string
mu sync.Mutex
@@ -32,64 +32,64 @@ type TorrentFs struct {
resolver *resolver
}
-var _ Filesystem = (*TorrentFs)(nil)
+var _ Filesystem = (*TorrentFS)(nil)
-func NewTorrentFs(name string, c *controller.Torrent) *TorrentFs {
- return &TorrentFs{
+func NewTorrentFs(name string, c *controller.Torrent) *TorrentFS {
+ return &TorrentFS{
name: name,
Torrent: c,
resolver: newResolver(ArchiveFactories),
}
}
-var _ fs.DirEntry = (*TorrentFs)(nil)
+var _ fs.DirEntry = (*TorrentFS)(nil)
// Name implements fs.DirEntry.
-func (tfs *TorrentFs) Name() string {
+func (tfs *TorrentFS) Name() string {
return tfs.name
}
// Info implements fs.DirEntry.
-func (tfs *TorrentFs) Info() (fs.FileInfo, error) {
+func (tfs *TorrentFS) Info() (fs.FileInfo, error) {
return tfs, nil
}
// IsDir implements fs.DirEntry.
-func (tfs *TorrentFs) IsDir() bool {
+func (tfs *TorrentFS) IsDir() bool {
return true
}
// Type implements fs.DirEntry.
-func (tfs *TorrentFs) Type() fs.FileMode {
+func (tfs *TorrentFS) Type() fs.FileMode {
return fs.ModeDir
}
// ModTime implements fs.FileInfo.
-func (tfs *TorrentFs) ModTime() time.Time {
+func (tfs *TorrentFS) ModTime() time.Time {
return time.Time{}
}
// Mode implements fs.FileInfo.
-func (tfs *TorrentFs) Mode() fs.FileMode {
+func (tfs *TorrentFS) Mode() fs.FileMode {
return fs.ModeDir
}
// Size implements fs.FileInfo.
-func (tfs *TorrentFs) Size() int64 {
+func (tfs *TorrentFS) Size() int64 {
return 0
}
// Sys implements fs.FileInfo.
-func (tfs *TorrentFs) Sys() any {
+func (tfs *TorrentFS) Sys() any {
return nil
}
// FsName implements Filesystem.
-func (tfs *TorrentFs) FsName() string {
+func (tfs *TorrentFS) FsName() string {
return "torrentfs"
}
-func (fs *TorrentFs) files(ctx context.Context) (map[string]File, error) {
+func (fs *TorrentFS) files(ctx context.Context) (map[string]File, error) {
fs.mu.Lock()
defer fs.mu.Unlock()
@@ -175,7 +175,7 @@ DEFAULT_DIR:
// return true
// }
-func (fs *TorrentFs) listFilesRecursive(ctx context.Context, vfs Filesystem, start string) (map[string]File, error) {
+func (fs *TorrentFS) listFilesRecursive(ctx context.Context, vfs Filesystem, start string) (map[string]File, error) {
ctx, span := tracer.Start(ctx, "listFilesRecursive",
fs.traceAttrs(attribute.String("start", start)),
)
@@ -206,7 +206,7 @@ func (fs *TorrentFs) listFilesRecursive(ctx context.Context, vfs Filesystem, sta
return out, nil
}
-func (fs *TorrentFs) rawOpen(ctx context.Context, filename string) (file File, err error) {
+func (fs *TorrentFS) rawOpen(ctx context.Context, filename string) (file File, err error) {
ctx, span := tracer.Start(ctx, "rawOpen",
fs.traceAttrs(attribute.String("filename", filename)),
)
@@ -225,7 +225,7 @@ func (fs *TorrentFs) rawOpen(ctx context.Context, filename string) (file File, e
return file, err
}
-func (fs *TorrentFs) rawStat(ctx context.Context, filename string) (fs.FileInfo, error) {
+func (fs *TorrentFS) rawStat(ctx context.Context, filename string) (fs.FileInfo, error) {
ctx, span := tracer.Start(ctx, "rawStat",
fs.traceAttrs(attribute.String("filename", filename)),
)
@@ -243,7 +243,7 @@ func (fs *TorrentFs) rawStat(ctx context.Context, filename string) (fs.FileInfo,
return file.Info()
}
-func (fs *TorrentFs) traceAttrs(add ...attribute.KeyValue) trace.SpanStartOption {
+func (fs *TorrentFS) traceAttrs(add ...attribute.KeyValue) trace.SpanStartOption {
return trace.WithAttributes(append([]attribute.KeyValue{
attribute.String("fs", fs.FsName()),
attribute.String("torrent", fs.Torrent.Name()),
@@ -252,7 +252,7 @@ func (fs *TorrentFs) traceAttrs(add ...attribute.KeyValue) trace.SpanStartOption
}
// Stat implements Filesystem.
-func (tfs *TorrentFs) Stat(ctx context.Context, filename string) (fs.FileInfo, error) {
+func (tfs *TorrentFS) Stat(ctx context.Context, filename string) (fs.FileInfo, error) {
ctx, span := tracer.Start(ctx, "Stat",
tfs.traceAttrs(attribute.String("filename", filename)),
)
@@ -287,7 +287,7 @@ func (tfs *TorrentFs) Stat(ctx context.Context, filename string) (fs.FileInfo, e
return tfs.rawStat(ctx, fsPath)
}
-func (tfs *TorrentFs) Open(ctx context.Context, filename string) (file File, err error) {
+func (tfs *TorrentFS) Open(ctx context.Context, filename string) (file File, err error) {
ctx, span := tracer.Start(ctx, "Open",
tfs.traceAttrs(attribute.String("filename", filename)),
)
@@ -322,7 +322,7 @@ func (tfs *TorrentFs) Open(ctx context.Context, filename string) (file File, err
return tfs.rawOpen(ctx, fsPath)
}
-func (tfs *TorrentFs) ReadDir(ctx context.Context, name string) ([]fs.DirEntry, error) {
+func (tfs *TorrentFS) ReadDir(ctx context.Context, name string) ([]fs.DirEntry, error) {
ctx, span := tracer.Start(ctx, "ReadDir",
tfs.traceAttrs(attribute.String("name", name)),
)
@@ -357,7 +357,7 @@ func (tfs *TorrentFs) ReadDir(ctx context.Context, name string) ([]fs.DirEntry,
return listDirFromFiles(files, fsPath)
}
-func (fs *TorrentFs) Unlink(ctx context.Context, name string) error {
+func (fs *TorrentFS) Unlink(ctx context.Context, name string) error {
ctx, span := tracer.Start(ctx, "Unlink",
fs.traceAttrs(attribute.String("name", name)),
)
diff --git a/ui/.gitignore b/ui/.gitignore
new file mode 100644
index 0000000..29a3a50
--- /dev/null
+++ b/ui/.gitignore
@@ -0,0 +1,43 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/ui/.graphqlrc.yaml b/ui/.graphqlrc.yaml
new file mode 100644
index 0000000..9be136c
--- /dev/null
+++ b/ui/.graphqlrc.yaml
@@ -0,0 +1,5 @@
+schema:
+ - ../graphql/*.graphql
+ - ../graphql/**/*.graphql
+documents:
+ - lib/**
diff --git a/ui/.metadata b/ui/.metadata
new file mode 100644
index 0000000..0ad631d
--- /dev/null
+++ b/ui/.metadata
@@ -0,0 +1,45 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: "29babcb32a591b9e5be8c6a6075d4fe605d46ad3"
+ channel: "beta"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ - platform: android
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ - platform: ios
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ - platform: linux
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ - platform: macos
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ - platform: web
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ - platform: windows
+ create_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+ base_revision: 29babcb32a591b9e5be8c6a6075d4fe605d46ad3
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/ui/README.md b/ui/README.md
new file mode 100644
index 0000000..50b211a
--- /dev/null
+++ b/ui/README.md
@@ -0,0 +1,16 @@
+# tstor_ui
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/ui/analysis_options.yaml b/ui/analysis_options.yaml
new file mode 100644
index 0000000..0d29021
--- /dev/null
+++ b/ui/analysis_options.yaml
@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/ui/android/.gitignore b/ui/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/ui/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/ui/android/app/build.gradle b/ui/android/app/build.gradle
new file mode 100644
index 0000000..76623b8
--- /dev/null
+++ b/ui/android/app/build.gradle
@@ -0,0 +1,58 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id "dev.flutter.flutter-gradle-plugin"
+}
+
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file("local.properties")
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader("UTF-8") { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
+if (flutterVersionCode == null) {
+ flutterVersionCode = "1"
+}
+
+def flutterVersionName = localProperties.getProperty("flutter.versionName")
+if (flutterVersionName == null) {
+ flutterVersionName = "1.0"
+}
+
+android {
+ namespace = "com.example.tstor_ui"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.example.tstor_ui"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
+ versionCode = flutterVersionCode.toInteger()
+ versionName = flutterVersionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig = signingConfigs.debug
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
diff --git a/ui/android/app/src/debug/AndroidManifest.xml b/ui/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/ui/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/ui/android/app/src/main/AndroidManifest.xml b/ui/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..21f7b9e
--- /dev/null
+++ b/ui/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/android/app/src/main/kotlin/com/example/tstor_ui/MainActivity.kt b/ui/android/app/src/main/kotlin/com/example/tstor_ui/MainActivity.kt
new file mode 100644
index 0000000..a697f08
--- /dev/null
+++ b/ui/android/app/src/main/kotlin/com/example/tstor_ui/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.example.tstor_ui
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity()
diff --git a/ui/android/app/src/main/res/drawable-v21/launch_background.xml b/ui/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/ui/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/ui/android/app/src/main/res/drawable/launch_background.xml b/ui/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/ui/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/ui/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/ui/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/ui/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/ui/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/ui/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/ui/android/app/src/main/res/values-night/styles.xml b/ui/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/ui/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/ui/android/app/src/main/res/values/styles.xml b/ui/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/ui/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/ui/android/app/src/profile/AndroidManifest.xml b/ui/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/ui/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/ui/android/build.gradle b/ui/android/build.gradle
new file mode 100644
index 0000000..d2ffbff
--- /dev/null
+++ b/ui/android/build.gradle
@@ -0,0 +1,18 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = "../build"
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("clean", Delete) {
+ delete rootProject.buildDir
+}
diff --git a/ui/android/gradle.properties b/ui/android/gradle.properties
new file mode 100644
index 0000000..3b5b324
--- /dev/null
+++ b/ui/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/ui/android/gradle/wrapper/gradle-wrapper.properties b/ui/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e1ca574
--- /dev/null
+++ b/ui/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
diff --git a/ui/android/settings.gradle b/ui/android/settings.gradle
new file mode 100644
index 0000000..536165d
--- /dev/null
+++ b/ui/android/settings.gradle
@@ -0,0 +1,25 @@
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return flutterSdkPath
+ }()
+
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+plugins {
+ id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+ id "com.android.application" version "7.3.0" apply false
+ id "org.jetbrains.kotlin.android" version "1.7.10" apply false
+}
+
+include ":app"
diff --git a/ui/build.yaml b/ui/build.yaml
new file mode 100644
index 0000000..136c524
--- /dev/null
+++ b/ui/build.yaml
@@ -0,0 +1,15 @@
+targets:
+ $default:
+ builders:
+ graphql_codegen:
+ options:
+ scalars:
+ URL:
+ type: String
+ ID:
+ type: String
+ DateTime:
+ type: DateTime
+ clients:
+ - graphql
+ - graphql_flutter
diff --git a/ui/devtools_options.yaml b/ui/devtools_options.yaml
new file mode 100644
index 0000000..fa0b357
--- /dev/null
+++ b/ui/devtools_options.yaml
@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:
diff --git a/ui/fonts/TIcons.ttf b/ui/fonts/TIcons.ttf
new file mode 100644
index 0000000..81543a7
Binary files /dev/null and b/ui/fonts/TIcons.ttf differ
diff --git a/ui/ios/.gitignore b/ui/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ui/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/ui/ios/Flutter/AppFrameworkInfo.plist b/ui/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..7c56964
--- /dev/null
+++ b/ui/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/ui/ios/Flutter/Debug.xcconfig b/ui/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ui/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ui/ios/Flutter/Release.xcconfig b/ui/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ui/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ui/ios/Runner.xcodeproj/project.pbxproj b/ui/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..de1d473
--- /dev/null
+++ b/ui/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,616 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.tstorUi;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.tstorUi.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Debug;
+ };
+ 331C8089294A63A400263BE5 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.tstorUi.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Release;
+ };
+ 331C808A294A63A400263BE5 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.tstorUi.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.tstorUi;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.tstorUi;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/ui/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ui/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ui/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ui/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..8e3ca5d
--- /dev/null
+++ b/ui/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/ios/Runner.xcworkspace/contents.xcworkspacedata b/ui/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/ui/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ui/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ui/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ui/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ui/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ui/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ui/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ui/ios/Runner/AppDelegate.swift b/ui/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..9074fee
--- /dev/null
+++ b/ui/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import Flutter
+import UIKit
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..0467bf1
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/ui/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/ui/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ui/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/ui/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/ios/Runner/Base.lproj/Main.storyboard b/ui/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/ui/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/ios/Runner/Info.plist b/ui/ios/Runner/Info.plist
new file mode 100644
index 0000000..d6f3cb1
--- /dev/null
+++ b/ui/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Tstor Ui
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ tstor_ui
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/ui/ios/Runner/Runner-Bridging-Header.h b/ui/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ui/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ui/ios/RunnerTests/RunnerTests.swift b/ui/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ui/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/ui/lib/api/client.dart b/ui/lib/api/client.dart
new file mode 100644
index 0000000..d1d92e4
--- /dev/null
+++ b/ui/lib/api/client.dart
@@ -0,0 +1,47 @@
+import 'package:flutter/foundation.dart';
+import 'package:graphql/client.dart';
+
+final client = GraphQLClient(
+ link: _loggerLink.concat(HttpLink("http://localhost:4444/graphql")),
+ cache: GraphQLCache(store: null),
+ defaultPolicies: DefaultPolicies(
+ query: Policies(
+ fetch: FetchPolicy.noCache,
+ ),
+ ),
+);
+
+// final client = GraphQLClient(
+// link: HttpLink("http://192.168.217.150:4444/graphql"),
+// cache: GraphQLCache(store: null),
+// defaultPolicies: DefaultPolicies(
+// query: Policies(
+// fetch: FetchPolicy.noCache,
+// ),
+// ),
+// );
+
+class LoggerLink extends Link {
+ @override
+ Stream request(
+ Request request, [
+ NextLink? forward,
+ ]) {
+ Stream response = forward!(request).map((Response fetchResult) {
+ final ioStreamedResponse = fetchResult.context.entry();
+ if (kDebugMode) {
+ print("Request: ${request.toString()}");
+ print("Response:${ioStreamedResponse?.toString() ?? "null"}");
+ }
+ return fetchResult;
+ }).handleError((error) {
+ throw error;
+ });
+
+ return response;
+ }
+
+ LoggerLink();
+}
+
+final _loggerLink = LoggerLink();
diff --git a/ui/lib/api/fs_entry.graphql b/ui/lib/api/fs_entry.graphql
new file mode 100644
index 0000000..7b8e376
--- /dev/null
+++ b/ui/lib/api/fs_entry.graphql
@@ -0,0 +1,45 @@
+fragment File on File {
+ name
+ size
+}
+
+fragment TorrentDir on TorrentFS {
+ name
+ torrent {
+ name
+ infohash
+ bytesCompleted
+ torrentFilePath
+ bytesMissing
+ }
+}
+
+
+fragment ArchiveDir on ArchiveFS {
+ name
+ size
+}
+
+fragment DirEntry on FsEntry {
+ name
+
+ ...TorrentDir
+ ...ArchiveDir
+ ...File
+}
+
+
+query ListDir($path: String!) {
+ fsEntry(path: $path) {
+ name
+
+ ... on Dir {
+ entries {
+ ...DirEntry
+ }
+ }
+
+ ...TorrentDir
+ ...ArchiveDir
+ }
+}
\ No newline at end of file
diff --git a/ui/lib/api/fs_entry.graphql.dart b/ui/lib/api/fs_entry.graphql.dart
new file mode 100644
index 0000000..8b047a6
--- /dev/null
+++ b/ui/lib/api/fs_entry.graphql.dart
@@ -0,0 +1,4627 @@
+import 'dart:async';
+import 'package:gql/ast.dart';
+import 'package:graphql/client.dart' as graphql;
+import 'package:graphql_flutter/graphql_flutter.dart' as graphql_flutter;
+
+class Fragment$File {
+ Fragment$File({
+ required this.name,
+ required this.size,
+ required this.$__typename,
+ });
+
+ factory Fragment$File.fromJson(Map json) {
+ switch (json["__typename"] as String) {
+ case "SimpleFile":
+ return Fragment$File$$SimpleFile.fromJson(json);
+
+ case "TorrentFileEntry":
+ return Fragment$File$$TorrentFileEntry.fromJson(json);
+
+ default:
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$File(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+ }
+
+ final String name;
+
+ final int size;
+
+ final String $__typename;
+
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$File || runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$File on Fragment$File {
+ CopyWith$Fragment$File get copyWith => CopyWith$Fragment$File(
+ this,
+ (i) => i,
+ );
+ _T when<_T>({
+ required _T Function(Fragment$File$$SimpleFile) simpleFile,
+ required _T Function(Fragment$File$$TorrentFileEntry) torrentFileEntry,
+ required _T Function() orElse,
+ }) {
+ switch ($__typename) {
+ case "SimpleFile":
+ return simpleFile(this as Fragment$File$$SimpleFile);
+
+ case "TorrentFileEntry":
+ return torrentFileEntry(this as Fragment$File$$TorrentFileEntry);
+
+ default:
+ return orElse();
+ }
+ }
+
+ _T maybeWhen<_T>({
+ _T Function(Fragment$File$$SimpleFile)? simpleFile,
+ _T Function(Fragment$File$$TorrentFileEntry)? torrentFileEntry,
+ required _T Function() orElse,
+ }) {
+ switch ($__typename) {
+ case "SimpleFile":
+ if (simpleFile != null) {
+ return simpleFile(this as Fragment$File$$SimpleFile);
+ } else {
+ return orElse();
+ }
+
+ case "TorrentFileEntry":
+ if (torrentFileEntry != null) {
+ return torrentFileEntry(this as Fragment$File$$TorrentFileEntry);
+ } else {
+ return orElse();
+ }
+
+ default:
+ return orElse();
+ }
+ }
+}
+
+abstract class CopyWith$Fragment$File {
+ factory CopyWith$Fragment$File(
+ Fragment$File instance,
+ TRes Function(Fragment$File) then,
+ ) = _CopyWithImpl$Fragment$File;
+
+ factory CopyWith$Fragment$File.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$File;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$File
+ implements CopyWith$Fragment$File {
+ _CopyWithImpl$Fragment$File(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$File _instance;
+
+ final TRes Function(Fragment$File) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$File(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$File
+ implements CopyWith$Fragment$File {
+ _CopyWithStubImpl$Fragment$File(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+const fragmentDefinitionFile = FragmentDefinitionNode(
+ name: NameNode(value: 'File'),
+ typeCondition: TypeConditionNode(
+ on: NamedTypeNode(
+ name: NameNode(value: 'File'),
+ isNonNull: false,
+ )),
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'name'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'size'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+);
+const documentNodeFragmentFile = DocumentNode(definitions: [
+ fragmentDefinitionFile,
+]);
+
+extension ClientExtension$Fragment$File on graphql.GraphQLClient {
+ void writeFragment$File({
+ required Fragment$File data,
+ required Map idFields,
+ bool broadcast = true,
+ }) =>
+ writeFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'File',
+ document: documentNodeFragmentFile,
+ ),
+ ),
+ data: data.toJson(),
+ broadcast: broadcast,
+ );
+ Fragment$File? readFragment$File({
+ required Map idFields,
+ bool optimistic = true,
+ }) {
+ final result = readFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'File',
+ document: documentNodeFragmentFile,
+ ),
+ ),
+ optimistic: optimistic,
+ );
+ return result == null ? null : Fragment$File.fromJson(result);
+ }
+}
+
+class Fragment$File$$SimpleFile implements Fragment$File {
+ Fragment$File$$SimpleFile({
+ required this.name,
+ required this.size,
+ this.$__typename = 'SimpleFile',
+ });
+
+ factory Fragment$File$$SimpleFile.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$File$$SimpleFile(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final int size;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$File$$SimpleFile ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$File$$SimpleFile
+ on Fragment$File$$SimpleFile {
+ CopyWith$Fragment$File$$SimpleFile get copyWith =>
+ CopyWith$Fragment$File$$SimpleFile(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$File$$SimpleFile {
+ factory CopyWith$Fragment$File$$SimpleFile(
+ Fragment$File$$SimpleFile instance,
+ TRes Function(Fragment$File$$SimpleFile) then,
+ ) = _CopyWithImpl$Fragment$File$$SimpleFile;
+
+ factory CopyWith$Fragment$File$$SimpleFile.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$File$$SimpleFile;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$File$$SimpleFile
+ implements CopyWith$Fragment$File$$SimpleFile {
+ _CopyWithImpl$Fragment$File$$SimpleFile(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$File$$SimpleFile _instance;
+
+ final TRes Function(Fragment$File$$SimpleFile) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$File$$SimpleFile(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$File$$SimpleFile
+ implements CopyWith$Fragment$File$$SimpleFile {
+ _CopyWithStubImpl$Fragment$File$$SimpleFile(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$File$$TorrentFileEntry implements Fragment$File {
+ Fragment$File$$TorrentFileEntry({
+ required this.name,
+ required this.size,
+ this.$__typename = 'TorrentFileEntry',
+ });
+
+ factory Fragment$File$$TorrentFileEntry.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$File$$TorrentFileEntry(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final int size;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$File$$TorrentFileEntry ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$File$$TorrentFileEntry
+ on Fragment$File$$TorrentFileEntry {
+ CopyWith$Fragment$File$$TorrentFileEntry
+ get copyWith => CopyWith$Fragment$File$$TorrentFileEntry(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$File$$TorrentFileEntry {
+ factory CopyWith$Fragment$File$$TorrentFileEntry(
+ Fragment$File$$TorrentFileEntry instance,
+ TRes Function(Fragment$File$$TorrentFileEntry) then,
+ ) = _CopyWithImpl$Fragment$File$$TorrentFileEntry;
+
+ factory CopyWith$Fragment$File$$TorrentFileEntry.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$File$$TorrentFileEntry;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$File$$TorrentFileEntry
+ implements CopyWith$Fragment$File$$TorrentFileEntry {
+ _CopyWithImpl$Fragment$File$$TorrentFileEntry(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$File$$TorrentFileEntry _instance;
+
+ final TRes Function(Fragment$File$$TorrentFileEntry) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$File$$TorrentFileEntry(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$File$$TorrentFileEntry
+ implements CopyWith$Fragment$File$$TorrentFileEntry {
+ _CopyWithStubImpl$Fragment$File$$TorrentFileEntry(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$TorrentDir {
+ Fragment$TorrentDir({
+ required this.name,
+ required this.torrent,
+ this.$__typename = 'TorrentFS',
+ });
+
+ factory Fragment$TorrentDir.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$torrent = json['torrent'];
+ final l$$__typename = json['__typename'];
+ return Fragment$TorrentDir(
+ name: (l$name as String),
+ torrent: Fragment$TorrentDir$torrent.fromJson(
+ (l$torrent as Map)),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ final String name;
+
+ final Fragment$TorrentDir$torrent torrent;
+
+ final String $__typename;
+
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$torrent = torrent;
+ resultData['torrent'] = l$torrent.toJson();
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$torrent = torrent;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$torrent,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$TorrentDir || runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$torrent = torrent;
+ final lOther$torrent = other.torrent;
+ if (l$torrent != lOther$torrent) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$TorrentDir on Fragment$TorrentDir {
+ CopyWith$Fragment$TorrentDir get copyWith =>
+ CopyWith$Fragment$TorrentDir(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$TorrentDir {
+ factory CopyWith$Fragment$TorrentDir(
+ Fragment$TorrentDir instance,
+ TRes Function(Fragment$TorrentDir) then,
+ ) = _CopyWithImpl$Fragment$TorrentDir;
+
+ factory CopyWith$Fragment$TorrentDir.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$TorrentDir;
+
+ TRes call({
+ String? name,
+ Fragment$TorrentDir$torrent? torrent,
+ String? $__typename,
+ });
+ CopyWith$Fragment$TorrentDir$torrent get torrent;
+}
+
+class _CopyWithImpl$Fragment$TorrentDir
+ implements CopyWith$Fragment$TorrentDir {
+ _CopyWithImpl$Fragment$TorrentDir(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$TorrentDir _instance;
+
+ final TRes Function(Fragment$TorrentDir) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? torrent = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$TorrentDir(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ torrent: torrent == _undefined || torrent == null
+ ? _instance.torrent
+ : (torrent as Fragment$TorrentDir$torrent),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+
+ @override
+ CopyWith$Fragment$TorrentDir$torrent get torrent {
+ final local$torrent = _instance.torrent;
+ return CopyWith$Fragment$TorrentDir$torrent(
+ local$torrent, (e) => call(torrent: e));
+ }
+}
+
+class _CopyWithStubImpl$Fragment$TorrentDir
+ implements CopyWith$Fragment$TorrentDir {
+ _CopyWithStubImpl$Fragment$TorrentDir(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ Fragment$TorrentDir$torrent? torrent,
+ String? $__typename,
+ }) =>
+ _res;
+
+ @override
+ CopyWith$Fragment$TorrentDir$torrent get torrent =>
+ CopyWith$Fragment$TorrentDir$torrent.stub(_res);
+}
+
+const fragmentDefinitionTorrentDir = FragmentDefinitionNode(
+ name: NameNode(value: 'TorrentDir'),
+ typeCondition: TypeConditionNode(
+ on: NamedTypeNode(
+ name: NameNode(value: 'TorrentFS'),
+ isNonNull: false,
+ )),
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'name'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'torrent'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'name'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'infohash'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'bytesCompleted'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'torrentFilePath'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'bytesMissing'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+);
+const documentNodeFragmentTorrentDir = DocumentNode(definitions: [
+ fragmentDefinitionTorrentDir,
+]);
+
+extension ClientExtension$Fragment$TorrentDir on graphql.GraphQLClient {
+ void writeFragment$TorrentDir({
+ required Fragment$TorrentDir data,
+ required Map idFields,
+ bool broadcast = true,
+ }) =>
+ writeFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'TorrentDir',
+ document: documentNodeFragmentTorrentDir,
+ ),
+ ),
+ data: data.toJson(),
+ broadcast: broadcast,
+ );
+ Fragment$TorrentDir? readFragment$TorrentDir({
+ required Map idFields,
+ bool optimistic = true,
+ }) {
+ final result = readFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'TorrentDir',
+ document: documentNodeFragmentTorrentDir,
+ ),
+ ),
+ optimistic: optimistic,
+ );
+ return result == null ? null : Fragment$TorrentDir.fromJson(result);
+ }
+}
+
+class Fragment$TorrentDir$torrent {
+ Fragment$TorrentDir$torrent({
+ required this.name,
+ required this.infohash,
+ required this.bytesCompleted,
+ required this.torrentFilePath,
+ required this.bytesMissing,
+ this.$__typename = 'Torrent',
+ });
+
+ factory Fragment$TorrentDir$torrent.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$infohash = json['infohash'];
+ final l$bytesCompleted = json['bytesCompleted'];
+ final l$torrentFilePath = json['torrentFilePath'];
+ final l$bytesMissing = json['bytesMissing'];
+ final l$$__typename = json['__typename'];
+ return Fragment$TorrentDir$torrent(
+ name: (l$name as String),
+ infohash: (l$infohash as String),
+ bytesCompleted: (l$bytesCompleted as int),
+ torrentFilePath: (l$torrentFilePath as String),
+ bytesMissing: (l$bytesMissing as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ final String name;
+
+ final String infohash;
+
+ final int bytesCompleted;
+
+ final String torrentFilePath;
+
+ final int bytesMissing;
+
+ final String $__typename;
+
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$infohash = infohash;
+ resultData['infohash'] = l$infohash;
+ final l$bytesCompleted = bytesCompleted;
+ resultData['bytesCompleted'] = l$bytesCompleted;
+ final l$torrentFilePath = torrentFilePath;
+ resultData['torrentFilePath'] = l$torrentFilePath;
+ final l$bytesMissing = bytesMissing;
+ resultData['bytesMissing'] = l$bytesMissing;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$infohash = infohash;
+ final l$bytesCompleted = bytesCompleted;
+ final l$torrentFilePath = torrentFilePath;
+ final l$bytesMissing = bytesMissing;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$infohash,
+ l$bytesCompleted,
+ l$torrentFilePath,
+ l$bytesMissing,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$TorrentDir$torrent ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$infohash = infohash;
+ final lOther$infohash = other.infohash;
+ if (l$infohash != lOther$infohash) {
+ return false;
+ }
+ final l$bytesCompleted = bytesCompleted;
+ final lOther$bytesCompleted = other.bytesCompleted;
+ if (l$bytesCompleted != lOther$bytesCompleted) {
+ return false;
+ }
+ final l$torrentFilePath = torrentFilePath;
+ final lOther$torrentFilePath = other.torrentFilePath;
+ if (l$torrentFilePath != lOther$torrentFilePath) {
+ return false;
+ }
+ final l$bytesMissing = bytesMissing;
+ final lOther$bytesMissing = other.bytesMissing;
+ if (l$bytesMissing != lOther$bytesMissing) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$TorrentDir$torrent
+ on Fragment$TorrentDir$torrent {
+ CopyWith$Fragment$TorrentDir$torrent
+ get copyWith => CopyWith$Fragment$TorrentDir$torrent(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$TorrentDir$torrent {
+ factory CopyWith$Fragment$TorrentDir$torrent(
+ Fragment$TorrentDir$torrent instance,
+ TRes Function(Fragment$TorrentDir$torrent) then,
+ ) = _CopyWithImpl$Fragment$TorrentDir$torrent;
+
+ factory CopyWith$Fragment$TorrentDir$torrent.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$TorrentDir$torrent;
+
+ TRes call({
+ String? name,
+ String? infohash,
+ int? bytesCompleted,
+ String? torrentFilePath,
+ int? bytesMissing,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$TorrentDir$torrent
+ implements CopyWith$Fragment$TorrentDir$torrent {
+ _CopyWithImpl$Fragment$TorrentDir$torrent(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$TorrentDir$torrent _instance;
+
+ final TRes Function(Fragment$TorrentDir$torrent) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? infohash = _undefined,
+ Object? bytesCompleted = _undefined,
+ Object? torrentFilePath = _undefined,
+ Object? bytesMissing = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$TorrentDir$torrent(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ infohash: infohash == _undefined || infohash == null
+ ? _instance.infohash
+ : (infohash as String),
+ bytesCompleted: bytesCompleted == _undefined || bytesCompleted == null
+ ? _instance.bytesCompleted
+ : (bytesCompleted as int),
+ torrentFilePath:
+ torrentFilePath == _undefined || torrentFilePath == null
+ ? _instance.torrentFilePath
+ : (torrentFilePath as String),
+ bytesMissing: bytesMissing == _undefined || bytesMissing == null
+ ? _instance.bytesMissing
+ : (bytesMissing as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$TorrentDir$torrent
+ implements CopyWith$Fragment$TorrentDir$torrent {
+ _CopyWithStubImpl$Fragment$TorrentDir$torrent(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ String? infohash,
+ int? bytesCompleted,
+ String? torrentFilePath,
+ int? bytesMissing,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$ArchiveDir {
+ Fragment$ArchiveDir({
+ required this.name,
+ required this.size,
+ this.$__typename = 'ArchiveFS',
+ });
+
+ factory Fragment$ArchiveDir.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$ArchiveDir(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ final String name;
+
+ final int size;
+
+ final String $__typename;
+
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$ArchiveDir || runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$ArchiveDir on Fragment$ArchiveDir {
+ CopyWith$Fragment$ArchiveDir get copyWith =>
+ CopyWith$Fragment$ArchiveDir(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$ArchiveDir {
+ factory CopyWith$Fragment$ArchiveDir(
+ Fragment$ArchiveDir instance,
+ TRes Function(Fragment$ArchiveDir) then,
+ ) = _CopyWithImpl$Fragment$ArchiveDir;
+
+ factory CopyWith$Fragment$ArchiveDir.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$ArchiveDir;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$ArchiveDir
+ implements CopyWith$Fragment$ArchiveDir {
+ _CopyWithImpl$Fragment$ArchiveDir(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$ArchiveDir _instance;
+
+ final TRes Function(Fragment$ArchiveDir) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$ArchiveDir(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$ArchiveDir
+ implements CopyWith$Fragment$ArchiveDir {
+ _CopyWithStubImpl$Fragment$ArchiveDir(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+const fragmentDefinitionArchiveDir = FragmentDefinitionNode(
+ name: NameNode(value: 'ArchiveDir'),
+ typeCondition: TypeConditionNode(
+ on: NamedTypeNode(
+ name: NameNode(value: 'ArchiveFS'),
+ isNonNull: false,
+ )),
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'name'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: 'size'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+);
+const documentNodeFragmentArchiveDir = DocumentNode(definitions: [
+ fragmentDefinitionArchiveDir,
+]);
+
+extension ClientExtension$Fragment$ArchiveDir on graphql.GraphQLClient {
+ void writeFragment$ArchiveDir({
+ required Fragment$ArchiveDir data,
+ required Map idFields,
+ bool broadcast = true,
+ }) =>
+ writeFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'ArchiveDir',
+ document: documentNodeFragmentArchiveDir,
+ ),
+ ),
+ data: data.toJson(),
+ broadcast: broadcast,
+ );
+ Fragment$ArchiveDir? readFragment$ArchiveDir({
+ required Map idFields,
+ bool optimistic = true,
+ }) {
+ final result = readFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'ArchiveDir',
+ document: documentNodeFragmentArchiveDir,
+ ),
+ ),
+ optimistic: optimistic,
+ );
+ return result == null ? null : Fragment$ArchiveDir.fromJson(result);
+ }
+}
+
+class Fragment$DirEntry {
+ Fragment$DirEntry({
+ required this.name,
+ required this.$__typename,
+ });
+
+ factory Fragment$DirEntry.fromJson(Map json) {
+ switch (json["__typename"] as String) {
+ case "ArchiveFS":
+ return Fragment$DirEntry$$ArchiveFS.fromJson(json);
+
+ case "ResolverFS":
+ return Fragment$DirEntry$$ResolverFS.fromJson(json);
+
+ case "SimpleDir":
+ return Fragment$DirEntry$$SimpleDir.fromJson(json);
+
+ case "SimpleFile":
+ return Fragment$DirEntry$$SimpleFile.fromJson(json);
+
+ case "TorrentFS":
+ return Fragment$DirEntry$$TorrentFS.fromJson(json);
+
+ case "TorrentFileEntry":
+ return Fragment$DirEntry$$TorrentFileEntry.fromJson(json);
+
+ default:
+ final l$name = json['name'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry(
+ name: (l$name as String),
+ $__typename: (l$$__typename as String),
+ );
+ }
+ }
+
+ final String name;
+
+ final String $__typename;
+
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry || runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry on Fragment$DirEntry {
+ CopyWith$Fragment$DirEntry get copyWith =>
+ CopyWith$Fragment$DirEntry(
+ this,
+ (i) => i,
+ );
+ _T when<_T>({
+ required _T Function(Fragment$DirEntry$$ArchiveFS) archiveFS,
+ required _T Function(Fragment$DirEntry$$ResolverFS) resolverFS,
+ required _T Function(Fragment$DirEntry$$SimpleDir) simpleDir,
+ required _T Function(Fragment$DirEntry$$SimpleFile) simpleFile,
+ required _T Function(Fragment$DirEntry$$TorrentFS) torrentFS,
+ required _T Function(Fragment$DirEntry$$TorrentFileEntry) torrentFileEntry,
+ required _T Function() orElse,
+ }) {
+ switch ($__typename) {
+ case "ArchiveFS":
+ return archiveFS(this as Fragment$DirEntry$$ArchiveFS);
+
+ case "ResolverFS":
+ return resolverFS(this as Fragment$DirEntry$$ResolverFS);
+
+ case "SimpleDir":
+ return simpleDir(this as Fragment$DirEntry$$SimpleDir);
+
+ case "SimpleFile":
+ return simpleFile(this as Fragment$DirEntry$$SimpleFile);
+
+ case "TorrentFS":
+ return torrentFS(this as Fragment$DirEntry$$TorrentFS);
+
+ case "TorrentFileEntry":
+ return torrentFileEntry(this as Fragment$DirEntry$$TorrentFileEntry);
+
+ default:
+ return orElse();
+ }
+ }
+
+ _T maybeWhen<_T>({
+ _T Function(Fragment$DirEntry$$ArchiveFS)? archiveFS,
+ _T Function(Fragment$DirEntry$$ResolverFS)? resolverFS,
+ _T Function(Fragment$DirEntry$$SimpleDir)? simpleDir,
+ _T Function(Fragment$DirEntry$$SimpleFile)? simpleFile,
+ _T Function(Fragment$DirEntry$$TorrentFS)? torrentFS,
+ _T Function(Fragment$DirEntry$$TorrentFileEntry)? torrentFileEntry,
+ required _T Function() orElse,
+ }) {
+ switch ($__typename) {
+ case "ArchiveFS":
+ if (archiveFS != null) {
+ return archiveFS(this as Fragment$DirEntry$$ArchiveFS);
+ } else {
+ return orElse();
+ }
+
+ case "ResolverFS":
+ if (resolverFS != null) {
+ return resolverFS(this as Fragment$DirEntry$$ResolverFS);
+ } else {
+ return orElse();
+ }
+
+ case "SimpleDir":
+ if (simpleDir != null) {
+ return simpleDir(this as Fragment$DirEntry$$SimpleDir);
+ } else {
+ return orElse();
+ }
+
+ case "SimpleFile":
+ if (simpleFile != null) {
+ return simpleFile(this as Fragment$DirEntry$$SimpleFile);
+ } else {
+ return orElse();
+ }
+
+ case "TorrentFS":
+ if (torrentFS != null) {
+ return torrentFS(this as Fragment$DirEntry$$TorrentFS);
+ } else {
+ return orElse();
+ }
+
+ case "TorrentFileEntry":
+ if (torrentFileEntry != null) {
+ return torrentFileEntry(this as Fragment$DirEntry$$TorrentFileEntry);
+ } else {
+ return orElse();
+ }
+
+ default:
+ return orElse();
+ }
+ }
+}
+
+abstract class CopyWith$Fragment$DirEntry {
+ factory CopyWith$Fragment$DirEntry(
+ Fragment$DirEntry instance,
+ TRes Function(Fragment$DirEntry) then,
+ ) = _CopyWithImpl$Fragment$DirEntry;
+
+ factory CopyWith$Fragment$DirEntry.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry;
+
+ TRes call({
+ String? name,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry
+ implements CopyWith$Fragment$DirEntry {
+ _CopyWithImpl$Fragment$DirEntry(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry _instance;
+
+ final TRes Function(Fragment$DirEntry) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry
+ implements CopyWith$Fragment$DirEntry {
+ _CopyWithStubImpl$Fragment$DirEntry(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+const fragmentDefinitionDirEntry = FragmentDefinitionNode(
+ name: NameNode(value: 'DirEntry'),
+ typeCondition: TypeConditionNode(
+ on: NamedTypeNode(
+ name: NameNode(value: 'FsEntry'),
+ isNonNull: false,
+ )),
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'name'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ FragmentSpreadNode(
+ name: NameNode(value: 'TorrentDir'),
+ directives: [],
+ ),
+ FragmentSpreadNode(
+ name: NameNode(value: 'ArchiveDir'),
+ directives: [],
+ ),
+ FragmentSpreadNode(
+ name: NameNode(value: 'File'),
+ directives: [],
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+);
+const documentNodeFragmentDirEntry = DocumentNode(definitions: [
+ fragmentDefinitionDirEntry,
+ fragmentDefinitionTorrentDir,
+ fragmentDefinitionArchiveDir,
+ fragmentDefinitionFile,
+]);
+
+extension ClientExtension$Fragment$DirEntry on graphql.GraphQLClient {
+ void writeFragment$DirEntry({
+ required Fragment$DirEntry data,
+ required Map idFields,
+ bool broadcast = true,
+ }) =>
+ writeFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'DirEntry',
+ document: documentNodeFragmentDirEntry,
+ ),
+ ),
+ data: data.toJson(),
+ broadcast: broadcast,
+ );
+ Fragment$DirEntry? readFragment$DirEntry({
+ required Map idFields,
+ bool optimistic = true,
+ }) {
+ final result = readFragment(
+ graphql.FragmentRequest(
+ idFields: idFields,
+ fragment: const graphql.Fragment(
+ fragmentName: 'DirEntry',
+ document: documentNodeFragmentDirEntry,
+ ),
+ ),
+ optimistic: optimistic,
+ );
+ return result == null ? null : Fragment$DirEntry.fromJson(result);
+ }
+}
+
+class Fragment$DirEntry$$ArchiveFS
+ implements Fragment$ArchiveDir, Fragment$DirEntry {
+ Fragment$DirEntry$$ArchiveFS({
+ required this.name,
+ required this.size,
+ this.$__typename = 'ArchiveFS',
+ });
+
+ factory Fragment$DirEntry$$ArchiveFS.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$ArchiveFS(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final int size;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$ArchiveFS ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$ArchiveFS
+ on Fragment$DirEntry$$ArchiveFS {
+ CopyWith$Fragment$DirEntry$$ArchiveFS
+ get copyWith => CopyWith$Fragment$DirEntry$$ArchiveFS(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$ArchiveFS {
+ factory CopyWith$Fragment$DirEntry$$ArchiveFS(
+ Fragment$DirEntry$$ArchiveFS instance,
+ TRes Function(Fragment$DirEntry$$ArchiveFS) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$ArchiveFS;
+
+ factory CopyWith$Fragment$DirEntry$$ArchiveFS.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$ArchiveFS;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$ArchiveFS
+ implements CopyWith$Fragment$DirEntry$$ArchiveFS {
+ _CopyWithImpl$Fragment$DirEntry$$ArchiveFS(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$ArchiveFS _instance;
+
+ final TRes Function(Fragment$DirEntry$$ArchiveFS) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$ArchiveFS(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$ArchiveFS
+ implements CopyWith$Fragment$DirEntry$$ArchiveFS {
+ _CopyWithStubImpl$Fragment$DirEntry$$ArchiveFS(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$DirEntry$$ResolverFS implements Fragment$DirEntry {
+ Fragment$DirEntry$$ResolverFS({
+ required this.name,
+ this.$__typename = 'ResolverFS',
+ });
+
+ factory Fragment$DirEntry$$ResolverFS.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$ResolverFS(
+ name: (l$name as String),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$ResolverFS ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$ResolverFS
+ on Fragment$DirEntry$$ResolverFS {
+ CopyWith$Fragment$DirEntry$$ResolverFS
+ get copyWith => CopyWith$Fragment$DirEntry$$ResolverFS(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$ResolverFS {
+ factory CopyWith$Fragment$DirEntry$$ResolverFS(
+ Fragment$DirEntry$$ResolverFS instance,
+ TRes Function(Fragment$DirEntry$$ResolverFS) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$ResolverFS;
+
+ factory CopyWith$Fragment$DirEntry$$ResolverFS.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$ResolverFS;
+
+ TRes call({
+ String? name,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$ResolverFS
+ implements CopyWith$Fragment$DirEntry$$ResolverFS {
+ _CopyWithImpl$Fragment$DirEntry$$ResolverFS(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$ResolverFS _instance;
+
+ final TRes Function(Fragment$DirEntry$$ResolverFS) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$ResolverFS(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$ResolverFS
+ implements CopyWith$Fragment$DirEntry$$ResolverFS {
+ _CopyWithStubImpl$Fragment$DirEntry$$ResolverFS(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$DirEntry$$SimpleDir implements Fragment$DirEntry {
+ Fragment$DirEntry$$SimpleDir({
+ required this.name,
+ this.$__typename = 'SimpleDir',
+ });
+
+ factory Fragment$DirEntry$$SimpleDir.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$SimpleDir(
+ name: (l$name as String),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$SimpleDir ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$SimpleDir
+ on Fragment$DirEntry$$SimpleDir {
+ CopyWith$Fragment$DirEntry$$SimpleDir
+ get copyWith => CopyWith$Fragment$DirEntry$$SimpleDir(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$SimpleDir {
+ factory CopyWith$Fragment$DirEntry$$SimpleDir(
+ Fragment$DirEntry$$SimpleDir instance,
+ TRes Function(Fragment$DirEntry$$SimpleDir) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$SimpleDir;
+
+ factory CopyWith$Fragment$DirEntry$$SimpleDir.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$SimpleDir;
+
+ TRes call({
+ String? name,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$SimpleDir
+ implements CopyWith$Fragment$DirEntry$$SimpleDir {
+ _CopyWithImpl$Fragment$DirEntry$$SimpleDir(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$SimpleDir _instance;
+
+ final TRes Function(Fragment$DirEntry$$SimpleDir) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$SimpleDir(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$SimpleDir
+ implements CopyWith$Fragment$DirEntry$$SimpleDir {
+ _CopyWithStubImpl$Fragment$DirEntry$$SimpleDir(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$DirEntry$$SimpleFile
+ implements Fragment$File$$SimpleFile, Fragment$DirEntry {
+ Fragment$DirEntry$$SimpleFile({
+ required this.name,
+ required this.size,
+ this.$__typename = 'SimpleFile',
+ });
+
+ factory Fragment$DirEntry$$SimpleFile.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$SimpleFile(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final int size;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$SimpleFile ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$SimpleFile
+ on Fragment$DirEntry$$SimpleFile {
+ CopyWith$Fragment$DirEntry$$SimpleFile
+ get copyWith => CopyWith$Fragment$DirEntry$$SimpleFile(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$SimpleFile {
+ factory CopyWith$Fragment$DirEntry$$SimpleFile(
+ Fragment$DirEntry$$SimpleFile instance,
+ TRes Function(Fragment$DirEntry$$SimpleFile) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$SimpleFile;
+
+ factory CopyWith$Fragment$DirEntry$$SimpleFile.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$SimpleFile;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$SimpleFile
+ implements CopyWith$Fragment$DirEntry$$SimpleFile {
+ _CopyWithImpl$Fragment$DirEntry$$SimpleFile(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$SimpleFile _instance;
+
+ final TRes Function(Fragment$DirEntry$$SimpleFile) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$SimpleFile(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$SimpleFile
+ implements CopyWith$Fragment$DirEntry$$SimpleFile {
+ _CopyWithStubImpl$Fragment$DirEntry$$SimpleFile(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$DirEntry$$TorrentFS
+ implements Fragment$TorrentDir, Fragment$DirEntry {
+ Fragment$DirEntry$$TorrentFS({
+ required this.name,
+ required this.torrent,
+ this.$__typename = 'TorrentFS',
+ });
+
+ factory Fragment$DirEntry$$TorrentFS.fromJson(Map json) {
+ final l$name = json['name'];
+ final l$torrent = json['torrent'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$TorrentFS(
+ name: (l$name as String),
+ torrent: Fragment$DirEntry$$TorrentFS$torrent.fromJson(
+ (l$torrent as Map)),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final Fragment$DirEntry$$TorrentFS$torrent torrent;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$torrent = torrent;
+ resultData['torrent'] = l$torrent.toJson();
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$torrent = torrent;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$torrent,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$TorrentFS ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$torrent = torrent;
+ final lOther$torrent = other.torrent;
+ if (l$torrent != lOther$torrent) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$TorrentFS
+ on Fragment$DirEntry$$TorrentFS {
+ CopyWith$Fragment$DirEntry$$TorrentFS
+ get copyWith => CopyWith$Fragment$DirEntry$$TorrentFS(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$TorrentFS {
+ factory CopyWith$Fragment$DirEntry$$TorrentFS(
+ Fragment$DirEntry$$TorrentFS instance,
+ TRes Function(Fragment$DirEntry$$TorrentFS) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$TorrentFS;
+
+ factory CopyWith$Fragment$DirEntry$$TorrentFS.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS;
+
+ TRes call({
+ String? name,
+ Fragment$DirEntry$$TorrentFS$torrent? torrent,
+ String? $__typename,
+ });
+ CopyWith$Fragment$DirEntry$$TorrentFS$torrent get torrent;
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$TorrentFS
+ implements CopyWith$Fragment$DirEntry$$TorrentFS {
+ _CopyWithImpl$Fragment$DirEntry$$TorrentFS(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$TorrentFS _instance;
+
+ final TRes Function(Fragment$DirEntry$$TorrentFS) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? torrent = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$TorrentFS(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ torrent: torrent == _undefined || torrent == null
+ ? _instance.torrent
+ : (torrent as Fragment$DirEntry$$TorrentFS$torrent),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+
+ @override
+ CopyWith$Fragment$DirEntry$$TorrentFS$torrent get torrent {
+ final local$torrent = _instance.torrent;
+ return CopyWith$Fragment$DirEntry$$TorrentFS$torrent(
+ local$torrent, (e) => call(torrent: e));
+ }
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS
+ implements CopyWith$Fragment$DirEntry$$TorrentFS {
+ _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ Fragment$DirEntry$$TorrentFS$torrent? torrent,
+ String? $__typename,
+ }) =>
+ _res;
+
+ @override
+ CopyWith$Fragment$DirEntry$$TorrentFS$torrent get torrent =>
+ CopyWith$Fragment$DirEntry$$TorrentFS$torrent.stub(_res);
+}
+
+class Fragment$DirEntry$$TorrentFS$torrent
+ implements Fragment$TorrentDir$torrent {
+ Fragment$DirEntry$$TorrentFS$torrent({
+ required this.name,
+ required this.infohash,
+ required this.bytesCompleted,
+ required this.torrentFilePath,
+ required this.bytesMissing,
+ this.$__typename = 'Torrent',
+ });
+
+ factory Fragment$DirEntry$$TorrentFS$torrent.fromJson(
+ Map json) {
+ final l$name = json['name'];
+ final l$infohash = json['infohash'];
+ final l$bytesCompleted = json['bytesCompleted'];
+ final l$torrentFilePath = json['torrentFilePath'];
+ final l$bytesMissing = json['bytesMissing'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$TorrentFS$torrent(
+ name: (l$name as String),
+ infohash: (l$infohash as String),
+ bytesCompleted: (l$bytesCompleted as int),
+ torrentFilePath: (l$torrentFilePath as String),
+ bytesMissing: (l$bytesMissing as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final String infohash;
+
+ @override
+ final int bytesCompleted;
+
+ @override
+ final String torrentFilePath;
+
+ @override
+ final int bytesMissing;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$infohash = infohash;
+ resultData['infohash'] = l$infohash;
+ final l$bytesCompleted = bytesCompleted;
+ resultData['bytesCompleted'] = l$bytesCompleted;
+ final l$torrentFilePath = torrentFilePath;
+ resultData['torrentFilePath'] = l$torrentFilePath;
+ final l$bytesMissing = bytesMissing;
+ resultData['bytesMissing'] = l$bytesMissing;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$infohash = infohash;
+ final l$bytesCompleted = bytesCompleted;
+ final l$torrentFilePath = torrentFilePath;
+ final l$bytesMissing = bytesMissing;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$infohash,
+ l$bytesCompleted,
+ l$torrentFilePath,
+ l$bytesMissing,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$TorrentFS$torrent ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$infohash = infohash;
+ final lOther$infohash = other.infohash;
+ if (l$infohash != lOther$infohash) {
+ return false;
+ }
+ final l$bytesCompleted = bytesCompleted;
+ final lOther$bytesCompleted = other.bytesCompleted;
+ if (l$bytesCompleted != lOther$bytesCompleted) {
+ return false;
+ }
+ final l$torrentFilePath = torrentFilePath;
+ final lOther$torrentFilePath = other.torrentFilePath;
+ if (l$torrentFilePath != lOther$torrentFilePath) {
+ return false;
+ }
+ final l$bytesMissing = bytesMissing;
+ final lOther$bytesMissing = other.bytesMissing;
+ if (l$bytesMissing != lOther$bytesMissing) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$TorrentFS$torrent
+ on Fragment$DirEntry$$TorrentFS$torrent {
+ CopyWith$Fragment$DirEntry$$TorrentFS$torrent<
+ Fragment$DirEntry$$TorrentFS$torrent>
+ get copyWith => CopyWith$Fragment$DirEntry$$TorrentFS$torrent(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$TorrentFS$torrent {
+ factory CopyWith$Fragment$DirEntry$$TorrentFS$torrent(
+ Fragment$DirEntry$$TorrentFS$torrent instance,
+ TRes Function(Fragment$DirEntry$$TorrentFS$torrent) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$TorrentFS$torrent;
+
+ factory CopyWith$Fragment$DirEntry$$TorrentFS$torrent.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS$torrent;
+
+ TRes call({
+ String? name,
+ String? infohash,
+ int? bytesCompleted,
+ String? torrentFilePath,
+ int? bytesMissing,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$TorrentFS$torrent
+ implements CopyWith$Fragment$DirEntry$$TorrentFS$torrent {
+ _CopyWithImpl$Fragment$DirEntry$$TorrentFS$torrent(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$TorrentFS$torrent _instance;
+
+ final TRes Function(Fragment$DirEntry$$TorrentFS$torrent) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? infohash = _undefined,
+ Object? bytesCompleted = _undefined,
+ Object? torrentFilePath = _undefined,
+ Object? bytesMissing = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$TorrentFS$torrent(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ infohash: infohash == _undefined || infohash == null
+ ? _instance.infohash
+ : (infohash as String),
+ bytesCompleted: bytesCompleted == _undefined || bytesCompleted == null
+ ? _instance.bytesCompleted
+ : (bytesCompleted as int),
+ torrentFilePath:
+ torrentFilePath == _undefined || torrentFilePath == null
+ ? _instance.torrentFilePath
+ : (torrentFilePath as String),
+ bytesMissing: bytesMissing == _undefined || bytesMissing == null
+ ? _instance.bytesMissing
+ : (bytesMissing as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS$torrent
+ implements CopyWith$Fragment$DirEntry$$TorrentFS$torrent {
+ _CopyWithStubImpl$Fragment$DirEntry$$TorrentFS$torrent(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ String? infohash,
+ int? bytesCompleted,
+ String? torrentFilePath,
+ int? bytesMissing,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Fragment$DirEntry$$TorrentFileEntry
+ implements Fragment$File$$TorrentFileEntry, Fragment$DirEntry {
+ Fragment$DirEntry$$TorrentFileEntry({
+ required this.name,
+ required this.size,
+ this.$__typename = 'TorrentFileEntry',
+ });
+
+ factory Fragment$DirEntry$$TorrentFileEntry.fromJson(
+ Map json) {
+ final l$name = json['name'];
+ final l$size = json['size'];
+ final l$$__typename = json['__typename'];
+ return Fragment$DirEntry$$TorrentFileEntry(
+ name: (l$name as String),
+ size: (l$size as int),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ @override
+ final String name;
+
+ @override
+ final int size;
+
+ @override
+ final String $__typename;
+
+ @override
+ Map toJson() {
+ final resultData = {};
+ final l$name = name;
+ resultData['name'] = l$name;
+ final l$size = size;
+ resultData['size'] = l$size;
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$name = name;
+ final l$size = size;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$name,
+ l$size,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Fragment$DirEntry$$TorrentFileEntry ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$name = name;
+ final lOther$name = other.name;
+ if (l$name != lOther$name) {
+ return false;
+ }
+ final l$size = size;
+ final lOther$size = other.size;
+ if (l$size != lOther$size) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Fragment$DirEntry$$TorrentFileEntry
+ on Fragment$DirEntry$$TorrentFileEntry {
+ CopyWith$Fragment$DirEntry$$TorrentFileEntry<
+ Fragment$DirEntry$$TorrentFileEntry>
+ get copyWith => CopyWith$Fragment$DirEntry$$TorrentFileEntry(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Fragment$DirEntry$$TorrentFileEntry {
+ factory CopyWith$Fragment$DirEntry$$TorrentFileEntry(
+ Fragment$DirEntry$$TorrentFileEntry instance,
+ TRes Function(Fragment$DirEntry$$TorrentFileEntry) then,
+ ) = _CopyWithImpl$Fragment$DirEntry$$TorrentFileEntry;
+
+ factory CopyWith$Fragment$DirEntry$$TorrentFileEntry.stub(TRes res) =
+ _CopyWithStubImpl$Fragment$DirEntry$$TorrentFileEntry;
+
+ TRes call({
+ String? name,
+ int? size,
+ String? $__typename,
+ });
+}
+
+class _CopyWithImpl$Fragment$DirEntry$$TorrentFileEntry
+ implements CopyWith$Fragment$DirEntry$$TorrentFileEntry {
+ _CopyWithImpl$Fragment$DirEntry$$TorrentFileEntry(
+ this._instance,
+ this._then,
+ );
+
+ final Fragment$DirEntry$$TorrentFileEntry _instance;
+
+ final TRes Function(Fragment$DirEntry$$TorrentFileEntry) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? name = _undefined,
+ Object? size = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Fragment$DirEntry$$TorrentFileEntry(
+ name: name == _undefined || name == null
+ ? _instance.name
+ : (name as String),
+ size:
+ size == _undefined || size == null ? _instance.size : (size as int),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+}
+
+class _CopyWithStubImpl$Fragment$DirEntry$$TorrentFileEntry
+ implements CopyWith$Fragment$DirEntry$$TorrentFileEntry {
+ _CopyWithStubImpl$Fragment$DirEntry$$TorrentFileEntry(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ String? name,
+ int? size,
+ String? $__typename,
+ }) =>
+ _res;
+}
+
+class Variables$Query$ListDir {
+ factory Variables$Query$ListDir({required String path}) =>
+ Variables$Query$ListDir._({
+ r'path': path,
+ });
+
+ Variables$Query$ListDir._(this._$data);
+
+ factory Variables$Query$ListDir.fromJson(Map data) {
+ final result$data = {};
+ final l$path = data['path'];
+ result$data['path'] = (l$path as String);
+ return Variables$Query$ListDir._(result$data);
+ }
+
+ Map _$data;
+
+ String get path => (_$data['path'] as String);
+
+ Map toJson() {
+ final result$data = {};
+ final l$path = path;
+ result$data['path'] = l$path;
+ return result$data;
+ }
+
+ CopyWith$Variables$Query$ListDir get copyWith =>
+ CopyWith$Variables$Query$ListDir(
+ this,
+ (i) => i,
+ );
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Variables$Query$ListDir ||
+ runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$path = path;
+ final lOther$path = other.path;
+ if (l$path != lOther$path) {
+ return false;
+ }
+ return true;
+ }
+
+ @override
+ int get hashCode {
+ final l$path = path;
+ return Object.hashAll([l$path]);
+ }
+}
+
+abstract class CopyWith$Variables$Query$ListDir {
+ factory CopyWith$Variables$Query$ListDir(
+ Variables$Query$ListDir instance,
+ TRes Function(Variables$Query$ListDir) then,
+ ) = _CopyWithImpl$Variables$Query$ListDir;
+
+ factory CopyWith$Variables$Query$ListDir.stub(TRes res) =
+ _CopyWithStubImpl$Variables$Query$ListDir;
+
+ TRes call({String? path});
+}
+
+class _CopyWithImpl$Variables$Query$ListDir
+ implements CopyWith$Variables$Query$ListDir {
+ _CopyWithImpl$Variables$Query$ListDir(
+ this._instance,
+ this._then,
+ );
+
+ final Variables$Query$ListDir _instance;
+
+ final TRes Function(Variables$Query$ListDir) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({Object? path = _undefined}) => _then(Variables$Query$ListDir._({
+ ..._instance._$data,
+ if (path != _undefined && path != null) 'path': (path as String),
+ }));
+}
+
+class _CopyWithStubImpl$Variables$Query$ListDir
+ implements CopyWith$Variables$Query$ListDir {
+ _CopyWithStubImpl$Variables$Query$ListDir(this._res);
+
+ final TRes _res;
+
+ @override
+ call({String? path}) => _res;
+}
+
+class Query$ListDir {
+ Query$ListDir({
+ this.fsEntry,
+ this.$__typename = 'Query',
+ });
+
+ factory Query$ListDir.fromJson(Map json) {
+ final l$fsEntry = json['fsEntry'];
+ final l$$__typename = json['__typename'];
+ return Query$ListDir(
+ fsEntry: l$fsEntry == null
+ ? null
+ : Query$ListDir$fsEntry.fromJson((l$fsEntry as Map)),
+ $__typename: (l$$__typename as String),
+ );
+ }
+
+ final Query$ListDir$fsEntry? fsEntry;
+
+ final String $__typename;
+
+ Map toJson() {
+ final resultData = {};
+ final l$fsEntry = fsEntry;
+ resultData['fsEntry'] = l$fsEntry?.toJson();
+ final l$$__typename = $__typename;
+ resultData['__typename'] = l$$__typename;
+ return resultData;
+ }
+
+ @override
+ int get hashCode {
+ final l$fsEntry = fsEntry;
+ final l$$__typename = $__typename;
+ return Object.hashAll([
+ l$fsEntry,
+ l$$__typename,
+ ]);
+ }
+
+ @override
+ bool operator ==(Object other) {
+ if (identical(this, other)) {
+ return true;
+ }
+ if (other is! Query$ListDir || runtimeType != other.runtimeType) {
+ return false;
+ }
+ final l$fsEntry = fsEntry;
+ final lOther$fsEntry = other.fsEntry;
+ if (l$fsEntry != lOther$fsEntry) {
+ return false;
+ }
+ final l$$__typename = $__typename;
+ final lOther$$__typename = other.$__typename;
+ if (l$$__typename != lOther$$__typename) {
+ return false;
+ }
+ return true;
+ }
+}
+
+extension UtilityExtension$Query$ListDir on Query$ListDir {
+ CopyWith$Query$ListDir get copyWith => CopyWith$Query$ListDir(
+ this,
+ (i) => i,
+ );
+}
+
+abstract class CopyWith$Query$ListDir {
+ factory CopyWith$Query$ListDir(
+ Query$ListDir instance,
+ TRes Function(Query$ListDir) then,
+ ) = _CopyWithImpl$Query$ListDir;
+
+ factory CopyWith$Query$ListDir.stub(TRes res) =
+ _CopyWithStubImpl$Query$ListDir;
+
+ TRes call({
+ Query$ListDir$fsEntry? fsEntry,
+ String? $__typename,
+ });
+ CopyWith$Query$ListDir$fsEntry get fsEntry;
+}
+
+class _CopyWithImpl$Query$ListDir
+ implements CopyWith$Query$ListDir {
+ _CopyWithImpl$Query$ListDir(
+ this._instance,
+ this._then,
+ );
+
+ final Query$ListDir _instance;
+
+ final TRes Function(Query$ListDir) _then;
+
+ static const _undefined = {};
+
+ @override
+ TRes call({
+ Object? fsEntry = _undefined,
+ Object? $__typename = _undefined,
+ }) =>
+ _then(Query$ListDir(
+ fsEntry: fsEntry == _undefined
+ ? _instance.fsEntry
+ : (fsEntry as Query$ListDir$fsEntry?),
+ $__typename: $__typename == _undefined || $__typename == null
+ ? _instance.$__typename
+ : ($__typename as String),
+ ));
+
+ @override
+ CopyWith$Query$ListDir$fsEntry get fsEntry {
+ final local$fsEntry = _instance.fsEntry;
+ return local$fsEntry == null
+ ? CopyWith$Query$ListDir$fsEntry.stub(_then(_instance))
+ : CopyWith$Query$ListDir$fsEntry(
+ local$fsEntry, (e) => call(fsEntry: e));
+ }
+}
+
+class _CopyWithStubImpl$Query$ListDir
+ implements CopyWith$Query$ListDir {
+ _CopyWithStubImpl$Query$ListDir(this._res);
+
+ final TRes _res;
+
+ @override
+ call({
+ Query$ListDir$fsEntry? fsEntry,
+ String? $__typename,
+ }) =>
+ _res;
+
+ @override
+ CopyWith$Query$ListDir$fsEntry get fsEntry =>
+ CopyWith$Query$ListDir$fsEntry.stub(_res);
+}
+
+const documentNodeQueryListDir = DocumentNode(definitions: [
+ OperationDefinitionNode(
+ type: OperationType.query,
+ name: NameNode(value: 'ListDir'),
+ variableDefinitions: [
+ VariableDefinitionNode(
+ variable: VariableNode(name: NameNode(value: 'path')),
+ type: NamedTypeNode(
+ name: NameNode(value: 'String'),
+ isNonNull: true,
+ ),
+ defaultValue: DefaultValueNode(value: null),
+ directives: [],
+ )
+ ],
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'fsEntry'),
+ alias: null,
+ arguments: [
+ ArgumentNode(
+ name: NameNode(value: 'path'),
+ value: VariableNode(name: NameNode(value: 'path')),
+ )
+ ],
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'name'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ InlineFragmentNode(
+ typeCondition: TypeConditionNode(
+ on: NamedTypeNode(
+ name: NameNode(value: 'Dir'),
+ isNonNull: false,
+ )),
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FieldNode(
+ name: NameNode(value: 'entries'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: SelectionSetNode(selections: [
+ FragmentSpreadNode(
+ name: NameNode(value: 'DirEntry'),
+ directives: [],
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+ ),
+ FragmentSpreadNode(
+ name: NameNode(value: 'TorrentDir'),
+ directives: [],
+ ),
+ FragmentSpreadNode(
+ name: NameNode(value: 'ArchiveDir'),
+ directives: [],
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+ ),
+ FieldNode(
+ name: NameNode(value: '__typename'),
+ alias: null,
+ arguments: [],
+ directives: [],
+ selectionSet: null,
+ ),
+ ]),
+ ),
+ fragmentDefinitionDirEntry,
+ fragmentDefinitionTorrentDir,
+ fragmentDefinitionArchiveDir,
+ fragmentDefinitionFile,
+]);
+Query$ListDir _parserFn$Query$ListDir(Map data) =>
+ Query$ListDir.fromJson(data);
+typedef OnQueryComplete$Query$ListDir = FutureOr Function(
+ Map?,
+ Query$ListDir?,
+);
+
+class Options$Query$ListDir extends graphql.QueryOptions {
+ Options$Query$ListDir({
+ super.operationName,
+ required Variables$Query$ListDir variables,
+ super.fetchPolicy,
+ super.errorPolicy,
+ super.cacheRereadPolicy,
+ Object? optimisticResult,
+ Query$ListDir? typedOptimisticResult,
+ super.pollInterval,
+ super.context,
+ OnQueryComplete$Query$ListDir? onComplete,
+ super.onError,
+ }) : onCompleteWithParsed = onComplete,
+ super(
+ variables: variables.toJson(),
+ optimisticResult: optimisticResult ?? typedOptimisticResult?.toJson(),
+ onComplete: onComplete == null
+ ? null
+ : (data) => onComplete(
+ data,
+ data == null ? null : _parserFn$Query$ListDir(data),
+ ),
+ document: documentNodeQueryListDir,
+ parserFn: _parserFn$Query$ListDir,
+ );
+
+ final OnQueryComplete$Query$ListDir? onCompleteWithParsed;
+
+ @override
+ List