From e71a3525216a8055efe584307ed89530f1353946 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Mon, 3 Jul 2023 21:31:46 +0200 Subject: [PATCH] Update dependencies --- go.mod | 20 +- go.sum | 41 +- .../99designs/gqlgen/codegen/config/binder.go | 42 +- .../99designs/gqlgen/codegen/config/config.go | 10 +- .../gqlgen/codegen/config/initialisms.go | 94 ++ .../gqlgen/codegen/templates/templates.go | 100 +- .../gqlgen/graphql/handler/transport/sse.go | 29 +- .../graphql/introspection/introspection.go | 6 +- .../playground/apollo_sandbox_playground.go | 4 +- .../99designs/gqlgen/graphql/version.go | 2 +- .../gqlgen/init-templates/gqlgen.yml.gotmpl | 3 + .../gqlgen/plugin/modelgen/models.go | 2 + .../gqlgen/plugin/modelgen/models.gotpl | 8 +- .../caddyserver/certmagic/README.md | 19 +- .../caddyserver/certmagic/certmagic.go | 17 + .../caddyserver/certmagic/config.go | 97 +- .../caddyserver/certmagic/filestorage.go | 29 +- .../hashicorp/golang-lru/v2/simplelru/lru.go | 3 + .../klauspost/compress/s2/reader.go | 7 + vendor/github.com/mholt/acmez/acme/client.go | 4 + vendor/github.com/mholt/acmez/client.go | 152 ++- .../acmez/{certificate_request.go => csr.go} | 14 + vendor/github.com/miekg/dns/client.go | 11 +- vendor/github.com/miekg/dns/version.go | 2 +- .../minio-go/v7/api-bucket-replication.go | 64 ++ .../minio/minio-go/v7/api-compose-object.go | 3 + .../minio/minio-go/v7/api-error-response.go | 10 + .../minio/minio-go/v7/api-put-object.go | 20 +- .../minio/minio-go/v7/api-remove.go | 12 +- vendor/github.com/minio/minio-go/v7/api.go | 32 +- .../github.com/minio/minio-go/v7/constants.go | 2 + .../v7/pkg/notification/notification.go | 39 +- .../v7/pkg/replication/replication.go | 114 +- .../shirou/gopsutil/v3/common/env.go | 23 + .../shirou/gopsutil/v3/cpu/cpu_linux.go | 26 +- .../shirou/gopsutil/v3/disk/disk_darwin.go | 3 +- .../shirou/gopsutil/v3/disk/disk_linux.go | 24 +- .../gopsutil/v3/internal/common/common.go | 55 + .../v3/internal/common/common_linux.go | 30 +- .../shirou/gopsutil/v3/mem/mem_darwin.go | 3 +- .../shirou/gopsutil/v3/mem/mem_linux.go | 24 +- .../shirou/gopsutil/v3/net/net_darwin.go | 2 +- .../shirou/gopsutil/v3/net/net_linux.go | 24 +- .../gopsutil/v3/process/process_darwin.go | 5 +- .../gopsutil/v3/process/process_linux.go | 62 +- .../gopsutil/v3/process/process_posix.go | 4 +- .../gopsutil/v3/process/process_solaris.go | 14 +- .../vektah/gqlparser/v2/ast/comment.go | 31 + .../vektah/gqlparser/v2/ast/definition.go | 16 + .../vektah/gqlparser/v2/ast/document.go | 9 + .../vektah/gqlparser/v2/ast/fragment.go | 3 + .../vektah/gqlparser/v2/ast/operation.go | 2 + .../vektah/gqlparser/v2/ast/selection.go | 2 + .../vektah/gqlparser/v2/ast/value.go | 2 + .../vektah/gqlparser/v2/lexer/lexer.go | 5 +- .../vektah/gqlparser/v2/lexer/lexer_test.yml | 85 +- .../vektah/gqlparser/v2/parser/parser.go | 69 +- .../vektah/gqlparser/v2/parser/query.go | 23 +- .../vektah/gqlparser/v2/parser/query_test.yml | 1 + .../vektah/gqlparser/v2/parser/schema.go | 216 ++-- .../gqlparser/v2/parser/schema_test.yml | 114 ++ .../protobuf/encoding/prototext/encode.go | 14 +- .../protobuf/internal/encoding/text/encode.go | 10 +- .../protobuf/internal/genid/descriptor_gen.go | 48 + .../protobuf/internal/genid/type_gen.go | 6 + .../protobuf/internal/order/order.go | 2 +- .../protobuf/internal/version/version.go | 2 +- .../google.golang.org/protobuf/proto/size.go | 10 +- .../reflect/protoreflect/source_gen.go | 27 + .../types/descriptorpb/descriptor.pb.go | 1009 +++++++++++------ .../types/known/timestamppb/timestamp.pb.go | 2 +- vendor/modules.txt | 21 +- 72 files changed, 2174 insertions(+), 866 deletions(-) create mode 100644 vendor/github.com/99designs/gqlgen/codegen/config/initialisms.go rename vendor/github.com/mholt/acmez/{certificate_request.go => csr.go} (86%) create mode 100644 vendor/github.com/shirou/gopsutil/v3/common/env.go create mode 100644 vendor/github.com/vektah/gqlparser/v2/ast/comment.go diff --git a/go.mod b/go.mod index 9cc99793..d9a0b015 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/datarhei/core/v16 go 1.18 require ( - github.com/99designs/gqlgen v0.17.33 + github.com/99designs/gqlgen v0.17.34 github.com/Masterminds/semver/v3 v3.2.1 github.com/adhocore/gronx v1.6.3 github.com/atrox/haikunatorgo/v2 v2.0.1 - github.com/caddyserver/certmagic v0.18.0 + github.com/caddyserver/certmagic v0.18.2 github.com/casbin/casbin/v2 v2.71.1 github.com/datarhei/core-client-go/v16 v16.11.1-0.20230627120001-16d06aa77802 github.com/datarhei/gosrt v0.5.2 @@ -28,14 +28,14 @@ require ( github.com/lestrrat-go/strftime v1.0.6 github.com/lithammer/shortuuid/v4 v4.0.0 github.com/mattn/go-isatty v0.0.19 - github.com/minio/minio-go/v7 v7.0.57 + github.com/minio/minio-go/v7 v7.0.59 github.com/prep/average v0.0.0-20200506183628-d26c465f48c3 github.com/prometheus/client_golang v1.16.0 - github.com/shirou/gopsutil/v3 v3.23.5 + github.com/shirou/gopsutil/v3 v3.23.6 github.com/stretchr/testify v1.8.4 github.com/swaggo/echo-swagger v1.4.0 github.com/swaggo/swag v1.16.1 - github.com/vektah/gqlparser/v2 v2.5.3 + github.com/vektah/gqlparser/v2 v2.5.6 github.com/xeipuuv/gojsonschema v1.2.0 go.etcd.io/bbolt v1.3.7 go.uber.org/automaxprocs v1.5.2 @@ -73,11 +73,11 @@ require ( github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.3 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.4 // indirect github.com/iancoleman/orderedmap v0.2.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.6 // indirect + github.com/klauspost/compress v1.16.7 // indirect github.com/labstack/gommon v0.4.0 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/libdns/libdns v0.2.1 // indirect @@ -85,8 +85,8 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/mholt/acmez v1.1.1 // indirect - github.com/miekg/dns v1.1.54 // indirect + github.com/mholt/acmez v1.2.0 // indirect + github.com/miekg/dns v1.1.55 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -120,7 +120,7 @@ require ( golang.org/x/text v0.10.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.10.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + google.golang.org/protobuf v1.31.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 5f4dafdd..64d270aa 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/99designs/gqlgen v0.17.33 h1:VTUpAtElDszatPSe26N0SD0deJCSxb7TZLlUb6JnVRY= -github.com/99designs/gqlgen v0.17.33/go.mod h1:ygDK+m8zGpoQuSh8xoq80UfisR5JTZr7mN57qXlSIZs= +github.com/99designs/gqlgen v0.17.34 h1:5cS5/OKFguQt+Ws56uj9FlG2xm1IlcJWNF2jrMIKYFQ= +github.com/99designs/gqlgen v0.17.34/go.mod h1:Axcd3jIFHBVcqzixujJQr1wGqE+lGTpz6u4iZBZg1G8= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= @@ -34,8 +34,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/caddyserver/certmagic v0.18.0 h1:L22mJES1WllfLoHUcQUy4wVO7UfOsoL5wtg/Bj7kmIw= -github.com/caddyserver/certmagic v0.18.0/go.mod h1:e0YLTnXIopZ05bBWCLzpIf1Yvk27Q90FGUmGowFRDY8= +github.com/caddyserver/certmagic v0.18.2 h1:Nj2+M+A2Ho9IF6n1wUSbra4mX1X6ALzWpul9HooprHA= +github.com/caddyserver/certmagic v0.18.2/go.mod h1:cLsgYXecH1iVUPjDXw15/1SKjZk/TK+aFfQk5FnugGQ= github.com/casbin/casbin/v2 v2.71.1 h1:LRHyqM0S1LzM/K59PmfUIN0ZJfLgcOjL4OhOQI/FNXU= github.com/casbin/casbin/v2 v2.71.1/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -138,8 +138,8 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.3 h1:kmRrRLlInXvng0SmLxmQpQkpbYAvcXm7NPDrgxJa9mE= -github.com/hashicorp/golang-lru/v2 v2.0.3/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/golang-lru/v2 v2.0.4 h1:7GHuZcgid37q8o5i3QI9KMT4nCWQQ3Kx3Ov6bb9MfK0= +github.com/hashicorp/golang-lru/v2 v2.0.4/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/raft v1.1.0/go.mod h1:4Ak7FSPnuvmb0GV6vgIAJ4vYT4bek9bb6Q+7HVbyzqM= github.com/hashicorp/raft v1.5.0 h1:uNs9EfJ4FwiArZRxxfd/dQ5d33nV31/CdCHArH89hT8= github.com/hashicorp/raft v1.5.0/go.mod h1:pKHB2mf/Y25u3AHNSXVRv+yT+WAnmeTX0BwVppVQV+M= @@ -161,8 +161,8 @@ github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/klauspost/compress v1.16.6 h1:91SKEy4K37vkp255cJ8QesJhjyRO0hn9i9G0GoUwLsk= -github.com/klauspost/compress v1.16.6/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= @@ -210,14 +210,14 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mholt/acmez v1.1.1 h1:sYeeYd/EHVm9cSmLdWey5oW/fXFVAq5pNLjSczN2ZUg= -github.com/mholt/acmez v1.1.1/go.mod h1:VT9YwH1xgNX1kmYY89gY8xPJC84BFAisjo8Egigt4kE= -github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= -github.com/miekg/dns v1.1.54/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= +github.com/mholt/acmez v1.2.0 h1:1hhLxSgY5FvH5HCnGUuwbKY2VQVo8IU7rxXKSnZ7F30= +github.com/mholt/acmez v1.2.0/go.mod h1:VT9YwH1xgNX1kmYY89gY8xPJC84BFAisjo8Egigt4kE= +github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= +github.com/miekg/dns v1.1.55/go.mod h1:uInx36IzPl7FYnDcMeVWxj9byh7DutNykX4G9Sj60FY= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.57 h1:xsFiOiWjpC1XAGbFEUOzj1/gMXGz7ljfxifwcb/5YXU= -github.com/minio/minio-go/v7 v7.0.57/go.mod h1:NUDy4A4oXPq1l2yK6LTSvCEzAMeIcoz9lcj5dbzSrRE= +github.com/minio/minio-go/v7 v7.0.59 h1:lxIXwsTIcQkYoEG25rUJbzpmSB/oWeVDmxFo/uWUUsw= +github.com/minio/minio-go/v7 v7.0.59/go.mod h1:NUDy4A4oXPq1l2yK6LTSvCEzAMeIcoz9lcj5dbzSrRE= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -275,8 +275,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 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/shirou/gopsutil/v3 v3.23.5 h1:5SgDCeQ0KW0S4N0znjeM/eFHXXOKyv2dVNgRq/c9P6Y= -github.com/shirou/gopsutil/v3 v3.23.5/go.mod h1:Ng3Maa27Q2KARVJ0SPZF5NdrQSC3XHKP8IIWrHgMeLY= +github.com/shirou/gopsutil/v3 v3.23.6 h1:5y46WPI9QBKBbK7EEccUPNXpJpNrvPuTD0O2zHEHT08= +github.com/shirou/gopsutil/v3 v3.23.6/go.mod h1:j7QX50DrXYggrpN30W0Mo+I4/8U2UUIQrnrhqUeWrAU= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -300,7 +300,6 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/swaggo/echo-swagger v1.4.0 h1:RCxLKySw1SceHLqnmc41pKyiIeE+OiD7NSI7FUOBlLo= @@ -322,8 +321,8 @@ github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyC github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vektah/gqlparser/v2 v2.5.3 h1:goUwv4+blhtwR3GwefadPVI4ubYc/WZSypljWMQa6IE= -github.com/vektah/gqlparser/v2 v2.5.3/go.mod h1:z8xXUff237NntSuH8mLFijZ+1tjV1swDbpDqjJmk6ME= +github.com/vektah/gqlparser/v2 v2.5.6 h1:Ou14T0N1s191eRMZ1gARVqohcbe1e8FrcONScsq8cRU= +github.com/vektah/gqlparser/v2 v2.5.6/go.mod h1:z8xXUff237NntSuH8mLFijZ+1tjV1swDbpDqjJmk6ME= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -420,8 +419,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/binder.go b/vendor/github.com/99designs/gqlgen/codegen/config/binder.go index e479417a..0483afdb 100644 --- a/vendor/github.com/99designs/gqlgen/codegen/config/binder.go +++ b/vendor/github.com/99designs/gqlgen/codegen/config/binder.go @@ -5,10 +5,10 @@ import ( "fmt" "go/token" "go/types" + "strings" "golang.org/x/tools/go/packages" - "github.com/99designs/gqlgen/codegen/templates" "github.com/99designs/gqlgen/internal/code" "github.com/vektah/gqlparser/v2/ast" ) @@ -285,7 +285,7 @@ func (ref *TypeReference) UniquenessKey() string { // Fix for #896 elemNullability = "ᚄ" } - return nullability + ref.Definition.Name + "2" + templates.TypeIdentifier(ref.GO) + elemNullability + return nullability + ref.Definition.Name + "2" + TypeIdentifier(ref.GO) + elemNullability } func (ref *TypeReference) MarshalFunc() string { @@ -540,3 +540,41 @@ func basicUnderlying(it types.Type) *types.Basic { return nil } + +var pkgReplacer = strings.NewReplacer( + "/", "ᚋ", + ".", "ᚗ", + "-", "ᚑ", + "~", "א", +) + +func TypeIdentifier(t types.Type) string { + res := "" + for { + switch it := t.(type) { + case *types.Pointer: + t.Underlying() + res += "ᚖ" + t = it.Elem() + case *types.Slice: + res += "ᚕ" + t = it.Elem() + case *types.Named: + res += pkgReplacer.Replace(it.Obj().Pkg().Path()) + res += "ᚐ" + res += it.Obj().Name() + return res + case *types.Basic: + res += it.Name() + return res + case *types.Map: + res += "map" + return res + case *types.Interface: + res += "interface" + return res + default: + panic(fmt.Errorf("unexpected type %T", it)) + } + } +} diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/config.go b/vendor/github.com/99designs/gqlgen/codegen/config/config.go index df4f6be3..8a7205f0 100644 --- a/vendor/github.com/99designs/gqlgen/codegen/config/config.go +++ b/vendor/github.com/99designs/gqlgen/codegen/config/config.go @@ -26,8 +26,10 @@ type Config struct { Models TypeMap `yaml:"models,omitempty"` StructTag string `yaml:"struct_tag,omitempty"` Directives map[string]DirectiveConfig `yaml:"directives,omitempty"` + GoInitialisms GoInitialismsConfig `yaml:"go_initialisms,omitempty"` OmitSliceElementPointers bool `yaml:"omit_slice_element_pointers,omitempty"` OmitGetters bool `yaml:"omit_getters,omitempty"` + OmitInterfaceChecks bool `yaml:"omit_interface_checks,omitempty"` OmitComplexity bool `yaml:"omit_complexity,omitempty"` OmitGQLGenFileNotice bool `yaml:"omit_gqlgen_file_notice,omitempty"` OmitGQLGenVersionInFileNotice bool `yaml:"omit_gqlgen_version_in_file_notice,omitempty"` @@ -201,6 +203,9 @@ func CompleteConfig(config *Config) error { config.Sources = append(config.Sources, &ast.Source{Name: filename, Input: string(schemaRaw)}) } + + config.GoInitialisms.setInitialisms() + return nil } @@ -305,8 +310,9 @@ func (c *Config) injectTypesFromSchema() error { if c.Models[schemaType.Name].Fields == nil { c.Models[schemaType.Name] = TypeMapEntry{ - Model: c.Models[schemaType.Name].Model, - Fields: map[string]TypeMapField{}, + Model: c.Models[schemaType.Name].Model, + ExtraFields: c.Models[schemaType.Name].ExtraFields, + Fields: map[string]TypeMapField{}, } } diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/initialisms.go b/vendor/github.com/99designs/gqlgen/codegen/config/initialisms.go new file mode 100644 index 00000000..5c169c89 --- /dev/null +++ b/vendor/github.com/99designs/gqlgen/codegen/config/initialisms.go @@ -0,0 +1,94 @@ +package config + +import "strings" + +// commonInitialisms is a set of common initialisms. +// Only add entries that are highly unlikely to be non-initialisms. +// For instance, "ID" is fine (Freudian code is rare), but "AND" is not. +var commonInitialisms = map[string]bool{ + "ACL": true, + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "CSV": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTP": true, + "HTTPS": true, + "ICMP": true, + "ID": true, + "IP": true, + "JSON": true, + "KVK": true, + "LHS": true, + "PDF": true, + "PGP": true, + "QPS": true, + "QR": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SQL": true, + "SSH": true, + "SVG": true, + "TCP": true, + "TLS": true, + "TTL": true, + "UDP": true, + "UI": true, + "UID": true, + "URI": true, + "URL": true, + "UTF8": true, + "UUID": true, + "VM": true, + "XML": true, + "XMPP": true, + "XSRF": true, + "XSS": true, +} + +// GetInitialisms returns the initialisms to capitalize in Go names. If unchanged, default initialisms will be returned +var GetInitialisms = func() map[string]bool { + return commonInitialisms +} + +// GoInitialismsConfig allows to modify the default behavior of naming Go methods, types and properties +type GoInitialismsConfig struct { + // If true, the Initialisms won't get appended to the default ones but replace them + ReplaceDefaults bool `yaml:"replace_defaults"` + // Custom initialisms to be added or to replace the default ones + Initialisms []string `yaml:"initialisms"` +} + +// setInitialisms adjustes GetInitialisms based on its settings. +func (i GoInitialismsConfig) setInitialisms() { + toUse := i.determineGoInitialisms() + GetInitialisms = func() map[string]bool { + return toUse + } +} + +// determineGoInitialisms returns the Go initialims to be used, based on its settings. +func (i GoInitialismsConfig) determineGoInitialisms() (initialismsToUse map[string]bool) { + if i.ReplaceDefaults { + initialismsToUse = make(map[string]bool, len(i.Initialisms)) + for _, initialism := range i.Initialisms { + initialismsToUse[strings.ToUpper(initialism)] = true + } + } else { + initialismsToUse = make(map[string]bool, len(commonInitialisms)+len(i.Initialisms)) + for initialism, value := range commonInitialisms { + initialismsToUse[strings.ToUpper(initialism)] = value + } + for _, initialism := range i.Initialisms { + initialismsToUse[strings.ToUpper(initialism)] = true + } + } + return initialismsToUse +} diff --git a/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go b/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go index a3b3be0a..332498f8 100644 --- a/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go +++ b/vendor/github.com/99designs/gqlgen/codegen/templates/templates.go @@ -17,8 +17,8 @@ import ( "text/template" "unicode" + "github.com/99designs/gqlgen/codegen/config" "github.com/99designs/gqlgen/internal/code" - "github.com/99designs/gqlgen/internal/imports" ) @@ -202,7 +202,7 @@ func Funcs() template.FuncMap { "rawQuote": rawQuote, "dump": Dump, "ref": ref, - "ts": TypeIdentifier, + "ts": config.TypeIdentifier, "call": Call, "prefixLines": prefixLines, "notNil": notNil, @@ -248,44 +248,6 @@ func ref(p types.Type) string { return CurrentImports.LookupType(p) } -var pkgReplacer = strings.NewReplacer( - "/", "ᚋ", - ".", "ᚗ", - "-", "ᚑ", - "~", "א", -) - -func TypeIdentifier(t types.Type) string { - res := "" - for { - switch it := t.(type) { - case *types.Pointer: - t.Underlying() - res += "ᚖ" - t = it.Elem() - case *types.Slice: - res += "ᚕ" - t = it.Elem() - case *types.Named: - res += pkgReplacer.Replace(it.Obj().Pkg().Path()) - res += "ᚐ" - res += it.Obj().Name() - return res - case *types.Basic: - res += it.Name() - return res - case *types.Map: - res += "map" - return res - case *types.Interface: - res += "interface" - return res - default: - panic(fmt.Errorf("unexpected type %T", it)) - } - } -} - func Call(p *types.Func) string { pkg := CurrentImports.Lookup(p.Pkg().Path()) @@ -503,14 +465,15 @@ func wordWalker(str string, f func(*wordInfo)) { } i++ + initialisms := config.GetInitialisms() // [w,i) is a word. word := string(runes[w:i]) - if !eow && commonInitialisms[word] && !unicode.IsLower(runes[i]) { + if !eow && initialisms[word] && !unicode.IsLower(runes[i]) { // through // split IDFoo → ID, Foo // but URLs → URLs } else if !eow { - if commonInitialisms[word] { + if initialisms[word] { hasCommonInitial = true } continue @@ -518,7 +481,7 @@ func wordWalker(str string, f func(*wordInfo)) { matchCommonInitial := false upperWord := strings.ToUpper(word) - if commonInitialisms[upperWord] { + if initialisms[upperWord] { // If the uppercase word (string(runes[w:i]) is "ID" or "IP" // AND // the word is the first two characters of the str @@ -591,57 +554,6 @@ func sanitizeKeywords(name string) string { return name } -// commonInitialisms is a set of common initialisms. -// Only add entries that are highly unlikely to be non-initialisms. -// For instance, "ID" is fine (Freudian code is rare), but "AND" is not. -var commonInitialisms = map[string]bool{ - "ACL": true, - "API": true, - "ASCII": true, - "CPU": true, - "CSS": true, - "CSV": true, - "DNS": true, - "EOF": true, - "GUID": true, - "HTML": true, - "HTTP": true, - "HTTPS": true, - "ICMP": true, - "ID": true, - "IP": true, - "JSON": true, - "KVK": true, - "LHS": true, - "PDF": true, - "PGP": true, - "QPS": true, - "QR": true, - "RAM": true, - "RHS": true, - "RPC": true, - "SLA": true, - "SMTP": true, - "SQL": true, - "SSH": true, - "SVG": true, - "TCP": true, - "TLS": true, - "TTL": true, - "UDP": true, - "UI": true, - "UID": true, - "URI": true, - "URL": true, - "UTF8": true, - "UUID": true, - "VM": true, - "XML": true, - "XMPP": true, - "XSRF": true, - "XSS": true, -} - func rawQuote(s string) string { return "`" + strings.ReplaceAll(s, "`", "`+\"`\"+`") + "`" } diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/sse.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/sse.go index 521014a6..1d59fdff 100644 --- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/sse.go +++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/sse.go @@ -73,29 +73,26 @@ func (t SSE) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecut return } - rc, OpErr := exec.CreateOperationContext(ctx, params) - if OpErr != nil { - w.WriteHeader(statusFor(OpErr)) - resp := exec.DispatchError(graphql.WithOperationContext(ctx, rc), OpErr) - writeJson(w, resp) - return - } - + rc, opErr := exec.CreateOperationContext(ctx, params) ctx = graphql.WithOperationContext(ctx, rc) w.Header().Set("Content-Type", "text/event-stream") fmt.Fprint(w, ":\n\n") flusher.Flush() - responses, ctx := exec.DispatchOperation(ctx, rc) - - for { - response := responses(ctx) - if response == nil { - break + if opErr != nil { + resp := exec.DispatchError(ctx, opErr) + writeJsonWithSSE(w, resp) + } else { + responses, ctx := exec.DispatchOperation(ctx, rc) + for { + response := responses(ctx) + if response == nil { + break + } + writeJsonWithSSE(w, response) + flusher.Flush() } - writeJsonWithSSE(w, response) - flusher.Flush() } fmt.Fprint(w, "event: complete\n\n") diff --git a/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go b/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go index 8482d62a..30c865cc 100644 --- a/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go +++ b/vendor/github.com/99designs/gqlgen/graphql/introspection/introspection.go @@ -74,13 +74,15 @@ func (f *Field) IsDeprecated() bool { } func (f *Field) DeprecationReason() *string { - if f.deprecation == nil { + if f.deprecation == nil || !f.IsDeprecated() { return nil } reason := f.deprecation.Arguments.ForName("reason") + if reason == nil { - return nil + defaultReason := "No longer supported" + return &defaultReason } return &reason.Value.Raw diff --git a/vendor/github.com/99designs/gqlgen/graphql/playground/apollo_sandbox_playground.go b/vendor/github.com/99designs/gqlgen/graphql/playground/apollo_sandbox_playground.go index d59738b8..be466adc 100644 --- a/vendor/github.com/99designs/gqlgen/graphql/playground/apollo_sandbox_playground.go +++ b/vendor/github.com/99designs/gqlgen/graphql/playground/apollo_sandbox_playground.go @@ -24,7 +24,7 @@ var apolloSandboxPage = template.Must(template.New("ApolloSandbox").Parse(`
- +