From 67d88619403b1fb882408862afc455b4ab9963c1 Mon Sep 17 00:00:00 2001 From: Blaize M Kaye Date: Mon, 4 Dec 2023 15:37:45 +1300 Subject: [PATCH] Updates genqlient --- go.mod | 24 +- go.sum | 27 ++ internal/lagoonclient/generated.go | 496 +++++++++++++++++------- internal/lagoonclient/genqlient.graphql | 4 +- 4 files changed, 392 insertions(+), 159 deletions(-) diff --git a/go.mod b/go.mod index c3aded7..4a87a77 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/uselagoon/lagoon/services/insights-handler go 1.21 require ( - github.com/Khan/genqlient v0.3.0 + github.com/Khan/genqlient v0.6.0 github.com/aquasecurity/trivy v0.43.0 github.com/cheshir/go-mq v1.0.2 github.com/dgrijalva/jwt-go v3.2.0+incompatible @@ -52,6 +52,8 @@ require ( github.com/agext/levenshtein v1.2.3 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.10.0 // indirect + github.com/alexflint/go-arg v1.4.3 // indirect + github.com/alexflint/go-scalar v1.2.0 // indirect github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect @@ -260,7 +262,7 @@ require ( github.com/samber/lo v1.38.1 // indirect github.com/saracen/walker v0.1.3 // indirect github.com/secure-systems-lab/go-securesystemslib v0.6.0 // indirect - github.com/sergi/go-diff v1.2.0 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sigstore/rekor v1.2.1 // indirect @@ -281,7 +283,7 @@ require ( github.com/twitchtv/twirp v8.1.2+incompatible // indirect github.com/ulikunitz/xz v0.5.10 // indirect github.com/vbatts/tar-split v0.11.3 // indirect - github.com/vektah/gqlparser/v2 v2.4.5 // indirect + github.com/vektah/gqlparser/v2 v2.5.10 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect @@ -299,16 +301,16 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.9.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.10.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect - golang.org/x/mod v0.11.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.9.0 // indirect - golang.org/x/term v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/term v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.8.0 // indirect + golang.org/x/tools v0.16.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.121.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -351,7 +353,7 @@ require ( github.com/fsouza/go-dockerclient v1.7.3 // indirect github.com/minio/minio-go/v7 v7.0.21 github.com/tiago4orion/conjure v0.0.0-20150908101743-93cb30b9d218 // indirect - golang.org/x/net v0.11.0 // indirect + golang.org/x/net v0.19.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 1866a18..e63c036 100644 --- a/go.sum +++ b/go.sum @@ -236,6 +236,8 @@ github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible h1:juIa github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible/go.mod h1:BB1eHdMLYEFuFdBlRMb0N7YGVdM5s6Pt0njxgvfbGGs= github.com/Khan/genqlient v0.3.0 h1:G35N630mNCW+j0rqSJUsvNkPLoX0bjrllRMnaQTbCak= github.com/Khan/genqlient v0.3.0/go.mod h1:o9QUG7O7GhCeB3C83scbUQtdp+tdErC8OkVbSxIw1g4= +github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk= +github.com/Khan/genqlient v0.6.0/go.mod h1:rvChwWVTqXhiapdhLDV4bp9tz/Xvtewwkon4DpWWCRM= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -283,7 +285,12 @@ github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQq github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= +github.com/alexflint/go-arg v1.4.3 h1:9rwwEBpMXfKQKceuZfYcwuc/7YY7tWJbFsgG5cAU/uo= +github.com/alexflint/go-arg v1.4.3/go.mod h1:3PZ/wp/8HuqRZMUUgu7I+e1qcpUbvmS258mRXkFH4IA= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= +github.com/alexflint/go-scalar v1.1.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= +github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+WQBRw= +github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o= github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk= github.com/alicebob/miniredis/v2 v2.30.3 h1:hrqDB4cHFSHQf4gO3xu6YKQg8PqJpNjLYsQAFYHstqw= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= @@ -1229,6 +1236,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.6.0/go.mod h1:8Mtpo9JKks/qh github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.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/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -1338,6 +1347,8 @@ github.com/vektah/dataloaden v0.2.1-0.20190515034641-a19b9a6e7c9e/go.mod h1:/HUd github.com/vektah/gqlparser/v2 v2.1.0/go.mod h1:SyUiHgLATUR8BiYURfTirrTcGpcE+4XkV2se04Px1Ms= github.com/vektah/gqlparser/v2 v2.4.5 h1:C02NsyEsL4TXJB7ndonqTfuQOL4XPIu0aAWugdmTgmc= github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= +github.com/vektah/gqlparser/v2 v2.5.10 h1:6zSM4azXC9u4Nxy5YmdmGu4uKamfwsdKTwp5zsEealU= +github.com/vektah/gqlparser/v2 v2.5.10/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -1447,6 +1458,8 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= 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= @@ -1489,6 +1502,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1556,6 +1571,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= 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= @@ -1602,6 +1619,8 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.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= @@ -1715,6 +1734,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201113234701-d7a72108b828/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= 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= @@ -1725,6 +1746,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.9.0 h1:GRRCnKYhdQrD8kfRAdQ6Zcw1P0OcELxGLKJvtjVMZ28= golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= 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= @@ -1741,6 +1764,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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= @@ -1820,6 +1845,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/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/internal/lagoonclient/generated.go b/internal/lagoonclient/generated.go index 457ecc7..3069239 100644 --- a/internal/lagoonclient/generated.go +++ b/internal/lagoonclient/generated.go @@ -1,7 +1,7 @@ -package lagoonclient - // Code generated by github.com/Khan/genqlient, DO NOT EDIT. +package lagoonclient + import ( "context" @@ -20,6 +20,33 @@ type AddFactInput struct { Category string `json:"category"` } +// GetId returns AddFactInput.Id, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetId() int { return v.Id } + +// GetEnvironment returns AddFactInput.Environment, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetEnvironment() int { return v.Environment } + +// GetName returns AddFactInput.Name, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetName() string { return v.Name } + +// GetValue returns AddFactInput.Value, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetValue() string { return v.Value } + +// GetSource returns AddFactInput.Source, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetSource() string { return v.Source } + +// GetDescription returns AddFactInput.Description, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetDescription() string { return v.Description } + +// GetKeyFact returns AddFactInput.KeyFact, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetKeyFact() bool { return v.KeyFact } + +// GetType returns AddFactInput.Type, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetType() FactType { return v.Type } + +// GetCategory returns AddFactInput.Category, and is useful for accessing the field via an interface. +func (v *AddFactInput) GetCategory() string { return v.Category } + type FactType string const ( @@ -45,6 +72,9 @@ type __addFactsInput struct { Facts []AddFactInput `json:"facts"` } +// GetFacts returns __addFactsInput.Facts, and is useful for accessing the field via an interface. +func (v *__addFactsInput) GetFacts() []AddFactInput { return v.Facts } + // __addProblemInput is used internally by genqlient type __addProblemInput struct { Environment int `json:"environment"` @@ -58,15 +88,57 @@ type __addProblemInput struct { Links string `json:"links"` Verstion string `json:"verstion"` FixedVersion string `json:"fixedVersion"` - Data string `json:"data"` + DataString string `json:"dataString"` } +// GetEnvironment returns __addProblemInput.Environment, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetEnvironment() int { return v.Environment } + +// GetSeverity returns __addProblemInput.Severity, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetSeverity() ProblemSeverityRating { return v.Severity } + +// GetSeverityScore returns __addProblemInput.SeverityScore, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetSeverityScore() float64 { return v.SeverityScore } + +// GetIdentifier returns __addProblemInput.Identifier, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetIdentifier() string { return v.Identifier } + +// GetService returns __addProblemInput.Service, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetService() string { return v.Service } + +// GetSource returns __addProblemInput.Source, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetSource() string { return v.Source } + +// GetAssociatedPackage returns __addProblemInput.AssociatedPackage, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetAssociatedPackage() string { return v.AssociatedPackage } + +// GetDescription returns __addProblemInput.Description, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetDescription() string { return v.Description } + +// GetLinks returns __addProblemInput.Links, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetLinks() string { return v.Links } + +// GetVerstion returns __addProblemInput.Verstion, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetVerstion() string { return v.Verstion } + +// GetFixedVersion returns __addProblemInput.FixedVersion, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetFixedVersion() string { return v.FixedVersion } + +// GetDataString returns __addProblemInput.DataString, and is useful for accessing the field via an interface. +func (v *__addProblemInput) GetDataString() string { return v.DataString } + // __deleteFactsFromSourceInput is used internally by genqlient type __deleteFactsFromSourceInput struct { Environment int `json:"environment"` Source string `json:"source"` } +// GetEnvironment returns __deleteFactsFromSourceInput.Environment, and is useful for accessing the field via an interface. +func (v *__deleteFactsFromSourceInput) GetEnvironment() int { return v.Environment } + +// GetSource returns __deleteFactsFromSourceInput.Source, and is useful for accessing the field via an interface. +func (v *__deleteFactsFromSourceInput) GetSource() string { return v.Source } + // __deleteProblemsFromSourceInput is used internally by genqlient type __deleteProblemsFromSourceInput struct { Environment int `json:"environment"` @@ -74,52 +146,95 @@ type __deleteProblemsFromSourceInput struct { Service string `json:"service"` } +// GetEnvironment returns __deleteProblemsFromSourceInput.Environment, and is useful for accessing the field via an interface. +func (v *__deleteProblemsFromSourceInput) GetEnvironment() int { return v.Environment } + +// GetSource returns __deleteProblemsFromSourceInput.Source, and is useful for accessing the field via an interface. +func (v *__deleteProblemsFromSourceInput) GetSource() string { return v.Source } + +// GetService returns __deleteProblemsFromSourceInput.Service, and is useful for accessing the field via an interface. +func (v *__deleteProblemsFromSourceInput) GetService() string { return v.Service } + // __getEnvironmentByNameInput is used internally by genqlient type __getEnvironmentByNameInput struct { Name string `json:"name"` Project int `json:"project"` } +// GetName returns __getEnvironmentByNameInput.Name, and is useful for accessing the field via an interface. +func (v *__getEnvironmentByNameInput) GetName() string { return v.Name } + +// GetProject returns __getEnvironmentByNameInput.Project, and is useful for accessing the field via an interface. +func (v *__getEnvironmentByNameInput) GetProject() int { return v.Project } + // __getEnvironmentFromIdInput is used internally by genqlient type __getEnvironmentFromIdInput struct { Environment int `json:"environment"` } +// GetEnvironment returns __getEnvironmentFromIdInput.Environment, and is useful for accessing the field via an interface. +func (v *__getEnvironmentFromIdInput) GetEnvironment() int { return v.Environment } + // __getProjectByNameInput is used internally by genqlient type __getProjectByNameInput struct { Project string `json:"project"` } +// GetProject returns __getProjectByNameInput.Project, and is useful for accessing the field via an interface. +func (v *__getProjectByNameInput) GetProject() string { return v.Project } + // addFactsAddFactsFact includes the requested fields of the GraphQL type Fact. type addFactsAddFactsFact struct { Id int `json:"id"` } +// GetId returns addFactsAddFactsFact.Id, and is useful for accessing the field via an interface. +func (v *addFactsAddFactsFact) GetId() int { return v.Id } + // addFactsResponse is returned by addFacts on success. type addFactsResponse struct { AddFacts []addFactsAddFactsFact `json:"addFacts"` } +// GetAddFacts returns addFactsResponse.AddFacts, and is useful for accessing the field via an interface. +func (v *addFactsResponse) GetAddFacts() []addFactsAddFactsFact { return v.AddFacts } + // addProblemAddProblem includes the requested fields of the GraphQL type Problem. type addProblemAddProblem struct { Id int `json:"id"` } +// GetId returns addProblemAddProblem.Id, and is useful for accessing the field via an interface. +func (v *addProblemAddProblem) GetId() int { return v.Id } + // addProblemResponse is returned by addProblem on success. type addProblemResponse struct { AddProblem addProblemAddProblem `json:"addProblem"` } +// GetAddProblem returns addProblemResponse.AddProblem, and is useful for accessing the field via an interface. +func (v *addProblemResponse) GetAddProblem() addProblemAddProblem { return v.AddProblem } + // deleteFactsFromSourceResponse is returned by deleteFactsFromSource on success. type deleteFactsFromSourceResponse struct { DeleteFactsFromSource string `json:"deleteFactsFromSource"` } +// GetDeleteFactsFromSource returns deleteFactsFromSourceResponse.DeleteFactsFromSource, and is useful for accessing the field via an interface. +func (v *deleteFactsFromSourceResponse) GetDeleteFactsFromSource() string { + return v.DeleteFactsFromSource +} + // deleteProblemsFromSourceResponse is returned by deleteProblemsFromSource on success. type deleteProblemsFromSourceResponse struct { DeleteProblemsFromSource string `json:"deleteProblemsFromSource"` } +// GetDeleteProblemsFromSource returns deleteProblemsFromSourceResponse.DeleteProblemsFromSource, and is useful for accessing the field via an interface. +func (v *deleteProblemsFromSourceResponse) GetDeleteProblemsFromSource() string { + return v.DeleteProblemsFromSource +} + // getEnvironmentByNameEnvironmentByNameEnvironment includes the requested fields of the GraphQL type Environment. // The GraphQL type's documentation follows. // @@ -131,11 +246,22 @@ type getEnvironmentByNameEnvironmentByNameEnvironment struct { Name string `json:"name"` } +// GetId returns getEnvironmentByNameEnvironmentByNameEnvironment.Id, and is useful for accessing the field via an interface. +func (v *getEnvironmentByNameEnvironmentByNameEnvironment) GetId() int { return v.Id } + +// GetName returns getEnvironmentByNameEnvironmentByNameEnvironment.Name, and is useful for accessing the field via an interface. +func (v *getEnvironmentByNameEnvironmentByNameEnvironment) GetName() string { return v.Name } + // getEnvironmentByNameResponse is returned by getEnvironmentByName on success. type getEnvironmentByNameResponse struct { EnvironmentByName getEnvironmentByNameEnvironmentByNameEnvironment `json:"environmentByName"` } +// GetEnvironmentByName returns getEnvironmentByNameResponse.EnvironmentByName, and is useful for accessing the field via an interface. +func (v *getEnvironmentByNameResponse) GetEnvironmentByName() getEnvironmentByNameEnvironmentByNameEnvironment { + return v.EnvironmentByName +} + // getEnvironmentFromIdEnvironmentByIdEnvironment includes the requested fields of the GraphQL type Environment. // The GraphQL type's documentation follows. // @@ -147,11 +273,22 @@ type getEnvironmentFromIdEnvironmentByIdEnvironment struct { Name string `json:"name"` } +// GetId returns getEnvironmentFromIdEnvironmentByIdEnvironment.Id, and is useful for accessing the field via an interface. +func (v *getEnvironmentFromIdEnvironmentByIdEnvironment) GetId() int { return v.Id } + +// GetName returns getEnvironmentFromIdEnvironmentByIdEnvironment.Name, and is useful for accessing the field via an interface. +func (v *getEnvironmentFromIdEnvironmentByIdEnvironment) GetName() string { return v.Name } + // getEnvironmentFromIdResponse is returned by getEnvironmentFromId on success. type getEnvironmentFromIdResponse struct { EnvironmentById getEnvironmentFromIdEnvironmentByIdEnvironment `json:"environmentById"` } +// GetEnvironmentById returns getEnvironmentFromIdResponse.EnvironmentById, and is useful for accessing the field via an interface. +func (v *getEnvironmentFromIdResponse) GetEnvironmentById() getEnvironmentFromIdEnvironmentByIdEnvironment { + return v.EnvironmentById +} + // getProjectByNameProjectByNameProject includes the requested fields of the GraphQL type Project. // The GraphQL type's documentation follows. // @@ -163,226 +300,293 @@ type getProjectByNameProjectByNameProject struct { Name string `json:"name"` } +// GetId returns getProjectByNameProjectByNameProject.Id, and is useful for accessing the field via an interface. +func (v *getProjectByNameProjectByNameProject) GetId() int { return v.Id } + +// GetName returns getProjectByNameProjectByNameProject.Name, and is useful for accessing the field via an interface. +func (v *getProjectByNameProjectByNameProject) GetName() string { return v.Name } + // getProjectByNameResponse is returned by getProjectByName on success. type getProjectByNameResponse struct { // Returns Project Object by a given name ProjectByName getProjectByNameProjectByNameProject `json:"projectByName"` } -func getProjectByName( +// GetProjectByName returns getProjectByNameResponse.ProjectByName, and is useful for accessing the field via an interface. +func (v *getProjectByNameResponse) GetProjectByName() getProjectByNameProjectByNameProject { + return v.ProjectByName +} + +// The query or mutation executed by addFacts. +const addFacts_Operation = ` +mutation addFacts ($facts: [AddFactInput]!) { + addFacts(input: {facts:$facts}) { + id + } +} +` + +func addFacts( ctx context.Context, client graphql.Client, - project string, -) (*getProjectByNameResponse, error) { - __input := __getProjectByNameInput{ - Project: project, + facts []AddFactInput, +) (*addFactsResponse, error) { + req := &graphql.Request{ + OpName: "addFacts", + Query: addFacts_Operation, + Variables: &__addFactsInput{ + Facts: facts, + }, } var err error - var retval getProjectByNameResponse + var data addFactsResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "getProjectByName", - ` -query getProjectByName ($project: String!) { - projectByName(name: $project) { + req, + resp, + ) + + return &data, err +} + +// The query or mutation executed by addProblem. +const addProblem_Operation = ` +mutation addProblem ($environment: Int!, $severity: ProblemSeverityRating, $severityScore: SeverityScore, $identifier: String!, $service: String!, $source: String!, $associatedPackage: String, $description: String, $links: String, $verstion: String, $fixedVersion: String, $dataString: String!) { + addProblem(input: {environment:$environment,severity:$severity,severityScore:$severityScore,identifier:$identifier,service:$service,source:$source,associatedPackage:$associatedPackage,description:$description,links:$links,version:$verstion,fixedVersion:$fixedVersion,data:$dataString}) { id - name } } -`, - &retval, - &__input, - ) - return &retval, err -} +` -func getEnvironmentByName( +func addProblem( ctx context.Context, client graphql.Client, - name string, - project int, -) (*getEnvironmentByNameResponse, error) { - __input := __getEnvironmentByNameInput{ - Name: name, - Project: project, + environment int, + severity ProblemSeverityRating, + severityScore float64, + identifier string, + service string, + source string, + associatedPackage string, + description string, + links string, + verstion string, + fixedVersion string, + dataString string, +) (*addProblemResponse, error) { + req := &graphql.Request{ + OpName: "addProblem", + Query: addProblem_Operation, + Variables: &__addProblemInput{ + Environment: environment, + Severity: severity, + SeverityScore: severityScore, + Identifier: identifier, + Service: service, + Source: source, + AssociatedPackage: associatedPackage, + Description: description, + Links: links, + Verstion: verstion, + FixedVersion: fixedVersion, + DataString: dataString, + }, } var err error - var retval getEnvironmentByNameResponse + var data addProblemResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "getEnvironmentByName", - ` -query getEnvironmentByName ($name: String!, $project: Int!) { - environmentByName(name: $name, project: $project) { - id - name - } -} -`, - &retval, - &__input, + req, + resp, ) - return &retval, err + + return &data, err } -func getEnvironmentFromId( +// The query or mutation executed by deleteFactsFromSource. +const deleteFactsFromSource_Operation = ` +mutation deleteFactsFromSource ($environment: Int!, $source: String!) { + deleteFactsFromSource(input: {environment:$environment,source:$source}) +} +` + +func deleteFactsFromSource( ctx context.Context, client graphql.Client, environment int, -) (*getEnvironmentFromIdResponse, error) { - __input := __getEnvironmentFromIdInput{ - Environment: environment, + source string, +) (*deleteFactsFromSourceResponse, error) { + req := &graphql.Request{ + OpName: "deleteFactsFromSource", + Query: deleteFactsFromSource_Operation, + Variables: &__deleteFactsFromSourceInput{ + Environment: environment, + Source: source, + }, } var err error - var retval getEnvironmentFromIdResponse + var data deleteFactsFromSourceResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "getEnvironmentFromId", - ` -query getEnvironmentFromId ($environment: Int!) { - environmentById(id: $environment) { - id - name - } -} -`, - &retval, - &__input, + req, + resp, ) - return &retval, err + + return &data, err } -func addFacts( +// The query or mutation executed by deleteProblemsFromSource. +const deleteProblemsFromSource_Operation = ` +mutation deleteProblemsFromSource ($environment: Int!, $source: String!, $service: String!) { + deleteProblemsFromSource(input: {environment:$environment,source:$source,service:$service}) +} +` + +func deleteProblemsFromSource( ctx context.Context, client graphql.Client, - facts []AddFactInput, -) (*addFactsResponse, error) { - __input := __addFactsInput{ - Facts: facts, + environment int, + source string, + service string, +) (*deleteProblemsFromSourceResponse, error) { + req := &graphql.Request{ + OpName: "deleteProblemsFromSource", + Query: deleteProblemsFromSource_Operation, + Variables: &__deleteProblemsFromSourceInput{ + Environment: environment, + Source: source, + Service: service, + }, } var err error - var retval addFactsResponse + var data deleteProblemsFromSourceResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "addFacts", - ` -mutation addFacts ($facts: [AddFactInput]!) { - addFacts(input: {facts:$facts}) { + req, + resp, + ) + + return &data, err +} + +// The query or mutation executed by getEnvironmentByName. +const getEnvironmentByName_Operation = ` +query getEnvironmentByName ($name: String!, $project: Int!) { + environmentByName(name: $name, project: $project) { id + name } } -`, - &retval, - &__input, - ) - return &retval, err -} +` -func deleteFactsFromSource( +func getEnvironmentByName( ctx context.Context, client graphql.Client, - environment int, - source string, -) (*deleteFactsFromSourceResponse, error) { - __input := __deleteFactsFromSourceInput{ - Environment: environment, - Source: source, + name string, + project int, +) (*getEnvironmentByNameResponse, error) { + req := &graphql.Request{ + OpName: "getEnvironmentByName", + Query: getEnvironmentByName_Operation, + Variables: &__getEnvironmentByNameInput{ + Name: name, + Project: project, + }, } var err error - var retval deleteFactsFromSourceResponse + var data getEnvironmentByNameResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "deleteFactsFromSource", - ` -mutation deleteFactsFromSource ($environment: Int!, $source: String!) { - deleteFactsFromSource(input: {environment:$environment,source:$source}) -} -`, - &retval, - &__input, + req, + resp, ) - return &retval, err + + return &data, err } -func addProblem( +// The query or mutation executed by getEnvironmentFromId. +const getEnvironmentFromId_Operation = ` +query getEnvironmentFromId ($environment: Int!) { + environmentById(id: $environment) { + id + name + } +} +` + +func getEnvironmentFromId( ctx context.Context, client graphql.Client, environment int, - severity ProblemSeverityRating, - severityScore float64, - identifier string, - service string, - source string, - associatedPackage string, - description string, - links string, - verstion string, - fixedVersion string, - data string, -) (*addProblemResponse, error) { - __input := __addProblemInput{ - Environment: environment, - Severity: severity, - SeverityScore: severityScore, - Identifier: identifier, - Service: service, - Source: source, - AssociatedPackage: associatedPackage, - Description: description, - Links: links, - Verstion: verstion, - FixedVersion: fixedVersion, - Data: data, +) (*getEnvironmentFromIdResponse, error) { + req := &graphql.Request{ + OpName: "getEnvironmentFromId", + Query: getEnvironmentFromId_Operation, + Variables: &__getEnvironmentFromIdInput{ + Environment: environment, + }, } var err error - var retval addProblemResponse + var data getEnvironmentFromIdResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "addProblem", - ` -mutation addProblem ($environment: Int!, $severity: ProblemSeverityRating, $severityScore: SeverityScore, $identifier: String!, $service: String!, $source: String!, $associatedPackage: String, $description: String, $links: String, $verstion: String, $fixedVersion: String, $data: String!) { - addProblem(input: {environment:$environment,severity:$severity,severityScore:$severityScore,identifier:$identifier,service:$service,source:$source,associatedPackage:$associatedPackage,description:$description,links:$links,version:$verstion,fixedVersion:$fixedVersion,data:$data}) { + req, + resp, + ) + + return &data, err +} + +// The query or mutation executed by getProjectByName. +const getProjectByName_Operation = ` +query getProjectByName ($project: String!) { + projectByName(name: $project) { id + name } } -`, - &retval, - &__input, - ) - return &retval, err -} +` -func deleteProblemsFromSource( +func getProjectByName( ctx context.Context, client graphql.Client, - environment int, - source string, - service string, -) (*deleteProblemsFromSourceResponse, error) { - __input := __deleteProblemsFromSourceInput{ - Environment: environment, - Source: source, - Service: service, + project string, +) (*getProjectByNameResponse, error) { + req := &graphql.Request{ + OpName: "getProjectByName", + Query: getProjectByName_Operation, + Variables: &__getProjectByNameInput{ + Project: project, + }, } var err error - var retval deleteProblemsFromSourceResponse + var data getProjectByNameResponse + resp := &graphql.Response{Data: &data} + err = client.MakeRequest( ctx, - "deleteProblemsFromSource", - ` -mutation deleteProblemsFromSource ($environment: Int!, $source: String!, $service: String!) { - deleteProblemsFromSource(input: {environment:$environment,source:$source,service:$service}) -} -`, - &retval, - &__input, + req, + resp, ) - return &retval, err + + return &data, err } diff --git a/internal/lagoonclient/genqlient.graphql b/internal/lagoonclient/genqlient.graphql index ab41ad1..9f78a80 100644 --- a/internal/lagoonclient/genqlient.graphql +++ b/internal/lagoonclient/genqlient.graphql @@ -49,7 +49,7 @@ mutation addProblem($environment: Int!, $links: String, $verstion: String, $fixedVersion: String, - $data: String!, + $dataString: String!, ) { addProblem(input: { environment: $environment, @@ -63,7 +63,7 @@ mutation addProblem($environment: Int!, links: $links, version: $verstion, fixedVersion: $fixedVersion - data: $data + data: $dataString }){ id }