diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f424ef5d5..8b6627395 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true env: - COMPILER_IMAGE: stashapp/compiler:9 + COMPILER_IMAGE: stashapp/compiler:10 jobs: build: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index e29d56c79..cbb3b021f 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -9,7 +9,7 @@ on: pull_request: env: - COMPILER_IMAGE: stashapp/compiler:9 + COMPILER_IMAGE: stashapp/compiler:10 jobs: golangci: diff --git a/docker/compiler/Dockerfile b/docker/compiler/Dockerfile index d69cea3e3..737f0ee10 100644 --- a/docker/compiler/Dockerfile +++ b/docker/compiler/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22 +FROM golang:1.22.8 LABEL maintainer="https://discord.gg/2TsNFKt" @@ -26,9 +26,9 @@ RUN apt-get update && \ # FreeBSD cross-compilation setup # https://github.com/smartmontools/docker-build/blob/6b8c92560d17d325310ba02d9f5a4b250cb0764a/Dockerfile#L66 -ENV FREEBSD_VERSION 12.4 +ENV FREEBSD_VERSION 13.4 ENV FREEBSD_DOWNLOAD_URL http://ftp.plusline.de/FreeBSD/releases/amd64/${FREEBSD_VERSION}-RELEASE/base.txz -ENV FREEBSD_SHA 581c7edacfd2fca2bdf5791f667402d22fccd8a5e184635e0cac075564d57aa8 +ENV FREEBSD_SHA 8e13b0a93daba349b8d28ad246d7beb327659b2ef4fe44d89f447392daec5a7c RUN cd /tmp && \ curl -o base.txz $FREEBSD_DOWNLOAD_URL && \ diff --git a/docker/compiler/Makefile b/docker/compiler/Makefile index dbd9e16f8..2411fdabb 100644 --- a/docker/compiler/Makefile +++ b/docker/compiler/Makefile @@ -1,6 +1,6 @@ user=stashapp repo=compiler -version=9 +version=10 latest: docker build -t ${user}/${repo}:latest . diff --git a/go.mod b/go.mod index 7f7d61703..ea1dbc618 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/stashapp/stash -go 1.22 +go 1.22.8 require ( - github.com/99designs/gqlgen v0.17.49 + github.com/99designs/gqlgen v0.17.55 github.com/WithoutPants/sortorder v0.0.0-20230616003020-921c9ef69552 - github.com/Yamashou/gqlgenc v0.0.6 + github.com/Yamashou/gqlgenc v0.25.3 github.com/anacrolix/dms v1.2.2 github.com/antchfx/htmlquery v1.3.0 github.com/asticode/go-astisub v0.25.1 @@ -47,27 +47,27 @@ require ( github.com/tidwall/gjson v1.16.0 github.com/vearutop/statigz v1.4.0 github.com/vektah/dataloaden v0.3.0 - github.com/vektah/gqlparser/v2 v2.5.16 + github.com/vektah/gqlparser/v2 v2.5.18 github.com/vektra/mockery/v2 v2.10.0 github.com/xWTF/chardet v0.0.0-20230208095535-c780f2ac244e github.com/zencoder/go-dash/v3 v3.0.2 - golang.org/x/crypto v0.24.0 + golang.org/x/crypto v0.28.0 golang.org/x/image v0.18.0 - golang.org/x/net v0.26.0 - golang.org/x/sys v0.21.0 - golang.org/x/term v0.21.0 - golang.org/x/text v0.16.0 + golang.org/x/net v0.30.0 + golang.org/x/sys v0.26.0 + golang.org/x/term v0.25.0 + golang.org/x/text v0.19.0 gopkg.in/guregu/null.v4 v4.0.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/agnivade/levenshtein v1.1.1 // indirect + github.com/agnivade/levenshtein v1.2.0 // indirect github.com/antchfx/xpath v1.2.3 // indirect github.com/asticode/go-astikit v0.20.0 // indirect github.com/asticode/go-astits v1.8.0 // indirect github.com/chromedp/sysutil v1.0.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -108,12 +108,12 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect - github.com/urfave/cli/v2 v2.27.2 // indirect - github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect + github.com/urfave/cli/v2 v2.27.5 // indirect + github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect go.uber.org/atomic v1.11.0 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/tools v0.26.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8c3b00d61..3af4fce7f 100644 --- a/go.sum +++ b/go.sum @@ -51,26 +51,23 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= -github.com/99designs/gqlgen v0.17.2/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o= -github.com/99designs/gqlgen v0.17.49 h1:b3hNGexHd33fBSAd4NDT/c3NCcQzcAVkknhN9ym36YQ= -github.com/99designs/gqlgen v0.17.49/go.mod h1:tC8YFVZMed81x7UJ7ORUwXF4Kn6SXuucFqQBhN8+BU0= +github.com/99designs/gqlgen v0.17.55 h1:3vzrNWYyzSZjGDFo68e5j9sSauLxfKvLp+6ioRokVtM= +github.com/99designs/gqlgen v0.17.55/go.mod h1:3Bq768f8hgVPGZxL8aY9MaYmbxa6llPM/qu1IGH1EJo= 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/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/goquery v1.9.2 h1:4/wZksC3KgkQw7SQgkKotmKljk0M6V8TUvA8Wb4yPeE= -github.com/PuerkitoBio/goquery v1.9.2/go.mod h1:GHPCaP0ODyyxqcNoFGYlAprUFH81NuRPd0GX3Zu2Mvk= +github.com/PuerkitoBio/goquery v1.9.3 h1:mpJr/ikUA9/GNJB/DBZcGeFDXUtosHRyRrwh7KGdTG0= +github.com/PuerkitoBio/goquery v1.9.3/go.mod h1:1ndLHPdTz+DyQPICCWYlYQMPl0oXZj0G6D4LCYA6u4U= github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w= github.com/WithoutPants/sortorder v0.0.0-20230616003020-921c9ef69552 h1:eukVk+mGmbSZppLw8WJGpEUgMC570eb32y7FOsPW4Kc= github.com/WithoutPants/sortorder v0.0.0-20230616003020-921c9ef69552/go.mod h1:LKbO1i6L1lSlwWx4NHWVECxubHNKFz2YQoEMGXAFVy8= -github.com/Yamashou/gqlgenc v0.0.6 h1:wfMTtuVSrX2N1z5/ssecxx+E7l1fa0FOq5mwFW47oY4= -github.com/Yamashou/gqlgenc v0.0.6/go.mod h1:WOXjogecRGpD1WKgxnnyHJo0/Dxn44p/LNRoE6mtFQo= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= -github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= -github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= +github.com/Yamashou/gqlgenc v0.25.3 h1:mVV8/Ho8EDZUQKQZbQqqXGNq8jc8aQfPpHhZOnTkMNE= +github.com/Yamashou/gqlgenc v0.25.3/go.mod h1:G0g1N81xpIklVdnyboW1zwOHcj/n4hNfhTwfN29Rjig= +github.com/agnivade/levenshtein v1.2.0 h1:U9L4IOT0Y3i0TIlUIDJ7rVUziKi/zPbrJGaFrtYH3SY= +github.com/agnivade/levenshtein v1.2.0/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -161,18 +158,17 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/corona10/goimagehash v1.1.0 h1:teNMX/1e+Wn/AYSbLHX8mj+mF9r60R1kBeqE9MkoYwI= github.com/corona10/goimagehash v1.1.0/go.mod h1:VkvE0mLn84L4aF8vCb6mafVajEb6QYMHl2ZJLn0mOGI= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= -github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= +github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo= +github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= @@ -344,7 +340,6 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= @@ -435,7 +430,6 @@ github.com/kermieisinthehouse/gosx-notifier v0.1.2 h1:KV0KBeKK2B24kIHY7iK0jgS64Q github.com/kermieisinthehouse/gosx-notifier v0.1.2/go.mod h1:xyWT07azFtUOcHl96qMVvKhvKzsMcS7rKTHQyv8WTho= github.com/kermieisinthehouse/systray v1.2.4 h1:pdH5vnl+KKjRrVCRU4g/2W1/0HVzuuJ6WXHlPPHYY6s= github.com/kermieisinthehouse/systray v1.2.4/go.mod h1:axh6C/jNuSyC0QGtidZJURc9h+h41HNoMySoLVrhVR4= -github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= @@ -459,7 +453,6 @@ github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1 github.com/lib/pq v1.10.1/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= @@ -468,7 +461,6 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -505,7 +497,6 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -587,7 +578,6 @@ github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+ github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc= @@ -599,12 +589,10 @@ github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46/go.mod h1:uAQ5P github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= 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/graphql v0.0.0-20181231061246-d48a9a75455f h1:tygelZueB1EtXkPI6mQ4o9DQ0+FKW41hTbunoXZCTqk= github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 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/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -664,24 +652,21 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= -github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= +github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= +github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= github.com/vearutop/statigz v1.4.0 h1:RQL0KG3j/uyA/PFpHeZ/L6l2ta920/MxlOAIGEOuwmU= github.com/vearutop/statigz v1.4.0/go.mod h1:LYTolBLiz9oJISwiVKnOQoIwhO1LWX1A7OECawGS8XE= github.com/vektah/dataloaden v0.3.0 h1:ZfVN2QD6swgvp+tDqdH/OIT/wu3Dhu0cus0k5gIZS84= github.com/vektah/dataloaden v0.3.0/go.mod h1:/HUdMve7rvxZma+2ZELQeNh88+003LL7Pf/CZ089j8U= -github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= -github.com/vektah/gqlparser/v2 v2.4.1/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= -github.com/vektah/gqlparser/v2 v2.5.16 h1:1gcmLTvs3JLKXckwCwlUagVn/IlV2bwqle0vJ0vy5p8= -github.com/vektah/gqlparser/v2 v2.5.16/go.mod h1:1lz1OeCqgQbQepsGxPVywrjdBHW2T08PUS3pJqepRww= +github.com/vektah/gqlparser/v2 v2.5.18 h1:zSND3GtutylAQ1JpWnTHcqtaRZjl+y3NROeW8vuNo6Y= +github.com/vektah/gqlparser/v2 v2.5.18/go.mod h1:6HLzf7JKv9Fi3APymudztFQNmLXR5qJeEo6BOFcXVfc= github.com/vektra/mockery/v2 v2.10.0 h1:MiiQWxwdq7/ET6dCXLaJzSGEN17k758H7JHS9kOdiks= github.com/vektra/mockery/v2 v2.10.0/go.mod h1:m/WO2UzWzqgVX3nvqpRQq70I4Z7jbSCRhdmkgtp+Ab4= github.com/willf/bitset v1.1.9/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xWTF/chardet v0.0.0-20230208095535-c780f2ac244e h1:GruPsb+44XvYAzuAgJW1d1WHqmcI73L2XSjsbx/eJZw= github.com/xWTF/chardet v0.0.0-20230208095535-c780f2ac244e/go.mod h1:wA8kQ8WFipMciY9WcWzqQgZordm/P7l8IZdvx1crwmc= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= +github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -728,8 +713,8 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= 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= @@ -770,10 +755,9 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= 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-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -823,8 +807,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= 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= @@ -854,8 +838,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -938,7 +922,6 @@ golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/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-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -947,13 +930,13 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.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.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -966,8 +949,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1013,7 +996,6 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1030,11 +1012,9 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= 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= diff --git a/gqlgen.yml b/gqlgen.yml index 9f22ccb49..bfa5654c1 100644 --- a/gqlgen.yml +++ b/gqlgen.yml @@ -7,9 +7,6 @@ exec: filename: internal/api/generated_exec.go model: filename: internal/api/generated_models.go -resolver: - filename: internal/api/resolver.go - type: Resolver struct_tag: gqlgen diff --git a/internal/api/server.go b/internal/api/server.go index 63a81da7c..bce8e6a07 100644 --- a/internal/api/server.go +++ b/internal/api/server.go @@ -27,6 +27,7 @@ import ( "github.com/go-chi/httplog" "github.com/gorilla/websocket" "github.com/vearutop/statigz" + "github.com/vektah/gqlparser/v2/ast" "github.com/stashapp/stash/internal/api/loaders" "github.com/stashapp/stash/internal/build" @@ -185,7 +186,7 @@ func Initialize() (*Server, error) { MaxUploadSize: cfg.GetMaxUploadSize(), }) - gqlSrv.SetQueryCache(gqlLru.New(1000)) + gqlSrv.SetQueryCache(gqlLru.New[*ast.QueryDocument](1000)) gqlSrv.Use(gqlExtension.Introspection{}) gqlSrv.SetErrorPresenter(gqlErrorHandler) diff --git a/internal/manager/task_scan.go b/internal/manager/task_scan.go index 48a06d098..6f7f34b3c 100644 --- a/internal/manager/task_scan.go +++ b/internal/manager/task_scan.go @@ -123,7 +123,7 @@ type handlerRequiredFilter struct { GalleryFinder galleryFinder CaptionUpdater video.CaptionUpdater - FolderCache *lru.LRU + FolderCache *lru.LRU[bool] videoFileNamingAlgorithm models.HashAlgorithm } @@ -138,7 +138,7 @@ func newHandlerRequiredFilter(c *config.Config, repo models.Repository) *handler ImageFinder: repo.Image, GalleryFinder: repo.Gallery, CaptionUpdater: repo.File, - FolderCache: lru.New(processes * 2), + FolderCache: lru.New[bool](processes * 2), videoFileNamingAlgorithm: c.GetVideoFileNamingAlgorithm(), } } diff --git a/pkg/scraper/stashbox/graphql/generated_client.go b/pkg/scraper/stashbox/graphql/generated_client.go index b87d70343..9b9340239 100644 --- a/pkg/scraper/stashbox/graphql/generated_client.go +++ b/pkg/scraper/stashbox/graphql/generated_client.go @@ -6,240 +6,796 @@ import ( "context" "net/http" - "github.com/Yamashou/gqlgenc/client" + "github.com/Yamashou/gqlgenc/clientv2" ) type StashBoxGraphQLClient interface { - FindSceneByFingerprint(ctx context.Context, fingerprint FingerprintQueryInput, httpRequestOptions ...client.HTTPRequestOption) (*FindSceneByFingerprint, error) - FindScenesByFullFingerprints(ctx context.Context, fingerprints []*FingerprintQueryInput, httpRequestOptions ...client.HTTPRequestOption) (*FindScenesByFullFingerprints, error) - FindScenesBySceneFingerprints(ctx context.Context, fingerprints [][]*FingerprintQueryInput, httpRequestOptions ...client.HTTPRequestOption) (*FindScenesBySceneFingerprints, error) - SearchScene(ctx context.Context, term string, httpRequestOptions ...client.HTTPRequestOption) (*SearchScene, error) - SearchPerformer(ctx context.Context, term string, httpRequestOptions ...client.HTTPRequestOption) (*SearchPerformer, error) - FindPerformerByID(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*FindPerformerByID, error) - FindSceneByID(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*FindSceneByID, error) - FindStudio(ctx context.Context, id *string, name *string, httpRequestOptions ...client.HTTPRequestOption) (*FindStudio, error) - SubmitFingerprint(ctx context.Context, input FingerprintSubmission, httpRequestOptions ...client.HTTPRequestOption) (*SubmitFingerprint, error) - Me(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*Me, error) - SubmitSceneDraft(ctx context.Context, input SceneDraftInput, httpRequestOptions ...client.HTTPRequestOption) (*SubmitSceneDraft, error) - SubmitPerformerDraft(ctx context.Context, input PerformerDraftInput, httpRequestOptions ...client.HTTPRequestOption) (*SubmitPerformerDraft, error) + FindSceneByFingerprint(ctx context.Context, fingerprint FingerprintQueryInput, interceptors ...clientv2.RequestInterceptor) (*FindSceneByFingerprint, error) + FindScenesByFullFingerprints(ctx context.Context, fingerprints []*FingerprintQueryInput, interceptors ...clientv2.RequestInterceptor) (*FindScenesByFullFingerprints, error) + FindScenesBySceneFingerprints(ctx context.Context, fingerprints [][]*FingerprintQueryInput, interceptors ...clientv2.RequestInterceptor) (*FindScenesBySceneFingerprints, error) + SearchScene(ctx context.Context, term string, interceptors ...clientv2.RequestInterceptor) (*SearchScene, error) + SearchPerformer(ctx context.Context, term string, interceptors ...clientv2.RequestInterceptor) (*SearchPerformer, error) + FindPerformerByID(ctx context.Context, id string, interceptors ...clientv2.RequestInterceptor) (*FindPerformerByID, error) + FindSceneByID(ctx context.Context, id string, interceptors ...clientv2.RequestInterceptor) (*FindSceneByID, error) + FindStudio(ctx context.Context, id *string, name *string, interceptors ...clientv2.RequestInterceptor) (*FindStudio, error) + SubmitFingerprint(ctx context.Context, input FingerprintSubmission, interceptors ...clientv2.RequestInterceptor) (*SubmitFingerprint, error) + Me(ctx context.Context, interceptors ...clientv2.RequestInterceptor) (*Me, error) + SubmitSceneDraft(ctx context.Context, input SceneDraftInput, interceptors ...clientv2.RequestInterceptor) (*SubmitSceneDraft, error) + SubmitPerformerDraft(ctx context.Context, input PerformerDraftInput, interceptors ...clientv2.RequestInterceptor) (*SubmitPerformerDraft, error) } type Client struct { - Client *client.Client + Client *clientv2.Client } -func NewClient(cli *http.Client, baseURL string, options ...client.HTTPRequestOption) StashBoxGraphQLClient { - return &Client{Client: client.NewClient(cli, baseURL, options...)} +func NewClient(cli *http.Client, baseURL string, options *clientv2.Options, interceptors ...clientv2.RequestInterceptor) StashBoxGraphQLClient { + return &Client{Client: clientv2.NewClient(cli, baseURL, options, interceptors...)} } -type Query struct { - FindPerformer *Performer "json:\"findPerformer\" graphql:\"findPerformer\"" - QueryPerformers QueryPerformersResultType "json:\"queryPerformers\" graphql:\"queryPerformers\"" - FindStudio *Studio "json:\"findStudio\" graphql:\"findStudio\"" - QueryStudios QueryStudiosResultType "json:\"queryStudios\" graphql:\"queryStudios\"" - FindTag *Tag "json:\"findTag\" graphql:\"findTag\"" - QueryTags QueryTagsResultType "json:\"queryTags\" graphql:\"queryTags\"" - FindTagCategory *TagCategory "json:\"findTagCategory\" graphql:\"findTagCategory\"" - QueryTagCategories QueryTagCategoriesResultType "json:\"queryTagCategories\" graphql:\"queryTagCategories\"" - FindScene *Scene "json:\"findScene\" graphql:\"findScene\"" - FindSceneByFingerprint []*Scene "json:\"findSceneByFingerprint\" graphql:\"findSceneByFingerprint\"" - FindScenesByFingerprints []*Scene "json:\"findScenesByFingerprints\" graphql:\"findScenesByFingerprints\"" - FindScenesByFullFingerprints []*Scene "json:\"findScenesByFullFingerprints\" graphql:\"findScenesByFullFingerprints\"" - FindScenesBySceneFingerprints [][]*Scene "json:\"findScenesBySceneFingerprints\" graphql:\"findScenesBySceneFingerprints\"" - QueryScenes QueryScenesResultType "json:\"queryScenes\" graphql:\"queryScenes\"" - FindSite *Site "json:\"findSite\" graphql:\"findSite\"" - QuerySites QuerySitesResultType "json:\"querySites\" graphql:\"querySites\"" - FindEdit *Edit "json:\"findEdit\" graphql:\"findEdit\"" - QueryEdits QueryEditsResultType "json:\"queryEdits\" graphql:\"queryEdits\"" - FindUser *User "json:\"findUser\" graphql:\"findUser\"" - QueryUsers QueryUsersResultType "json:\"queryUsers\" graphql:\"queryUsers\"" - Me *User "json:\"me\" graphql:\"me\"" - SearchPerformer []*Performer "json:\"searchPerformer\" graphql:\"searchPerformer\"" - SearchScene []*Scene "json:\"searchScene\" graphql:\"searchScene\"" - SearchTag []*Tag "json:\"searchTag\" graphql:\"searchTag\"" - FindDraft *Draft "json:\"findDraft\" graphql:\"findDraft\"" - FindDrafts []*Draft "json:\"findDrafts\" graphql:\"findDrafts\"" - QueryExistingScene QueryExistingSceneResult "json:\"queryExistingScene\" graphql:\"queryExistingScene\"" - Version Version "json:\"version\" graphql:\"version\"" - GetConfig StashBoxConfig "json:\"getConfig\" graphql:\"getConfig\"" -} -type Mutation struct { - SceneCreate *Scene "json:\"sceneCreate\" graphql:\"sceneCreate\"" - SceneUpdate *Scene "json:\"sceneUpdate\" graphql:\"sceneUpdate\"" - SceneDestroy bool "json:\"sceneDestroy\" graphql:\"sceneDestroy\"" - PerformerCreate *Performer "json:\"performerCreate\" graphql:\"performerCreate\"" - PerformerUpdate *Performer "json:\"performerUpdate\" graphql:\"performerUpdate\"" - PerformerDestroy bool "json:\"performerDestroy\" graphql:\"performerDestroy\"" - StudioCreate *Studio "json:\"studioCreate\" graphql:\"studioCreate\"" - StudioUpdate *Studio "json:\"studioUpdate\" graphql:\"studioUpdate\"" - StudioDestroy bool "json:\"studioDestroy\" graphql:\"studioDestroy\"" - TagCreate *Tag "json:\"tagCreate\" graphql:\"tagCreate\"" - TagUpdate *Tag "json:\"tagUpdate\" graphql:\"tagUpdate\"" - TagDestroy bool "json:\"tagDestroy\" graphql:\"tagDestroy\"" - UserCreate *User "json:\"userCreate\" graphql:\"userCreate\"" - UserUpdate *User "json:\"userUpdate\" graphql:\"userUpdate\"" - UserDestroy bool "json:\"userDestroy\" graphql:\"userDestroy\"" - ImageCreate *Image "json:\"imageCreate\" graphql:\"imageCreate\"" - ImageDestroy bool "json:\"imageDestroy\" graphql:\"imageDestroy\"" - NewUser *string "json:\"newUser\" graphql:\"newUser\"" - ActivateNewUser *User "json:\"activateNewUser\" graphql:\"activateNewUser\"" - GenerateInviteCode *string "json:\"generateInviteCode\" graphql:\"generateInviteCode\"" - RescindInviteCode bool "json:\"rescindInviteCode\" graphql:\"rescindInviteCode\"" - GrantInvite int "json:\"grantInvite\" graphql:\"grantInvite\"" - RevokeInvite int "json:\"revokeInvite\" graphql:\"revokeInvite\"" - TagCategoryCreate *TagCategory "json:\"tagCategoryCreate\" graphql:\"tagCategoryCreate\"" - TagCategoryUpdate *TagCategory "json:\"tagCategoryUpdate\" graphql:\"tagCategoryUpdate\"" - TagCategoryDestroy bool "json:\"tagCategoryDestroy\" graphql:\"tagCategoryDestroy\"" - SiteCreate *Site "json:\"siteCreate\" graphql:\"siteCreate\"" - SiteUpdate *Site "json:\"siteUpdate\" graphql:\"siteUpdate\"" - SiteDestroy bool "json:\"siteDestroy\" graphql:\"siteDestroy\"" - RegenerateAPIKey string "json:\"regenerateAPIKey\" graphql:\"regenerateAPIKey\"" - ResetPassword bool "json:\"resetPassword\" graphql:\"resetPassword\"" - ChangePassword bool "json:\"changePassword\" graphql:\"changePassword\"" - SceneEdit Edit "json:\"sceneEdit\" graphql:\"sceneEdit\"" - PerformerEdit Edit "json:\"performerEdit\" graphql:\"performerEdit\"" - StudioEdit Edit "json:\"studioEdit\" graphql:\"studioEdit\"" - TagEdit Edit "json:\"tagEdit\" graphql:\"tagEdit\"" - SceneEditUpdate Edit "json:\"sceneEditUpdate\" graphql:\"sceneEditUpdate\"" - PerformerEditUpdate Edit "json:\"performerEditUpdate\" graphql:\"performerEditUpdate\"" - StudioEditUpdate Edit "json:\"studioEditUpdate\" graphql:\"studioEditUpdate\"" - TagEditUpdate Edit "json:\"tagEditUpdate\" graphql:\"tagEditUpdate\"" - EditVote Edit "json:\"editVote\" graphql:\"editVote\"" - EditComment Edit "json:\"editComment\" graphql:\"editComment\"" - ApplyEdit Edit "json:\"applyEdit\" graphql:\"applyEdit\"" - CancelEdit Edit "json:\"cancelEdit\" graphql:\"cancelEdit\"" - SubmitFingerprint bool "json:\"submitFingerprint\" graphql:\"submitFingerprint\"" - SubmitSceneDraft DraftSubmissionStatus "json:\"submitSceneDraft\" graphql:\"submitSceneDraft\"" - SubmitPerformerDraft DraftSubmissionStatus "json:\"submitPerformerDraft\" graphql:\"submitPerformerDraft\"" - DestroyDraft bool "json:\"destroyDraft\" graphql:\"destroyDraft\"" - FavoritePerformer bool "json:\"favoritePerformer\" graphql:\"favoritePerformer\"" - FavoriteStudio bool "json:\"favoriteStudio\" graphql:\"favoriteStudio\"" -} type URLFragment struct { URL string "json:\"url\" graphql:\"url\"" Type string "json:\"type\" graphql:\"type\"" } + +func (t *URLFragment) GetURL() string { + if t == nil { + t = &URLFragment{} + } + return t.URL +} +func (t *URLFragment) GetType() string { + if t == nil { + t = &URLFragment{} + } + return t.Type +} + type ImageFragment struct { ID string "json:\"id\" graphql:\"id\"" URL string "json:\"url\" graphql:\"url\"" Width int "json:\"width\" graphql:\"width\"" Height int "json:\"height\" graphql:\"height\"" } -type StudioFragment struct { - Name string "json:\"name\" graphql:\"name\"" - ID string "json:\"id\" graphql:\"id\"" - Urls []*URLFragment "json:\"urls\" graphql:\"urls\"" - Parent *struct { - Name string "json:\"name\" graphql:\"name\"" - ID string "json:\"id\" graphql:\"id\"" - } "json:\"parent\" graphql:\"parent\"" - Images []*ImageFragment "json:\"images\" graphql:\"images\"" + +func (t *ImageFragment) GetID() string { + if t == nil { + t = &ImageFragment{} + } + return t.ID } +func (t *ImageFragment) GetURL() string { + if t == nil { + t = &ImageFragment{} + } + return t.URL +} +func (t *ImageFragment) GetWidth() int { + if t == nil { + t = &ImageFragment{} + } + return t.Width +} +func (t *ImageFragment) GetHeight() int { + if t == nil { + t = &ImageFragment{} + } + return t.Height +} + +type StudioFragment struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" + Urls []*URLFragment "json:\"urls\" graphql:\"urls\"" + Parent *StudioFragment_Parent "json:\"parent,omitempty\" graphql:\"parent\"" + Images []*ImageFragment "json:\"images\" graphql:\"images\"" +} + +func (t *StudioFragment) GetName() string { + if t == nil { + t = &StudioFragment{} + } + return t.Name +} +func (t *StudioFragment) GetID() string { + if t == nil { + t = &StudioFragment{} + } + return t.ID +} +func (t *StudioFragment) GetUrls() []*URLFragment { + if t == nil { + t = &StudioFragment{} + } + return t.Urls +} +func (t *StudioFragment) GetParent() *StudioFragment_Parent { + if t == nil { + t = &StudioFragment{} + } + return t.Parent +} +func (t *StudioFragment) GetImages() []*ImageFragment { + if t == nil { + t = &StudioFragment{} + } + return t.Images +} + type TagFragment struct { Name string "json:\"name\" graphql:\"name\"" ID string "json:\"id\" graphql:\"id\"" } + +func (t *TagFragment) GetName() string { + if t == nil { + t = &TagFragment{} + } + return t.Name +} +func (t *TagFragment) GetID() string { + if t == nil { + t = &TagFragment{} + } + return t.ID +} + type FuzzyDateFragment struct { Date string "json:\"date\" graphql:\"date\"" Accuracy DateAccuracyEnum "json:\"accuracy\" graphql:\"accuracy\"" } -type MeasurementsFragment struct { - BandSize *int "json:\"band_size\" graphql:\"band_size\"" - CupSize *string "json:\"cup_size\" graphql:\"cup_size\"" - Waist *int "json:\"waist\" graphql:\"waist\"" - Hip *int "json:\"hip\" graphql:\"hip\"" + +func (t *FuzzyDateFragment) GetDate() string { + if t == nil { + t = &FuzzyDateFragment{} + } + return t.Date } +func (t *FuzzyDateFragment) GetAccuracy() *DateAccuracyEnum { + if t == nil { + t = &FuzzyDateFragment{} + } + return &t.Accuracy +} + +type MeasurementsFragment struct { + BandSize *int "json:\"band_size,omitempty\" graphql:\"band_size\"" + CupSize *string "json:\"cup_size,omitempty\" graphql:\"cup_size\"" + Waist *int "json:\"waist,omitempty\" graphql:\"waist\"" + Hip *int "json:\"hip,omitempty\" graphql:\"hip\"" +} + +func (t *MeasurementsFragment) GetBandSize() *int { + if t == nil { + t = &MeasurementsFragment{} + } + return t.BandSize +} +func (t *MeasurementsFragment) GetCupSize() *string { + if t == nil { + t = &MeasurementsFragment{} + } + return t.CupSize +} +func (t *MeasurementsFragment) GetWaist() *int { + if t == nil { + t = &MeasurementsFragment{} + } + return t.Waist +} +func (t *MeasurementsFragment) GetHip() *int { + if t == nil { + t = &MeasurementsFragment{} + } + return t.Hip +} + type BodyModificationFragment struct { Location string "json:\"location\" graphql:\"location\"" - Description *string "json:\"description\" graphql:\"description\"" + Description *string "json:\"description,omitempty\" graphql:\"description\"" } + +func (t *BodyModificationFragment) GetLocation() string { + if t == nil { + t = &BodyModificationFragment{} + } + return t.Location +} +func (t *BodyModificationFragment) GetDescription() *string { + if t == nil { + t = &BodyModificationFragment{} + } + return t.Description +} + type PerformerFragment struct { ID string "json:\"id\" graphql:\"id\"" Name string "json:\"name\" graphql:\"name\"" - Disambiguation *string "json:\"disambiguation\" graphql:\"disambiguation\"" + Disambiguation *string "json:\"disambiguation,omitempty\" graphql:\"disambiguation\"" Aliases []string "json:\"aliases\" graphql:\"aliases\"" - Gender *GenderEnum "json:\"gender\" graphql:\"gender\"" + Gender *GenderEnum "json:\"gender,omitempty\" graphql:\"gender\"" MergedIds []string "json:\"merged_ids\" graphql:\"merged_ids\"" Urls []*URLFragment "json:\"urls\" graphql:\"urls\"" Images []*ImageFragment "json:\"images\" graphql:\"images\"" - Birthdate *FuzzyDateFragment "json:\"birthdate\" graphql:\"birthdate\"" - Ethnicity *EthnicityEnum "json:\"ethnicity\" graphql:\"ethnicity\"" - Country *string "json:\"country\" graphql:\"country\"" - EyeColor *EyeColorEnum "json:\"eye_color\" graphql:\"eye_color\"" - HairColor *HairColorEnum "json:\"hair_color\" graphql:\"hair_color\"" - Height *int "json:\"height\" graphql:\"height\"" - Measurements MeasurementsFragment "json:\"measurements\" graphql:\"measurements\"" - BreastType *BreastTypeEnum "json:\"breast_type\" graphql:\"breast_type\"" - CareerStartYear *int "json:\"career_start_year\" graphql:\"career_start_year\"" - CareerEndYear *int "json:\"career_end_year\" graphql:\"career_end_year\"" - Tattoos []*BodyModificationFragment "json:\"tattoos\" graphql:\"tattoos\"" - Piercings []*BodyModificationFragment "json:\"piercings\" graphql:\"piercings\"" + Birthdate *FuzzyDateFragment "json:\"birthdate,omitempty\" graphql:\"birthdate\"" + Ethnicity *EthnicityEnum "json:\"ethnicity,omitempty\" graphql:\"ethnicity\"" + Country *string "json:\"country,omitempty\" graphql:\"country\"" + EyeColor *EyeColorEnum "json:\"eye_color,omitempty\" graphql:\"eye_color\"" + HairColor *HairColorEnum "json:\"hair_color,omitempty\" graphql:\"hair_color\"" + Height *int "json:\"height,omitempty\" graphql:\"height\"" + Measurements *MeasurementsFragment "json:\"measurements\" graphql:\"measurements\"" + BreastType *BreastTypeEnum "json:\"breast_type,omitempty\" graphql:\"breast_type\"" + CareerStartYear *int "json:\"career_start_year,omitempty\" graphql:\"career_start_year\"" + CareerEndYear *int "json:\"career_end_year,omitempty\" graphql:\"career_end_year\"" + Tattoos []*BodyModificationFragment "json:\"tattoos,omitempty\" graphql:\"tattoos\"" + Piercings []*BodyModificationFragment "json:\"piercings,omitempty\" graphql:\"piercings\"" } + +func (t *PerformerFragment) GetID() string { + if t == nil { + t = &PerformerFragment{} + } + return t.ID +} +func (t *PerformerFragment) GetName() string { + if t == nil { + t = &PerformerFragment{} + } + return t.Name +} +func (t *PerformerFragment) GetDisambiguation() *string { + if t == nil { + t = &PerformerFragment{} + } + return t.Disambiguation +} +func (t *PerformerFragment) GetAliases() []string { + if t == nil { + t = &PerformerFragment{} + } + return t.Aliases +} +func (t *PerformerFragment) GetGender() *GenderEnum { + if t == nil { + t = &PerformerFragment{} + } + return t.Gender +} +func (t *PerformerFragment) GetMergedIds() []string { + if t == nil { + t = &PerformerFragment{} + } + return t.MergedIds +} +func (t *PerformerFragment) GetUrls() []*URLFragment { + if t == nil { + t = &PerformerFragment{} + } + return t.Urls +} +func (t *PerformerFragment) GetImages() []*ImageFragment { + if t == nil { + t = &PerformerFragment{} + } + return t.Images +} +func (t *PerformerFragment) GetBirthdate() *FuzzyDateFragment { + if t == nil { + t = &PerformerFragment{} + } + return t.Birthdate +} +func (t *PerformerFragment) GetEthnicity() *EthnicityEnum { + if t == nil { + t = &PerformerFragment{} + } + return t.Ethnicity +} +func (t *PerformerFragment) GetCountry() *string { + if t == nil { + t = &PerformerFragment{} + } + return t.Country +} +func (t *PerformerFragment) GetEyeColor() *EyeColorEnum { + if t == nil { + t = &PerformerFragment{} + } + return t.EyeColor +} +func (t *PerformerFragment) GetHairColor() *HairColorEnum { + if t == nil { + t = &PerformerFragment{} + } + return t.HairColor +} +func (t *PerformerFragment) GetHeight() *int { + if t == nil { + t = &PerformerFragment{} + } + return t.Height +} +func (t *PerformerFragment) GetMeasurements() *MeasurementsFragment { + if t == nil { + t = &PerformerFragment{} + } + return t.Measurements +} +func (t *PerformerFragment) GetBreastType() *BreastTypeEnum { + if t == nil { + t = &PerformerFragment{} + } + return t.BreastType +} +func (t *PerformerFragment) GetCareerStartYear() *int { + if t == nil { + t = &PerformerFragment{} + } + return t.CareerStartYear +} +func (t *PerformerFragment) GetCareerEndYear() *int { + if t == nil { + t = &PerformerFragment{} + } + return t.CareerEndYear +} +func (t *PerformerFragment) GetTattoos() []*BodyModificationFragment { + if t == nil { + t = &PerformerFragment{} + } + return t.Tattoos +} +func (t *PerformerFragment) GetPiercings() []*BodyModificationFragment { + if t == nil { + t = &PerformerFragment{} + } + return t.Piercings +} + type PerformerAppearanceFragment struct { - As *string "json:\"as\" graphql:\"as\"" - Performer PerformerFragment "json:\"performer\" graphql:\"performer\"" + As *string "json:\"as,omitempty\" graphql:\"as\"" + Performer *PerformerFragment "json:\"performer\" graphql:\"performer\"" } + +func (t *PerformerAppearanceFragment) GetAs() *string { + if t == nil { + t = &PerformerAppearanceFragment{} + } + return t.As +} +func (t *PerformerAppearanceFragment) GetPerformer() *PerformerFragment { + if t == nil { + t = &PerformerAppearanceFragment{} + } + return t.Performer +} + type FingerprintFragment struct { Algorithm FingerprintAlgorithm "json:\"algorithm\" graphql:\"algorithm\"" Hash string "json:\"hash\" graphql:\"hash\"" Duration int "json:\"duration\" graphql:\"duration\"" } + +func (t *FingerprintFragment) GetAlgorithm() *FingerprintAlgorithm { + if t == nil { + t = &FingerprintFragment{} + } + return &t.Algorithm +} +func (t *FingerprintFragment) GetHash() string { + if t == nil { + t = &FingerprintFragment{} + } + return t.Hash +} +func (t *FingerprintFragment) GetDuration() int { + if t == nil { + t = &FingerprintFragment{} + } + return t.Duration +} + type SceneFragment struct { ID string "json:\"id\" graphql:\"id\"" - Title *string "json:\"title\" graphql:\"title\"" - Code *string "json:\"code\" graphql:\"code\"" - Details *string "json:\"details\" graphql:\"details\"" - Director *string "json:\"director\" graphql:\"director\"" - Duration *int "json:\"duration\" graphql:\"duration\"" - Date *string "json:\"date\" graphql:\"date\"" + Title *string "json:\"title,omitempty\" graphql:\"title\"" + Code *string "json:\"code,omitempty\" graphql:\"code\"" + Details *string "json:\"details,omitempty\" graphql:\"details\"" + Director *string "json:\"director,omitempty\" graphql:\"director\"" + Duration *int "json:\"duration,omitempty\" graphql:\"duration\"" + Date *string "json:\"date,omitempty\" graphql:\"date\"" Urls []*URLFragment "json:\"urls\" graphql:\"urls\"" Images []*ImageFragment "json:\"images\" graphql:\"images\"" - Studio *StudioFragment "json:\"studio\" graphql:\"studio\"" + Studio *StudioFragment "json:\"studio,omitempty\" graphql:\"studio\"" Tags []*TagFragment "json:\"tags\" graphql:\"tags\"" Performers []*PerformerAppearanceFragment "json:\"performers\" graphql:\"performers\"" Fingerprints []*FingerprintFragment "json:\"fingerprints\" graphql:\"fingerprints\"" } + +func (t *SceneFragment) GetID() string { + if t == nil { + t = &SceneFragment{} + } + return t.ID +} +func (t *SceneFragment) GetTitle() *string { + if t == nil { + t = &SceneFragment{} + } + return t.Title +} +func (t *SceneFragment) GetCode() *string { + if t == nil { + t = &SceneFragment{} + } + return t.Code +} +func (t *SceneFragment) GetDetails() *string { + if t == nil { + t = &SceneFragment{} + } + return t.Details +} +func (t *SceneFragment) GetDirector() *string { + if t == nil { + t = &SceneFragment{} + } + return t.Director +} +func (t *SceneFragment) GetDuration() *int { + if t == nil { + t = &SceneFragment{} + } + return t.Duration +} +func (t *SceneFragment) GetDate() *string { + if t == nil { + t = &SceneFragment{} + } + return t.Date +} +func (t *SceneFragment) GetUrls() []*URLFragment { + if t == nil { + t = &SceneFragment{} + } + return t.Urls +} +func (t *SceneFragment) GetImages() []*ImageFragment { + if t == nil { + t = &SceneFragment{} + } + return t.Images +} +func (t *SceneFragment) GetStudio() *StudioFragment { + if t == nil { + t = &SceneFragment{} + } + return t.Studio +} +func (t *SceneFragment) GetTags() []*TagFragment { + if t == nil { + t = &SceneFragment{} + } + return t.Tags +} +func (t *SceneFragment) GetPerformers() []*PerformerAppearanceFragment { + if t == nil { + t = &SceneFragment{} + } + return t.Performers +} +func (t *SceneFragment) GetFingerprints() []*FingerprintFragment { + if t == nil { + t = &SceneFragment{} + } + return t.Fingerprints +} + +type StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *StudioFragment_Parent) GetName() string { + if t == nil { + t = &StudioFragment_Parent{} + } + return t.Name +} +func (t *StudioFragment_Parent) GetID() string { + if t == nil { + t = &StudioFragment_Parent{} + } + return t.ID +} + +type SceneFragment_Studio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *SceneFragment_Studio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &SceneFragment_Studio_StudioFragment_Parent{} + } + return t.Name +} +func (t *SceneFragment_Studio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &SceneFragment_Studio_StudioFragment_Parent{} + } + return t.ID +} + +type FindSceneByFingerprint_FindSceneByFingerprint_SceneFragment_Studio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *FindSceneByFingerprint_FindSceneByFingerprint_SceneFragment_Studio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &FindSceneByFingerprint_FindSceneByFingerprint_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.Name +} +func (t *FindSceneByFingerprint_FindSceneByFingerprint_SceneFragment_Studio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &FindSceneByFingerprint_FindSceneByFingerprint_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.ID +} + +type FindScenesByFullFingerprints_FindScenesByFullFingerprints_SceneFragment_Studio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *FindScenesByFullFingerprints_FindScenesByFullFingerprints_SceneFragment_Studio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &FindScenesByFullFingerprints_FindScenesByFullFingerprints_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.Name +} +func (t *FindScenesByFullFingerprints_FindScenesByFullFingerprints_SceneFragment_Studio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &FindScenesByFullFingerprints_FindScenesByFullFingerprints_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.ID +} + +type FindScenesBySceneFingerprints_FindScenesBySceneFingerprints_SceneFragment_Studio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *FindScenesBySceneFingerprints_FindScenesBySceneFingerprints_SceneFragment_Studio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &FindScenesBySceneFingerprints_FindScenesBySceneFingerprints_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.Name +} +func (t *FindScenesBySceneFingerprints_FindScenesBySceneFingerprints_SceneFragment_Studio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &FindScenesBySceneFingerprints_FindScenesBySceneFingerprints_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.ID +} + +type SearchScene_SearchScene_SceneFragment_Studio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *SearchScene_SearchScene_SceneFragment_Studio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &SearchScene_SearchScene_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.Name +} +func (t *SearchScene_SearchScene_SceneFragment_Studio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &SearchScene_SearchScene_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.ID +} + +type FindSceneByID_FindScene_SceneFragment_Studio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *FindSceneByID_FindScene_SceneFragment_Studio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &FindSceneByID_FindScene_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.Name +} +func (t *FindSceneByID_FindScene_SceneFragment_Studio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &FindSceneByID_FindScene_SceneFragment_Studio_StudioFragment_Parent{} + } + return t.ID +} + +type FindStudio_FindStudio_StudioFragment_Parent struct { + Name string "json:\"name\" graphql:\"name\"" + ID string "json:\"id\" graphql:\"id\"" +} + +func (t *FindStudio_FindStudio_StudioFragment_Parent) GetName() string { + if t == nil { + t = &FindStudio_FindStudio_StudioFragment_Parent{} + } + return t.Name +} +func (t *FindStudio_FindStudio_StudioFragment_Parent) GetID() string { + if t == nil { + t = &FindStudio_FindStudio_StudioFragment_Parent{} + } + return t.ID +} + +type Me_Me struct { + Name string "json:\"name\" graphql:\"name\"" +} + +func (t *Me_Me) GetName() string { + if t == nil { + t = &Me_Me{} + } + return t.Name +} + +type SubmitSceneDraft_SubmitSceneDraft struct { + ID *string "json:\"id,omitempty\" graphql:\"id\"" +} + +func (t *SubmitSceneDraft_SubmitSceneDraft) GetID() *string { + if t == nil { + t = &SubmitSceneDraft_SubmitSceneDraft{} + } + return t.ID +} + +type SubmitPerformerDraft_SubmitPerformerDraft struct { + ID *string "json:\"id,omitempty\" graphql:\"id\"" +} + +func (t *SubmitPerformerDraft_SubmitPerformerDraft) GetID() *string { + if t == nil { + t = &SubmitPerformerDraft_SubmitPerformerDraft{} + } + return t.ID +} + type FindSceneByFingerprint struct { FindSceneByFingerprint []*SceneFragment "json:\"findSceneByFingerprint\" graphql:\"findSceneByFingerprint\"" } + +func (t *FindSceneByFingerprint) GetFindSceneByFingerprint() []*SceneFragment { + if t == nil { + t = &FindSceneByFingerprint{} + } + return t.FindSceneByFingerprint +} + type FindScenesByFullFingerprints struct { FindScenesByFullFingerprints []*SceneFragment "json:\"findScenesByFullFingerprints\" graphql:\"findScenesByFullFingerprints\"" } + +func (t *FindScenesByFullFingerprints) GetFindScenesByFullFingerprints() []*SceneFragment { + if t == nil { + t = &FindScenesByFullFingerprints{} + } + return t.FindScenesByFullFingerprints +} + type FindScenesBySceneFingerprints struct { FindScenesBySceneFingerprints [][]*SceneFragment "json:\"findScenesBySceneFingerprints\" graphql:\"findScenesBySceneFingerprints\"" } + +func (t *FindScenesBySceneFingerprints) GetFindScenesBySceneFingerprints() [][]*SceneFragment { + if t == nil { + t = &FindScenesBySceneFingerprints{} + } + return t.FindScenesBySceneFingerprints +} + type SearchScene struct { SearchScene []*SceneFragment "json:\"searchScene\" graphql:\"searchScene\"" } + +func (t *SearchScene) GetSearchScene() []*SceneFragment { + if t == nil { + t = &SearchScene{} + } + return t.SearchScene +} + type SearchPerformer struct { SearchPerformer []*PerformerFragment "json:\"searchPerformer\" graphql:\"searchPerformer\"" } + +func (t *SearchPerformer) GetSearchPerformer() []*PerformerFragment { + if t == nil { + t = &SearchPerformer{} + } + return t.SearchPerformer +} + type FindPerformerByID struct { - FindPerformer *PerformerFragment "json:\"findPerformer\" graphql:\"findPerformer\"" + FindPerformer *PerformerFragment "json:\"findPerformer,omitempty\" graphql:\"findPerformer\"" } + +func (t *FindPerformerByID) GetFindPerformer() *PerformerFragment { + if t == nil { + t = &FindPerformerByID{} + } + return t.FindPerformer +} + type FindSceneByID struct { - FindScene *SceneFragment "json:\"findScene\" graphql:\"findScene\"" + FindScene *SceneFragment "json:\"findScene,omitempty\" graphql:\"findScene\"" } + +func (t *FindSceneByID) GetFindScene() *SceneFragment { + if t == nil { + t = &FindSceneByID{} + } + return t.FindScene +} + type FindStudio struct { - FindStudio *StudioFragment "json:\"findStudio\" graphql:\"findStudio\"" + FindStudio *StudioFragment "json:\"findStudio,omitempty\" graphql:\"findStudio\"" } + +func (t *FindStudio) GetFindStudio() *StudioFragment { + if t == nil { + t = &FindStudio{} + } + return t.FindStudio +} + type SubmitFingerprint struct { SubmitFingerprint bool "json:\"submitFingerprint\" graphql:\"submitFingerprint\"" } + +func (t *SubmitFingerprint) GetSubmitFingerprint() bool { + if t == nil { + t = &SubmitFingerprint{} + } + return t.SubmitFingerprint +} + type Me struct { - Me *struct { - Name string "json:\"name\" graphql:\"name\"" - } "json:\"me\" graphql:\"me\"" + Me *Me_Me "json:\"me,omitempty\" graphql:\"me\"" } + +func (t *Me) GetMe() *Me_Me { + if t == nil { + t = &Me{} + } + return t.Me +} + type SubmitSceneDraft struct { - SubmitSceneDraft struct { - ID *string "json:\"id\" graphql:\"id\"" - } "json:\"submitSceneDraft\" graphql:\"submitSceneDraft\"" + SubmitSceneDraft SubmitSceneDraft_SubmitSceneDraft "json:\"submitSceneDraft\" graphql:\"submitSceneDraft\"" } + +func (t *SubmitSceneDraft) GetSubmitSceneDraft() *SubmitSceneDraft_SubmitSceneDraft { + if t == nil { + t = &SubmitSceneDraft{} + } + return &t.SubmitSceneDraft +} + type SubmitPerformerDraft struct { - SubmitPerformerDraft struct { - ID *string "json:\"id\" graphql:\"id\"" - } "json:\"submitPerformerDraft\" graphql:\"submitPerformerDraft\"" + SubmitPerformerDraft SubmitPerformerDraft_SubmitPerformerDraft "json:\"submitPerformerDraft\" graphql:\"submitPerformerDraft\"" +} + +func (t *SubmitPerformerDraft) GetSubmitPerformerDraft() *SubmitPerformerDraft_SubmitPerformerDraft { + if t == nil { + t = &SubmitPerformerDraft{} + } + return &t.SubmitPerformerDraft } const FindSceneByFingerprintDocument = `query FindSceneByFingerprint ($fingerprint: FingerprintQueryInput!) { @@ -247,11 +803,6 @@ const FindSceneByFingerprintDocument = `query FindSceneByFingerprint ($fingerpri ... SceneFragment } } -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration -} fragment SceneFragment on Scene { id title @@ -279,28 +830,16 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } +fragment URLFragment on URL { + url + type +} fragment ImageFragment on Image { id url width height } -fragment TagFragment on Tag { - name - id -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment BodyModificationFragment on BodyModification { - location - description -} -fragment URLFragment on URL { - url - type -} fragment StudioFragment on Studio { name id @@ -315,6 +854,10 @@ fragment StudioFragment on Studio { ... ImageFragment } } +fragment TagFragment on Tag { + name + id +} fragment PerformerAppearanceFragment on PerformerAppearance { as performer { @@ -355,21 +898,38 @@ fragment PerformerFragment on Performer { ... BodyModificationFragment } } +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} fragment MeasurementsFragment on Measurements { band_size cup_size waist hip } +fragment BodyModificationFragment on BodyModification { + location + description +} +fragment FingerprintFragment on Fingerprint { + algorithm + hash + duration +} ` -func (c *Client) FindSceneByFingerprint(ctx context.Context, fingerprint FingerprintQueryInput, httpRequestOptions ...client.HTTPRequestOption) (*FindSceneByFingerprint, error) { - vars := map[string]interface{}{ +func (c *Client) FindSceneByFingerprint(ctx context.Context, fingerprint FingerprintQueryInput, interceptors ...clientv2.RequestInterceptor) (*FindSceneByFingerprint, error) { + vars := map[string]any{ "fingerprint": fingerprint, } var res FindSceneByFingerprint - if err := c.Client.Post(ctx, "FindSceneByFingerprint", FindSceneByFingerprintDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "FindSceneByFingerprint", FindSceneByFingerprintDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -381,16 +941,36 @@ const FindScenesByFullFingerprintsDocument = `query FindScenesByFullFingerprints ... SceneFragment } } -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash +fragment SceneFragment on Scene { + id + title + code + details + director duration + date + urls { + ... URLFragment + } + images { + ... ImageFragment + } + studio { + ... StudioFragment + } + tags { + ... TagFragment + } + performers { + ... PerformerAppearanceFragment + } + fingerprints { + ... FingerprintFragment + } +} +fragment URLFragment on URL { + url + type } fragment ImageFragment on Image { id @@ -398,6 +978,20 @@ fragment ImageFragment on Image { width height } +fragment StudioFragment on Studio { + name + id + urls { + ... URLFragment + } + parent { + name + id + } + images { + ... ImageFragment + } +} fragment TagFragment on Tag { name id @@ -446,64 +1040,34 @@ fragment FuzzyDateFragment on FuzzyDate { date accuracy } +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} fragment BodyModificationFragment on BodyModification { location description } -fragment SceneFragment on Scene { - id - title - code - details - director +fragment FingerprintFragment on Fingerprint { + algorithm + hash duration - date - urls { - ... URLFragment - } - images { - ... ImageFragment - } - studio { - ... StudioFragment - } - tags { - ... TagFragment - } - performers { - ... PerformerAppearanceFragment - } - fingerprints { - ... FingerprintFragment - } -} -fragment URLFragment on URL { - url - type -} -fragment StudioFragment on Studio { - name - id - urls { - ... URLFragment - } - parent { - name - id - } - images { - ... ImageFragment - } } ` -func (c *Client) FindScenesByFullFingerprints(ctx context.Context, fingerprints []*FingerprintQueryInput, httpRequestOptions ...client.HTTPRequestOption) (*FindScenesByFullFingerprints, error) { - vars := map[string]interface{}{ +func (c *Client) FindScenesByFullFingerprints(ctx context.Context, fingerprints []*FingerprintQueryInput, interceptors ...clientv2.RequestInterceptor) (*FindScenesByFullFingerprints, error) { + vars := map[string]any{ "fingerprints": fingerprints, } var res FindScenesByFullFingerprints - if err := c.Client.Post(ctx, "FindScenesByFullFingerprints", FindScenesByFullFingerprintsDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "FindScenesByFullFingerprints", FindScenesByFullFingerprintsDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -515,41 +1079,43 @@ const FindScenesBySceneFingerprintsDocument = `query FindScenesBySceneFingerprin ... SceneFragment } } +fragment SceneFragment on Scene { + id + title + code + details + director + duration + date + urls { + ... URLFragment + } + images { + ... ImageFragment + } + studio { + ... StudioFragment + } + tags { + ... TagFragment + } + performers { + ... PerformerAppearanceFragment + } + fingerprints { + ... FingerprintFragment + } +} +fragment URLFragment on URL { + url + type +} fragment ImageFragment on Image { id url width height } -fragment TagFragment on Tag { - name - id -} -fragment PerformerAppearanceFragment on PerformerAppearance { - as - performer { - ... PerformerFragment - } -} -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip -} -fragment BodyModificationFragment on BodyModification { - location - description -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration -} -fragment URLFragment on URL { - url - type -} fragment StudioFragment on Studio { name id @@ -564,6 +1130,16 @@ fragment StudioFragment on Studio { ... ImageFragment } } +fragment TagFragment on Tag { + name + id +} +fragment PerformerAppearanceFragment on PerformerAppearance { + as + performer { + ... PerformerFragment + } +} fragment PerformerFragment on Performer { id name @@ -602,42 +1178,34 @@ fragment FuzzyDateFragment on FuzzyDate { date accuracy } -fragment SceneFragment on Scene { - id - title - code - details - director +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} +fragment BodyModificationFragment on BodyModification { + location + description +} +fragment FingerprintFragment on Fingerprint { + algorithm + hash duration - date - urls { - ... URLFragment - } - images { - ... ImageFragment - } - studio { - ... StudioFragment - } - tags { - ... TagFragment - } - performers { - ... PerformerAppearanceFragment - } - fingerprints { - ... FingerprintFragment - } } ` -func (c *Client) FindScenesBySceneFingerprints(ctx context.Context, fingerprints [][]*FingerprintQueryInput, httpRequestOptions ...client.HTTPRequestOption) (*FindScenesBySceneFingerprints, error) { - vars := map[string]interface{}{ +func (c *Client) FindScenesBySceneFingerprints(ctx context.Context, fingerprints [][]*FingerprintQueryInput, interceptors ...clientv2.RequestInterceptor) (*FindScenesBySceneFingerprints, error) { + vars := map[string]any{ "fingerprints": fingerprints, } var res FindScenesBySceneFingerprints - if err := c.Client.Post(ctx, "FindScenesBySceneFingerprints", FindScenesBySceneFingerprintsDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "FindScenesBySceneFingerprints", FindScenesBySceneFingerprintsDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -676,27 +1244,6 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } -fragment PerformerAppearanceFragment on PerformerAppearance { - as - performer { - ... PerformerFragment - } -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration -} fragment URLFragment on URL { url type @@ -725,6 +1272,12 @@ fragment TagFragment on Tag { name id } +fragment PerformerAppearanceFragment on PerformerAppearance { + as + performer { + ... PerformerFragment + } +} fragment PerformerFragment on Performer { id name @@ -759,19 +1312,38 @@ fragment PerformerFragment on Performer { ... BodyModificationFragment } } +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} fragment BodyModificationFragment on BodyModification { location description } +fragment FingerprintFragment on Fingerprint { + algorithm + hash + duration +} ` -func (c *Client) SearchScene(ctx context.Context, term string, httpRequestOptions ...client.HTTPRequestOption) (*SearchScene, error) { - vars := map[string]interface{}{ +func (c *Client) SearchScene(ctx context.Context, term string, interceptors ...clientv2.RequestInterceptor) (*SearchScene, error) { + vars := map[string]any{ "term": term, } var res SearchScene - if err := c.Client.Post(ctx, "SearchScene", SearchSceneDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "SearchScene", SearchSceneDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -843,13 +1415,17 @@ fragment BodyModificationFragment on BodyModification { } ` -func (c *Client) SearchPerformer(ctx context.Context, term string, httpRequestOptions ...client.HTTPRequestOption) (*SearchPerformer, error) { - vars := map[string]interface{}{ +func (c *Client) SearchPerformer(ctx context.Context, term string, interceptors ...clientv2.RequestInterceptor) (*SearchPerformer, error) { + vars := map[string]any{ "term": term, } var res SearchPerformer - if err := c.Client.Post(ctx, "SearchPerformer", SearchPerformerDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "SearchPerformer", SearchPerformerDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -861,26 +1437,6 @@ const FindPerformerByIDDocument = `query FindPerformerByID ($id: ID!) { ... PerformerFragment } } -fragment ImageFragment on Image { - id - url - width - height -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip -} -fragment BodyModificationFragment on BodyModification { - location - description -} fragment PerformerFragment on Performer { id name @@ -919,15 +1475,39 @@ fragment URLFragment on URL { url type } +fragment ImageFragment on Image { + id + url + width + height +} +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} +fragment BodyModificationFragment on BodyModification { + location + description +} ` -func (c *Client) FindPerformerByID(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*FindPerformerByID, error) { - vars := map[string]interface{}{ +func (c *Client) FindPerformerByID(ctx context.Context, id string, interceptors ...clientv2.RequestInterceptor) (*FindPerformerByID, error) { + vars := map[string]any{ "id": id, } var res FindPerformerByID - if err := c.Client.Post(ctx, "FindPerformerByID", FindPerformerByIDDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "FindPerformerByID", FindPerformerByIDDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -939,93 +1519,6 @@ const FindSceneByIDDocument = `query FindSceneByID ($id: ID!) { ... SceneFragment } } -fragment StudioFragment on Studio { - name - id - urls { - ... URLFragment - } - parent { - name - id - } - images { - ... ImageFragment - } -} -fragment TagFragment on Tag { - name - id -} -fragment PerformerAppearanceFragment on PerformerAppearance { - as - performer { - ... PerformerFragment - } -} -fragment FuzzyDateFragment on FuzzyDate { - date - accuracy -} -fragment FingerprintFragment on Fingerprint { - algorithm - hash - duration -} -fragment ImageFragment on Image { - id - url - width - height -} -fragment URLFragment on URL { - url - type -} -fragment PerformerFragment on Performer { - id - name - disambiguation - aliases - gender - merged_ids - urls { - ... URLFragment - } - images { - ... ImageFragment - } - birthdate { - ... FuzzyDateFragment - } - ethnicity - country - eye_color - hair_color - height - measurements { - ... MeasurementsFragment - } - breast_type - career_start_year - career_end_year - tattoos { - ... BodyModificationFragment - } - piercings { - ... BodyModificationFragment - } -} -fragment MeasurementsFragment on Measurements { - band_size - cup_size - waist - hip -} -fragment BodyModificationFragment on BodyModification { - location - description -} fragment SceneFragment on Scene { id title @@ -1053,15 +1546,106 @@ fragment SceneFragment on Scene { ... FingerprintFragment } } +fragment URLFragment on URL { + url + type +} +fragment ImageFragment on Image { + id + url + width + height +} +fragment StudioFragment on Studio { + name + id + urls { + ... URLFragment + } + parent { + name + id + } + images { + ... ImageFragment + } +} +fragment TagFragment on Tag { + name + id +} +fragment PerformerAppearanceFragment on PerformerAppearance { + as + performer { + ... PerformerFragment + } +} +fragment PerformerFragment on Performer { + id + name + disambiguation + aliases + gender + merged_ids + urls { + ... URLFragment + } + images { + ... ImageFragment + } + birthdate { + ... FuzzyDateFragment + } + ethnicity + country + eye_color + hair_color + height + measurements { + ... MeasurementsFragment + } + breast_type + career_start_year + career_end_year + tattoos { + ... BodyModificationFragment + } + piercings { + ... BodyModificationFragment + } +} +fragment FuzzyDateFragment on FuzzyDate { + date + accuracy +} +fragment MeasurementsFragment on Measurements { + band_size + cup_size + waist + hip +} +fragment BodyModificationFragment on BodyModification { + location + description +} +fragment FingerprintFragment on Fingerprint { + algorithm + hash + duration +} ` -func (c *Client) FindSceneByID(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*FindSceneByID, error) { - vars := map[string]interface{}{ +func (c *Client) FindSceneByID(ctx context.Context, id string, interceptors ...clientv2.RequestInterceptor) (*FindSceneByID, error) { + vars := map[string]any{ "id": id, } var res FindSceneByID - if err := c.Client.Post(ctx, "FindSceneByID", FindSceneByIDDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "FindSceneByID", FindSceneByIDDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -1099,14 +1683,18 @@ fragment ImageFragment on Image { } ` -func (c *Client) FindStudio(ctx context.Context, id *string, name *string, httpRequestOptions ...client.HTTPRequestOption) (*FindStudio, error) { - vars := map[string]interface{}{ +func (c *Client) FindStudio(ctx context.Context, id *string, name *string, interceptors ...clientv2.RequestInterceptor) (*FindStudio, error) { + vars := map[string]any{ "id": id, "name": name, } var res FindStudio - if err := c.Client.Post(ctx, "FindStudio", FindStudioDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "FindStudio", FindStudioDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -1118,13 +1706,17 @@ const SubmitFingerprintDocument = `mutation SubmitFingerprint ($input: Fingerpri } ` -func (c *Client) SubmitFingerprint(ctx context.Context, input FingerprintSubmission, httpRequestOptions ...client.HTTPRequestOption) (*SubmitFingerprint, error) { - vars := map[string]interface{}{ +func (c *Client) SubmitFingerprint(ctx context.Context, input FingerprintSubmission, interceptors ...clientv2.RequestInterceptor) (*SubmitFingerprint, error) { + vars := map[string]any{ "input": input, } var res SubmitFingerprint - if err := c.Client.Post(ctx, "SubmitFingerprint", SubmitFingerprintDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "SubmitFingerprint", SubmitFingerprintDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -1138,11 +1730,15 @@ const MeDocument = `query Me { } ` -func (c *Client) Me(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*Me, error) { - vars := map[string]interface{}{} +func (c *Client) Me(ctx context.Context, interceptors ...clientv2.RequestInterceptor) (*Me, error) { + vars := map[string]any{} var res Me - if err := c.Client.Post(ctx, "Me", MeDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "Me", MeDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -1156,13 +1752,17 @@ const SubmitSceneDraftDocument = `mutation SubmitSceneDraft ($input: SceneDraftI } ` -func (c *Client) SubmitSceneDraft(ctx context.Context, input SceneDraftInput, httpRequestOptions ...client.HTTPRequestOption) (*SubmitSceneDraft, error) { - vars := map[string]interface{}{ +func (c *Client) SubmitSceneDraft(ctx context.Context, input SceneDraftInput, interceptors ...clientv2.RequestInterceptor) (*SubmitSceneDraft, error) { + vars := map[string]any{ "input": input, } var res SubmitSceneDraft - if err := c.Client.Post(ctx, "SubmitSceneDraft", SubmitSceneDraftDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "SubmitSceneDraft", SubmitSceneDraftDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -1176,15 +1776,34 @@ const SubmitPerformerDraftDocument = `mutation SubmitPerformerDraft ($input: Per } ` -func (c *Client) SubmitPerformerDraft(ctx context.Context, input PerformerDraftInput, httpRequestOptions ...client.HTTPRequestOption) (*SubmitPerformerDraft, error) { - vars := map[string]interface{}{ +func (c *Client) SubmitPerformerDraft(ctx context.Context, input PerformerDraftInput, interceptors ...clientv2.RequestInterceptor) (*SubmitPerformerDraft, error) { + vars := map[string]any{ "input": input, } var res SubmitPerformerDraft - if err := c.Client.Post(ctx, "SubmitPerformerDraft", SubmitPerformerDraftDocument, &res, vars, httpRequestOptions...); err != nil { + if err := c.Client.Post(ctx, "SubmitPerformerDraft", SubmitPerformerDraftDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } return &res, nil } + +var DocumentOperationNames = map[string]string{ + FindSceneByFingerprintDocument: "FindSceneByFingerprint", + FindScenesByFullFingerprintsDocument: "FindScenesByFullFingerprints", + FindScenesBySceneFingerprintsDocument: "FindScenesBySceneFingerprints", + SearchSceneDocument: "SearchScene", + SearchPerformerDocument: "SearchPerformer", + FindPerformerByIDDocument: "FindPerformerByID", + FindSceneByIDDocument: "FindSceneByID", + FindStudioDocument: "FindStudio", + SubmitFingerprintDocument: "SubmitFingerprint", + MeDocument: "Me", + SubmitSceneDraftDocument: "SubmitSceneDraft", + SubmitPerformerDraftDocument: "SubmitPerformerDraft", +} diff --git a/pkg/scraper/stashbox/graphql/generated_models.go b/pkg/scraper/stashbox/graphql/generated_models.go index 87f99db47..39022f6ea 100644 --- a/pkg/scraper/stashbox/graphql/generated_models.go +++ b/pkg/scraper/stashbox/graphql/generated_models.go @@ -80,7 +80,7 @@ type Draft struct { ID string `json:"id"` Created time.Time `json:"created"` Expires time.Time `json:"expires"` - Data DraftData `json:"data,omitempty"` + Data DraftData `json:"data"` } type DraftEntity struct { @@ -88,10 +88,12 @@ type DraftEntity struct { ID *string `json:"id,omitempty"` } -func (DraftEntity) IsSceneDraftStudio() {} -func (DraftEntity) IsSceneDraftTag() {} func (DraftEntity) IsSceneDraftPerformer() {} +func (DraftEntity) IsSceneDraftStudio() {} + +func (DraftEntity) IsSceneDraftTag() {} + type DraftEntityInput struct { Name string `json:"name"` ID *string `json:"id,omitempty"` @@ -114,7 +116,7 @@ type Edit struct { Target EditTarget `json:"target,omitempty"` TargetType TargetTypeEnum `json:"target_type"` // Objects to merge with the target. Only applicable to merges - MergeSources []EditTarget `json:"merge_sources,omitempty"` + MergeSources []EditTarget `json:"merge_sources"` Operation OperationEnum `json:"operation"` Bot bool `json:"bot"` Details EditDetails `json:"details,omitempty"` @@ -122,8 +124,8 @@ type Edit struct { OldDetails EditDetails `json:"old_details,omitempty"` // Entity specific options Options *PerformerEditOptions `json:"options,omitempty"` - Comments []*EditComment `json:"comments,omitempty"` - Votes []*EditVote `json:"votes,omitempty"` + Comments []*EditComment `json:"comments"` + Votes []*EditVote `json:"votes"` // = Accepted - Rejected VoteCount int `json:"vote_count"` // Is the edit considered destructive. @@ -179,11 +181,13 @@ type EditQueryInput struct { // Filter by user voted status Voted *UserVotedFilterEnum `json:"voted,omitempty"` // Filter to bot edits only - IsBot *bool `json:"is_bot,omitempty"` - Page int `json:"page"` - PerPage int `json:"per_page"` - Direction SortDirectionEnum `json:"direction"` - Sort EditSortEnum `json:"sort"` + IsBot *bool `json:"is_bot,omitempty"` + // Filter out user's own edits + IncludeUserSubmitted *bool `json:"include_user_submitted,omitempty"` + Page int `json:"page"` + PerPage int `json:"per_page"` + Direction SortDirectionEnum `json:"direction"` + Sort EditSortEnum `json:"sort"` } type EditVote struct { @@ -237,7 +241,7 @@ type FingerprintQueryInput struct { type FingerprintSubmission struct { SceneID string `json:"scene_id"` - Fingerprint *FingerprintInput `json:"fingerprint,omitempty"` + Fingerprint *FingerprintInput `json:"fingerprint"` Unmatch *bool `json:"unmatch,omitempty"` } @@ -246,6 +250,12 @@ type FuzzyDate struct { Accuracy DateAccuracyEnum `json:"accuracy"` } +type GenerateInviteCodeInput struct { + Keys *int `json:"keys,omitempty"` + Uses *int `json:"uses,omitempty"` + TTL *int `json:"ttl,omitempty"` +} + type GrantInviteInput struct { UserID string `json:"user_id"` Amount int `json:"amount"` @@ -257,7 +267,7 @@ type HairColorCriterionInput struct { } type IDCriterionInput struct { - Value []string `json:"value,omitempty"` + Value []string `json:"value"` Modifier CriterionModifier `json:"modifier"` } @@ -287,6 +297,12 @@ type IntCriterionInput struct { Modifier CriterionModifier `json:"modifier"` } +type InviteKey struct { + ID string `json:"id"` + Uses *int `json:"uses,omitempty"` + Expires *time.Time `json:"expires,omitempty"` +} + type Measurements struct { CupSize *string `json:"cup_size,omitempty"` BandSize *int `json:"band_size,omitempty"` @@ -300,10 +316,13 @@ type MultiIDCriterionInput struct { } type MultiStringCriterionInput struct { - Value []string `json:"value,omitempty"` + Value []string `json:"value"` Modifier CriterionModifier `json:"modifier"` } +type Mutation struct { +} + type NewUserInput struct { Email string `json:"email"` InviteKey *string `json:"invite_key,omitempty"` @@ -313,9 +332,9 @@ type Performer struct { ID string `json:"id"` Name string `json:"name"` Disambiguation *string `json:"disambiguation,omitempty"` - Aliases []string `json:"aliases,omitempty"` + Aliases []string `json:"aliases"` Gender *GenderEnum `json:"gender,omitempty"` - Urls []*URL `json:"urls,omitempty"` + Urls []*URL `json:"urls"` Birthdate *FuzzyDate `json:"birthdate,omitempty"` BirthDate *string `json:"birth_date,omitempty"` Age *int `json:"age,omitempty"` @@ -325,7 +344,7 @@ type Performer struct { HairColor *HairColorEnum `json:"hair_color,omitempty"` // Height in cm Height *int `json:"height,omitempty"` - Measurements *Measurements `json:"measurements,omitempty"` + Measurements *Measurements `json:"measurements"` CupSize *string `json:"cup_size,omitempty"` BandSize *int `json:"band_size,omitempty"` WaistSize *int `json:"waist_size,omitempty"` @@ -335,23 +354,24 @@ type Performer struct { CareerEndYear *int `json:"career_end_year,omitempty"` Tattoos []*BodyModification `json:"tattoos,omitempty"` Piercings []*BodyModification `json:"piercings,omitempty"` - Images []*Image `json:"images,omitempty"` + Images []*Image `json:"images"` Deleted bool `json:"deleted"` - Edits []*Edit `json:"edits,omitempty"` + Edits []*Edit `json:"edits"` SceneCount int `json:"scene_count"` - Scenes []*Scene `json:"scenes,omitempty"` - MergedIds []string `json:"merged_ids,omitempty"` - Studios []*PerformerStudio `json:"studios,omitempty"` + Scenes []*Scene `json:"scenes"` + MergedIds []string `json:"merged_ids"` + Studios []*PerformerStudio `json:"studios"` IsFavorite bool `json:"is_favorite"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` } -func (Performer) IsEditTarget() {} +func (Performer) IsEditTarget() {} + func (Performer) IsSceneDraftPerformer() {} type PerformerAppearance struct { - Performer *Performer `json:"performer,omitempty"` + Performer *Performer `json:"performer"` // Performing as alias As *string `json:"as,omitempty"` } @@ -466,11 +486,11 @@ type PerformerEdit struct { AddedImages []*Image `json:"added_images,omitempty"` RemovedImages []*Image `json:"removed_images,omitempty"` DraftID *string `json:"draft_id,omitempty"` - Aliases []string `json:"aliases,omitempty"` - Urls []*URL `json:"urls,omitempty"` - Images []*Image `json:"images,omitempty"` - Tattoos []*BodyModification `json:"tattoos,omitempty"` - Piercings []*BodyModification `json:"piercings,omitempty"` + Aliases []string `json:"aliases"` + Urls []*URL `json:"urls"` + Images []*Image `json:"images"` + Tattoos []*BodyModification `json:"tattoos"` + Piercings []*BodyModification `json:"piercings"` } func (PerformerEdit) IsEditDetails() {} @@ -501,7 +521,7 @@ type PerformerEditDetailsInput struct { } type PerformerEditInput struct { - Edit *EditInput `json:"edit,omitempty"` + Edit *EditInput `json:"edit"` // Not required for destroy type Details *PerformerEditDetailsInput `json:"details,omitempty"` // Controls aliases modification for merges and name modifications @@ -572,7 +592,7 @@ type PerformerScenesInput struct { } type PerformerStudio struct { - Studio *Studio `json:"studio,omitempty"` + Studio *Studio `json:"studio"` SceneCount int `json:"scene_count"` } @@ -601,55 +621,59 @@ type PerformerUpdateInput struct { ImageIds []string `json:"image_ids,omitempty"` } +// The query root for this schema +type Query struct { +} + type QueryEditsResultType struct { Count int `json:"count"` - Edits []*Edit `json:"edits,omitempty"` + Edits []*Edit `json:"edits"` } type QueryExistingSceneInput struct { Title *string `json:"title,omitempty"` StudioID *string `json:"studio_id,omitempty"` - Fingerprints []*FingerprintInput `json:"fingerprints,omitempty"` + Fingerprints []*FingerprintInput `json:"fingerprints"` } type QueryExistingSceneResult struct { - Edits []*Edit `json:"edits,omitempty"` - Scenes []*Scene `json:"scenes,omitempty"` + Edits []*Edit `json:"edits"` + Scenes []*Scene `json:"scenes"` } type QueryPerformersResultType struct { Count int `json:"count"` - Performers []*Performer `json:"performers,omitempty"` + Performers []*Performer `json:"performers"` } type QueryScenesResultType struct { Count int `json:"count"` - Scenes []*Scene `json:"scenes,omitempty"` + Scenes []*Scene `json:"scenes"` } type QuerySitesResultType struct { Count int `json:"count"` - Sites []*Site `json:"sites,omitempty"` + Sites []*Site `json:"sites"` } type QueryStudiosResultType struct { Count int `json:"count"` - Studios []*Studio `json:"studios,omitempty"` + Studios []*Studio `json:"studios"` } type QueryTagCategoriesResultType struct { Count int `json:"count"` - TagCategories []*TagCategory `json:"tag_categories,omitempty"` + TagCategories []*TagCategory `json:"tag_categories"` } type QueryTagsResultType struct { Count int `json:"count"` - Tags []*Tag `json:"tags,omitempty"` + Tags []*Tag `json:"tags"` } type QueryUsersResultType struct { Count int `json:"count"` - Users []*User `json:"users,omitempty"` + Users []*User `json:"users"` } type ResetPasswordInput struct { @@ -662,7 +686,7 @@ type RevokeInviteInput struct { } type RoleCriterionInput struct { - Value []RoleEnum `json:"value,omitempty"` + Value []RoleEnum `json:"value"` Modifier CriterionModifier `json:"modifier"` } @@ -672,17 +696,17 @@ type Scene struct { Details *string `json:"details,omitempty"` Date *string `json:"date,omitempty"` ReleaseDate *string `json:"release_date,omitempty"` - Urls []*URL `json:"urls,omitempty"` + Urls []*URL `json:"urls"` Studio *Studio `json:"studio,omitempty"` - Tags []*Tag `json:"tags,omitempty"` - Images []*Image `json:"images,omitempty"` - Performers []*PerformerAppearance `json:"performers,omitempty"` - Fingerprints []*Fingerprint `json:"fingerprints,omitempty"` + Tags []*Tag `json:"tags"` + Images []*Image `json:"images"` + Performers []*PerformerAppearance `json:"performers"` + Fingerprints []*Fingerprint `json:"fingerprints"` Duration *int `json:"duration,omitempty"` Director *string `json:"director,omitempty"` Code *string `json:"code,omitempty"` Deleted bool `json:"deleted"` - Edits []*Edit `json:"edits,omitempty"` + Edits []*Edit `json:"edits"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` } @@ -698,7 +722,7 @@ type SceneCreateInput struct { Performers []*PerformerAppearanceInput `json:"performers,omitempty"` TagIds []string `json:"tag_ids,omitempty"` ImageIds []string `json:"image_ids,omitempty"` - Fingerprints []*FingerprintEditInput `json:"fingerprints,omitempty"` + Fingerprints []*FingerprintEditInput `json:"fingerprints"` Duration *int `json:"duration,omitempty"` Director *string `json:"director,omitempty"` Code *string `json:"code,omitempty"` @@ -717,10 +741,10 @@ type SceneDraft struct { URL *URL `json:"url,omitempty"` Date *string `json:"date,omitempty"` Studio SceneDraftStudio `json:"studio,omitempty"` - Performers []SceneDraftPerformer `json:"performers,omitempty"` + Performers []SceneDraftPerformer `json:"performers"` Tags []SceneDraftTag `json:"tags,omitempty"` Image *Image `json:"image,omitempty"` - Fingerprints []*DraftFingerprint `json:"fingerprints,omitempty"` + Fingerprints []*DraftFingerprint `json:"fingerprints"` } func (SceneDraft) IsDraftData() {} @@ -745,11 +769,11 @@ type SceneEdit struct { Director *string `json:"director,omitempty"` Code *string `json:"code,omitempty"` DraftID *string `json:"draft_id,omitempty"` - Urls []*URL `json:"urls,omitempty"` - Performers []*PerformerAppearance `json:"performers,omitempty"` - Tags []*Tag `json:"tags,omitempty"` - Images []*Image `json:"images,omitempty"` - Fingerprints []*Fingerprint `json:"fingerprints,omitempty"` + Urls []*URL `json:"urls"` + Performers []*PerformerAppearance `json:"performers"` + Tags []*Tag `json:"tags"` + Images []*Image `json:"images"` + Fingerprints []*Fingerprint `json:"fingerprints"` } func (SceneEdit) IsEditDetails() {} @@ -771,7 +795,7 @@ type SceneEditDetailsInput struct { } type SceneEditInput struct { - Edit *EditInput `json:"edit,omitempty"` + Edit *EditInput `json:"edit"` // Not required for destroy type Details *SceneEditDetailsInput `json:"details,omitempty"` } @@ -829,7 +853,7 @@ type Site struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` Regex *string `json:"regex,omitempty"` - ValidTypes []ValidSiteTypeEnum `json:"valid_types,omitempty"` + ValidTypes []ValidSiteTypeEnum `json:"valid_types"` Icon string `json:"icon"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` @@ -840,7 +864,7 @@ type SiteCreateInput struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` Regex *string `json:"regex,omitempty"` - ValidTypes []ValidSiteTypeEnum `json:"valid_types,omitempty"` + ValidTypes []ValidSiteTypeEnum `json:"valid_types"` } type SiteDestroyInput struct { @@ -853,7 +877,7 @@ type SiteUpdateInput struct { Description *string `json:"description,omitempty"` URL *string `json:"url,omitempty"` Regex *string `json:"regex,omitempty"` - ValidTypes []ValidSiteTypeEnum `json:"valid_types,omitempty"` + ValidTypes []ValidSiteTypeEnum `json:"valid_types"` } type StashBoxConfig struct { @@ -865,6 +889,7 @@ type StashBoxConfig struct { VotingPeriod int `json:"voting_period"` MinDestructiveVotingPeriod int `json:"min_destructive_voting_period"` VoteCronInterval string `json:"vote_cron_interval"` + GuidelinesURL string `json:"guidelines_url"` } type StringCriterionInput struct { @@ -875,19 +900,20 @@ type StringCriterionInput struct { type Studio struct { ID string `json:"id"` Name string `json:"name"` - Urls []*URL `json:"urls,omitempty"` + Urls []*URL `json:"urls"` Parent *Studio `json:"parent,omitempty"` - ChildStudios []*Studio `json:"child_studios,omitempty"` - Images []*Image `json:"images,omitempty"` + ChildStudios []*Studio `json:"child_studios"` + Images []*Image `json:"images"` Deleted bool `json:"deleted"` IsFavorite bool `json:"is_favorite"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` - Performers *QueryPerformersResultType `json:"performers,omitempty"` + Performers *QueryPerformersResultType `json:"performers"` } +func (Studio) IsEditTarget() {} + func (Studio) IsSceneDraftStudio() {} -func (Studio) IsEditTarget() {} type StudioCreateInput struct { Name string `json:"name"` @@ -908,8 +934,8 @@ type StudioEdit struct { Parent *Studio `json:"parent,omitempty"` AddedImages []*Image `json:"added_images,omitempty"` RemovedImages []*Image `json:"removed_images,omitempty"` - Images []*Image `json:"images,omitempty"` - Urls []*URL `json:"urls,omitempty"` + Images []*Image `json:"images"` + Urls []*URL `json:"urls"` } func (StudioEdit) IsEditDetails() {} @@ -922,7 +948,7 @@ type StudioEditDetailsInput struct { } type StudioEditInput struct { - Edit *EditInput `json:"edit,omitempty"` + Edit *EditInput `json:"edit"` // Not required for destroy type Details *StudioEditDetailsInput `json:"details,omitempty"` } @@ -956,15 +982,16 @@ type Tag struct { ID string `json:"id"` Name string `json:"name"` Description *string `json:"description,omitempty"` - Aliases []string `json:"aliases,omitempty"` + Aliases []string `json:"aliases"` Deleted bool `json:"deleted"` - Edits []*Edit `json:"edits,omitempty"` + Edits []*Edit `json:"edits"` Category *TagCategory `json:"category,omitempty"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` } -func (Tag) IsEditTarget() {} +func (Tag) IsEditTarget() {} + func (Tag) IsSceneDraftTag() {} type TagCategory struct { @@ -1008,7 +1035,7 @@ type TagEdit struct { AddedAliases []string `json:"added_aliases,omitempty"` RemovedAliases []string `json:"removed_aliases,omitempty"` Category *TagCategory `json:"category,omitempty"` - Aliases []string `json:"aliases,omitempty"` + Aliases []string `json:"aliases"` } func (TagEdit) IsEditDetails() {} @@ -1021,7 +1048,7 @@ type TagEditDetailsInput struct { } type TagEditInput struct { - Edit *EditInput `json:"edit,omitempty"` + Edit *EditInput `json:"edit"` // Not required for destroy type Details *TagEditDetailsInput `json:"details,omitempty"` } @@ -1034,7 +1061,6 @@ type TagQueryInput struct { // Filter to search name - assumes like query unless quoted Name *string `json:"name,omitempty"` // Filter to category ID - IsFavorite *bool `json:"is_favorite,omitempty"` CategoryID *string `json:"category_id,omitempty"` Page int `json:"page"` PerPage int `json:"per_page"` @@ -1053,7 +1079,7 @@ type TagUpdateInput struct { type URL struct { URL string `json:"url"` Type string `json:"type"` - Site *Site `json:"site,omitempty"` + Site *Site `json:"site"` } type URLInput struct { @@ -1071,14 +1097,15 @@ type User struct { // Should not be visible to other users APIKey *string `json:"api_key,omitempty"` // Vote counts by type - VoteCount *UserVoteCount `json:"vote_count,omitempty"` + VoteCount *UserVoteCount `json:"vote_count"` // Edit counts by status - EditCount *UserEditCount `json:"edit_count,omitempty"` + EditCount *UserEditCount `json:"edit_count"` // Calls to the API from this user over a configurable time period - APICalls int `json:"api_calls"` - InvitedBy *User `json:"invited_by,omitempty"` - InviteTokens *int `json:"invite_tokens,omitempty"` - ActiveInviteCodes []string `json:"active_invite_codes,omitempty"` + APICalls int `json:"api_calls"` + InvitedBy *User `json:"invited_by,omitempty"` + InviteTokens *int `json:"invite_tokens,omitempty"` + ActiveInviteCodes []string `json:"active_invite_codes,omitempty"` + InviteCodes []*InviteKey `json:"invite_codes,omitempty"` } type UserChangePasswordInput struct { @@ -1092,7 +1119,7 @@ type UserCreateInput struct { Name string `json:"name"` // Password in plain text Password string `json:"password"` - Roles []RoleEnum `json:"roles,omitempty"` + Roles []RoleEnum `json:"roles"` Email string `json:"email"` InvitedByID *string `json:"invited_by_id,omitempty"` } diff --git a/pkg/scraper/stashbox/stash_box.go b/pkg/scraper/stashbox/stash_box.go index 0b0cf68d6..44fd59b69 100644 --- a/pkg/scraper/stashbox/stash_box.go +++ b/pkg/scraper/stashbox/stash_box.go @@ -13,7 +13,7 @@ import ( "strconv" "strings" - "github.com/Yamashou/gqlgenc/client" + "github.com/Yamashou/gqlgenc/clientv2" "github.com/Yamashou/gqlgenc/graphqljson" "github.com/gofrs/uuid/v5" "golang.org/x/text/cases" @@ -89,12 +89,13 @@ type Client struct { // NewClient returns a new instance of a stash-box client. func NewClient(box models.StashBox, repo Repository) *Client { - authHeader := func(req *http.Request) { + authHeader := func(ctx context.Context, req *http.Request, gqlInfo *clientv2.GQLRequestInfo, res interface{}, next clientv2.RequestInterceptorFunc) error { req.Header.Set("ApiKey", box.APIKey) + return next(ctx, req, gqlInfo, res) } client := &graphql.Client{ - Client: client.NewClient(http.DefaultClient, box.Endpoint, authHeader), + Client: clientv2.NewClient(http.DefaultClient, box.Endpoint, nil, authHeader), } return &Client{ @@ -627,7 +628,7 @@ func performerFragmentToScrapedPerformer(p graphql.PerformerFragment) *models.Sc Name: &p.Name, Disambiguation: p.Disambiguation, Country: p.Country, - Measurements: formatMeasurements(p.Measurements), + Measurements: formatMeasurements(*p.Measurements), CareerLength: formatCareerLength(p.CareerStartYear, p.CareerEndYear), Tattoos: formatBodyModifications(p.Tattoos), Piercings: formatBodyModifications(p.Piercings), @@ -805,7 +806,7 @@ func (c Client) sceneFragmentToScrapedScene(ctx context.Context, s *graphql.Scen } for _, p := range s.Performers { - sp := performerFragmentToScrapedPerformer(p.Performer) + sp := performerFragmentToScrapedPerformer(*p.Performer) err := match.ScrapedPerformer(ctx, pqb, sp, &c.box.Endpoint) if err != nil { @@ -1281,7 +1282,7 @@ func (c *Client) submitDraft(ctx context.Context, query string, input interface{ "input": input, } - r := &client.Request{ + r := &clientv2.Request{ Query: query, Variables: vars, OperationName: "", @@ -1341,7 +1342,7 @@ func (c *Client) submitDraft(ctx context.Context, query string, input interface{ if len(respGQL.Errors) > 0 { // try to parse standard graphql error - errors := &client.GqlErrorList{} + errors := &clientv2.GqlErrorList{} if e := json.Unmarshal(responseBytes, errors); e != nil { return fmt.Errorf("failed to parse graphql errors. Response content %s - %w ", string(responseBytes), e) }