diff --git a/go.mod b/go.mod index eee77909..e875ddbc 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/gitploy-io/gitploy go 1.17 require ( - entgo.io/ent v0.9.1 + entgo.io/ent v0.10.1 github.com/AlekSi/pointer v1.2.0 github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef github.com/davecgh/go-spew v1.1.1 @@ -13,13 +13,13 @@ require ( github.com/gin-contrib/sse v0.1.0 github.com/gin-gonic/gin v1.7.7 github.com/gitploy-io/cronexpr v0.2.2 - github.com/go-sql-driver/mysql v1.5.1-0.20200311113236-681ffa848bae + github.com/go-sql-driver/mysql v1.6.0 github.com/golang/mock v1.6.0 - github.com/google/go-github/v32 v32.1.0 + github.com/google/go-github/v42 v42.0.0 github.com/jackc/pgx/v4 v4.15.0 github.com/joho/godotenv v1.4.0 github.com/kelseyhightower/envconfig v1.4.0 - github.com/mattn/go-sqlite3 v1.14.9 + github.com/mattn/go-sqlite3 v1.14.10 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.12.1 github.com/shurcooL/githubv4 v0.0.0-20201206200315-234843c633fa @@ -27,24 +27,29 @@ require ( github.com/tidwall/gjson v1.14.0 github.com/urfave/cli/v2 v2.3.0 go.uber.org/zap v1.21.0 - golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c + golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a gopkg.in/h2non/gock.v1 v1.1.2 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b ) require ( + ariga.io/atlas v0.3.7-0.20220303204946-787354f533c3 // indirect + github.com/agext/levenshtein v1.2.1 // indirect + github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect + github.com/go-openapi/inflect v0.19.0 // indirect github.com/go-playground/locales v0.13.0 // indirect github.com/go-playground/universal-translator v0.17.0 // indirect github.com/go-playground/validator/v10 v10.6.1 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-github/v42 v42.0.0 // indirect + github.com/google/go-cmp v0.5.6 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect + github.com/hashicorp/hcl/v2 v2.10.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.11.0 // indirect github.com/jackc/pgio v1.0.0 // indirect @@ -56,6 +61,7 @@ require ( github.com/leodido/go-urn v1.2.1 // indirect github.com/mattn/go-isatty v0.0.12 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/prometheus/client_model v0.2.0 // indirect @@ -67,12 +73,16 @@ require ( github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/ugorji/go/codec v1.2.6 // indirect + github.com/zclconf/go-cty v1.8.0 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect - golang.org/x/net v0.0.0-20210525063256-abc453219eb5 // indirect + golang.org/x/mod v0.5.1 // indirect + golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect - golang.org/x/text v0.3.6 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/tools v0.1.9-0.20211216111533-8d383106f7e7 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.26.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 3e958f55..b2eff8f8 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +ariga.io/atlas v0.3.7-0.20220303204946-787354f533c3 h1:fjG4oFCQEfGrRi0QoxWcH2OO28CE6VYa6DkIr3yDySU= +ariga.io/atlas v0.3.7-0.20220303204946-787354f533c3/go.mod h1:yWGf4VPiD4SW83+kAqzD624txN9VKoJC+bpVXr2pKJA= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -13,6 +15,20 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -21,7 +37,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -32,25 +48,36 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -entgo.io/ent v0.9.1 h1:IG8andyeD79GG24U8Q+1Y45hQXj6gY5evSBcva5gtBk= -entgo.io/ent v0.9.1/go.mod h1:6NUeTfUN5mp5YN+5tgoH1SlakSvYPTBOYotSOvaI4ak= +entgo.io/ent v0.10.1 h1:dM5h4Zk6yHGIgw4dCqVzGw3nWgpGYJiV4/kyHEF6PFo= +entgo.io/ent v0.10.1/go.mod h1:YPgxeLnoQ/YdpVORRtqjBF+wCy9NX9IR7veTv3Bffus= github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= 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/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/agext/levenshtein v1.2.1 h1:QmvMAjj2aEICytGiWzmxoE0x2KZvE0fvmqMOfy2tjT8= +github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= 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= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= +github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0= +github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= +github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= +github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef h1:2JGTg6JapxP9/R33ZaagQtAM4EkkSYnIAlOG5EI8gkM= github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef/go.mod h1:JS7hed4L1fj0hXcyEejnW57/7LCetXggd+vwrRnYeII= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= @@ -60,8 +87,9 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce 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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bradleyfalzon/ghinstallation/v2 v2.0.3/go.mod h1:tlgi+JWCXnKFx/Y4WtnDbZEINo31N5bcvnCoqieefmk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -70,33 +98,51 @@ github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 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.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= 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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/drone/envsubst v1.0.3 h1:PCIBwNDYjs50AsLZPYdfhSATKaRg/FJmDc2D6+C2x8g= github.com/drone/envsubst v1.0.3/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 h1:6VSn3hB5U5GeA6kQw4TwWIWbOhtvR2hmbBJnTOtqTWc= github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6/go.mod h1:YxOVT5+yHzKvwhsiSIWmbAYM3Dr9AEEbER2dVayfBkg= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -109,7 +155,6 @@ github.com/gin-gonic/gin v1.7.7 h1:3DoBmSbJbZAWqXJC3SLjAPfutPJJRN1U5pALB7EeTTs= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/gitploy-io/cronexpr v0.2.2 h1:Au+wK6FqmOLAF7AkW6q4gnrNXTe3rEW97XFZ4chy0xs= github.com/gitploy-io/cronexpr v0.2.2/go.mod h1:Uep5sbzUSocMZvJ1s0lNI9zi37s5iUI1llkw3vRGK9M= -github.com/go-bindata/go-bindata v1.0.1-0.20190711162640-ee3c2418e368/go.mod h1:7xCgX1lzlrXPHkfvn3EhumqHkmSlzt8at9q7v0ax19c= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -119,6 +164,7 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -131,20 +177,23 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.6.1 h1:W6TRDXt4WcWp4c4nf/G+6BkGdhiIo0k417gfr+V6u4I= github.com/go-playground/validator/v10 v10.6.1/go.mod h1:xm76BBt941f7yWdGnI2DVPFFg1UK3YY04qifoXU3lOk= -github.com/go-sql-driver/mysql v1.5.1-0.20200311113236-681ffa848bae h1:L6V0ANsMIMdLgXly241UXhXNFWYgXbgjHupTAAURrV0= -github.com/go-sql-driver/mysql v1.5.1-0.20200311113236-681ffa848bae/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.4 h1:u2CU3YKy9I2pmu9pX0eq50wCgjfGIt539SqR7FbHiho= github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -152,8 +201,10 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -169,8 +220,10 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -183,19 +236,19 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II= -github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github/v39 v39.0.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= github.com/google/go-github/v42 v42.0.0 h1:YNT0FwjPrEysRkLIiKuEfSvBPCGKphW5aS5PxwaoLec= github.com/google/go-github/v42 v42.0.0/go.mod h1:jgg/jvyI0YlDOM1/ps6XYh04HNQ3vKf0CVko62/EhRg= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -203,41 +256,63 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +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/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/hcl/v2 v2.10.0 h1:1S1UnuhDGlv3gRFV4+0EdwB+znNP5HmcGbIqwnSCByg= +github.com/hashicorp/hcl/v2 v2.10.0/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= @@ -291,7 +366,6 @@ github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -302,24 +376,27 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +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/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= @@ -327,34 +404,46 @@ github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ic github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= +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= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.9 h1:10HX2Td0ocZpYEjhilsuo6WWtUqttj2Kb0KtD86/KYA= -github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.10 h1:MLn+5bFRlWMGoSRmJour3CL1w/qL96mvipqpwQW/Sfk= +github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= +github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/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.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -366,20 +455,22 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= @@ -389,31 +480,34 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= 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/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= @@ -429,17 +523,15 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/slack-go/slack v0.10.2 h1:KMN/h2sgUninHXvQI8PrR/PHBUuWp2NPvz2Kr66tki4= github.com/slack-go/slack v0.10.2/go.mod h1:5FLdBRv7VW/d9EBxx/eEktOptWygbA9K2QK/KW7ds1s= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -448,8 +540,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1-0.20210427113832-6241f9ab9942 h1:t0lM6y/M5IiUZyvbBTcngso8SZEZICH7is9B6g/obVU= +github.com/stretchr/testify v1.7.1-0.20210427113832-6241f9ab9942/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/gjson v1.14.0 h1:6aeJ0bzojgWLa82gDQHcx3S0Lr/O51I9bJ5nv6JFx5w= github.com/tidwall/gjson v1.14.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -457,7 +550,7 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go v1.2.6 h1:tGiWC9HENWE2tqYycIqFTNorMmFRVhNwCpDOpWqnk8E= github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0= @@ -466,19 +559,31 @@ github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw= github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= 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= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= +github.com/zclconf/go-cty v1.8.0 h1:s4AvqaeQzJIu3ndv4gVIhplVD0krU+bgrcLSVUnaWuA= +github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= +github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= @@ -496,20 +601,22 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -535,6 +642,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -543,13 +652,17 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +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 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= 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= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -562,6 +675,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -576,18 +690,44 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -596,14 +736,15 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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/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= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -611,12 +752,16 @@ golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -624,6 +769,7 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -637,39 +783,62 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/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= 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= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 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= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -679,11 +848,11 @@ golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -707,11 +876,24 @@ golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +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-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= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +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.9-0.20211216111533-8d383106f7e7 h1:M1gcVrIb2lSn2FIL19DG0+/b8nNVKJ7W7b4WcAGZAYM= +golang.org/x/tools v0.1.9-0.20211216111533-8d383106f7e7/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -735,13 +917,29 @@ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -766,12 +964,46 @@ google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -784,7 +1016,22 @@ google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKa google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -798,20 +1045,21 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 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= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/model/ent/chatuser_create.go b/model/ent/chatuser_create.go index 9902fb3f..d9ab02cf 100644 --- a/model/ent/chatuser_create.go +++ b/model/ent/chatuser_create.go @@ -174,28 +174,28 @@ func (cuc *ChatUserCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (cuc *ChatUserCreate) check() error { if _, ok := cuc.mutation.Token(); !ok { - return &ValidationError{Name: "token", err: errors.New(`ent: missing required field "token"`)} + return &ValidationError{Name: "token", err: errors.New(`ent: missing required field "ChatUser.token"`)} } if _, ok := cuc.mutation.Refresh(); !ok { - return &ValidationError{Name: "refresh", err: errors.New(`ent: missing required field "refresh"`)} + return &ValidationError{Name: "refresh", err: errors.New(`ent: missing required field "ChatUser.refresh"`)} } if _, ok := cuc.mutation.Expiry(); !ok { - return &ValidationError{Name: "expiry", err: errors.New(`ent: missing required field "expiry"`)} + return &ValidationError{Name: "expiry", err: errors.New(`ent: missing required field "ChatUser.expiry"`)} } if _, ok := cuc.mutation.BotToken(); !ok { - return &ValidationError{Name: "bot_token", err: errors.New(`ent: missing required field "bot_token"`)} + return &ValidationError{Name: "bot_token", err: errors.New(`ent: missing required field "ChatUser.bot_token"`)} } if _, ok := cuc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "ChatUser.created_at"`)} } if _, ok := cuc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "ChatUser.updated_at"`)} } if _, ok := cuc.mutation.UserID(); !ok { - return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "user_id"`)} + return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "ChatUser.user_id"`)} } if _, ok := cuc.mutation.UserID(); !ok { - return &ValidationError{Name: "user", err: errors.New("ent: missing required edge \"user\"")} + return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "ChatUser.user"`)} } return nil } @@ -209,7 +209,11 @@ func (cuc *ChatUserCreate) sqlSave(ctx context.Context) (*ChatUser, error) { return nil, err } if _spec.ID.Value != nil { - _node.ID = _spec.ID.Value.(string) + if id, ok := _spec.ID.Value.(string); ok { + _node.ID = id + } else { + return nil, fmt.Errorf("unexpected ChatUser.ID type: %T", _spec.ID.Value) + } } return _node, nil } diff --git a/model/ent/chatuser_query.go b/model/ent/chatuser_query.go index bb56ebcb..a832f819 100644 --- a/model/ent/chatuser_query.go +++ b/model/ent/chatuser_query.go @@ -133,7 +133,7 @@ func (cuq *ChatUserQuery) FirstIDX(ctx context.Context) string { } // Only returns a single ChatUser entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one ChatUser entity is not found. +// Returns a *NotSingularError when more than one ChatUser entity is found. // Returns a *NotFoundError when no ChatUser entities are found. func (cuq *ChatUserQuery) Only(ctx context.Context) (*ChatUser, error) { nodes, err := cuq.Limit(2).All(ctx) @@ -160,7 +160,7 @@ func (cuq *ChatUserQuery) OnlyX(ctx context.Context) *ChatUser { } // OnlyID is like Only, but returns the only ChatUser ID in the query. -// Returns a *NotSingularError when exactly one ChatUser ID is not found. +// Returns a *NotSingularError when more than one ChatUser ID is found. // Returns a *NotFoundError when no entities are found. func (cuq *ChatUserQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string @@ -270,8 +270,9 @@ func (cuq *ChatUserQuery) Clone() *ChatUserQuery { predicates: append([]predicate.ChatUser{}, cuq.predicates...), withUser: cuq.withUser.Clone(), // clone intermediate query. - sql: cuq.sql.Clone(), - path: cuq.path, + sql: cuq.sql.Clone(), + path: cuq.path, + unique: cuq.unique, } } @@ -412,6 +413,10 @@ func (cuq *ChatUserQuery) sqlCount(ctx context.Context) (int, error) { if len(cuq.modifiers) > 0 { _spec.Modifiers = cuq.modifiers } + _spec.Node.Columns = cuq.fields + if len(cuq.fields) > 0 { + _spec.Unique = cuq.unique != nil && *cuq.unique + } return sqlgraph.CountNodes(ctx, cuq.driver, _spec) } @@ -483,6 +488,9 @@ func (cuq *ChatUserQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = cuq.sql selector.Select(selector.Columns(columns...)...) } + if cuq.unique != nil && *cuq.unique { + selector.Distinct() + } for _, m := range cuq.modifiers { m(selector) } @@ -790,9 +798,7 @@ func (cugb *ChatUserGroupBy) sqlQuery() *sql.Selector { for _, f := range cugb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(cugb.fields...)...) diff --git a/model/ent/chatuser_update.go b/model/ent/chatuser_update.go index 7c696a0d..46137b97 100644 --- a/model/ent/chatuser_update.go +++ b/model/ent/chatuser_update.go @@ -167,7 +167,7 @@ func (cuu *ChatUserUpdate) defaults() { // check runs all checks and user-defined validators on the builder. func (cuu *ChatUserUpdate) check() error { if _, ok := cuu.mutation.UserID(); cuu.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "ChatUser.user"`) } return nil } @@ -431,7 +431,7 @@ func (cuuo *ChatUserUpdateOne) defaults() { // check runs all checks and user-defined validators on the builder. func (cuuo *ChatUserUpdateOne) check() error { if _, ok := cuuo.mutation.UserID(); cuuo.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "ChatUser.user"`) } return nil } @@ -449,7 +449,7 @@ func (cuuo *ChatUserUpdateOne) sqlSave(ctx context.Context) (_node *ChatUser, er } id, ok := cuuo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing ChatUser.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "ChatUser.id" for update`)} } _spec.Node.ID.Value = id if fields := cuuo.fields; len(fields) > 0 { diff --git a/model/ent/client.go b/model/ent/client.go index 53b87601..07dd5c34 100644 --- a/model/ent/client.go +++ b/model/ent/client.go @@ -138,6 +138,7 @@ func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) cfg := c.config cfg.driver = &txDriver{tx: tx, drv: c.driver} return &Tx{ + ctx: ctx, config: cfg, ChatUser: NewChatUserClient(cfg), Deployment: NewDeploymentClient(cfg), diff --git a/model/ent/deployment_create.go b/model/ent/deployment_create.go index 9b7b58b1..d69c3848 100644 --- a/model/ent/deployment_create.go +++ b/model/ent/deployment_create.go @@ -364,58 +364,58 @@ func (dc *DeploymentCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (dc *DeploymentCreate) check() error { if _, ok := dc.mutation.Number(); !ok { - return &ValidationError{Name: "number", err: errors.New(`ent: missing required field "number"`)} + return &ValidationError{Name: "number", err: errors.New(`ent: missing required field "Deployment.number"`)} } if _, ok := dc.mutation.GetType(); !ok { - return &ValidationError{Name: "type", err: errors.New(`ent: missing required field "type"`)} + return &ValidationError{Name: "type", err: errors.New(`ent: missing required field "Deployment.type"`)} } if v, ok := dc.mutation.GetType(); ok { if err := deployment.TypeValidator(v); err != nil { - return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "type": %w`, err)} + return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Deployment.type": %w`, err)} } } if _, ok := dc.mutation.Env(); !ok { - return &ValidationError{Name: "env", err: errors.New(`ent: missing required field "env"`)} + return &ValidationError{Name: "env", err: errors.New(`ent: missing required field "Deployment.env"`)} } if _, ok := dc.mutation.Ref(); !ok { - return &ValidationError{Name: "ref", err: errors.New(`ent: missing required field "ref"`)} + return &ValidationError{Name: "ref", err: errors.New(`ent: missing required field "Deployment.ref"`)} } if _, ok := dc.mutation.Status(); !ok { - return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "status"`)} + return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "Deployment.status"`)} } if v, ok := dc.mutation.Status(); ok { if err := deployment.StatusValidator(v); err != nil { - return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "status": %w`, err)} + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Deployment.status": %w`, err)} } } if v, ok := dc.mutation.HTMLURL(); ok { if err := deployment.HTMLURLValidator(v); err != nil { - return &ValidationError{Name: "html_url", err: fmt.Errorf(`ent: validator failed for field "html_url": %w`, err)} + return &ValidationError{Name: "html_url", err: fmt.Errorf(`ent: validator failed for field "Deployment.html_url": %w`, err)} } } if _, ok := dc.mutation.ProductionEnvironment(); !ok { - return &ValidationError{Name: "production_environment", err: errors.New(`ent: missing required field "production_environment"`)} + return &ValidationError{Name: "production_environment", err: errors.New(`ent: missing required field "Deployment.production_environment"`)} } if _, ok := dc.mutation.IsRollback(); !ok { - return &ValidationError{Name: "is_rollback", err: errors.New(`ent: missing required field "is_rollback"`)} + return &ValidationError{Name: "is_rollback", err: errors.New(`ent: missing required field "Deployment.is_rollback"`)} } if _, ok := dc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Deployment.created_at"`)} } if _, ok := dc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Deployment.updated_at"`)} } if _, ok := dc.mutation.UserID(); !ok { - return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "user_id"`)} + return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "Deployment.user_id"`)} } if _, ok := dc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "repo_id"`)} + return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "Deployment.repo_id"`)} } if _, ok := dc.mutation.UserID(); !ok { - return &ValidationError{Name: "user", err: errors.New("ent: missing required edge \"user\"")} + return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "Deployment.user"`)} } if _, ok := dc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo", err: errors.New("ent: missing required edge \"repo\"")} + return &ValidationError{Name: "repo", err: errors.New(`ent: missing required edge "Deployment.repo"`)} } return nil } diff --git a/model/ent/deployment_query.go b/model/ent/deployment_query.go index e8e09388..31b9d33d 100644 --- a/model/ent/deployment_query.go +++ b/model/ent/deployment_query.go @@ -230,7 +230,7 @@ func (dq *DeploymentQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Deployment entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Deployment entity is not found. +// Returns a *NotSingularError when more than one Deployment entity is found. // Returns a *NotFoundError when no Deployment entities are found. func (dq *DeploymentQuery) Only(ctx context.Context) (*Deployment, error) { nodes, err := dq.Limit(2).All(ctx) @@ -257,7 +257,7 @@ func (dq *DeploymentQuery) OnlyX(ctx context.Context) *Deployment { } // OnlyID is like Only, but returns the only Deployment ID in the query. -// Returns a *NotSingularError when exactly one Deployment ID is not found. +// Returns a *NotSingularError when more than one Deployment ID is found. // Returns a *NotFoundError when no entities are found. func (dq *DeploymentQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -371,8 +371,9 @@ func (dq *DeploymentQuery) Clone() *DeploymentQuery { withDeploymentStatuses: dq.withDeploymentStatuses.Clone(), withEvent: dq.withEvent.Clone(), // clone intermediate query. - sql: dq.sql.Clone(), - path: dq.path, + sql: dq.sql.Clone(), + path: dq.path, + unique: dq.unique, } } @@ -662,6 +663,10 @@ func (dq *DeploymentQuery) sqlCount(ctx context.Context) (int, error) { if len(dq.modifiers) > 0 { _spec.Modifiers = dq.modifiers } + _spec.Node.Columns = dq.fields + if len(dq.fields) > 0 { + _spec.Unique = dq.unique != nil && *dq.unique + } return sqlgraph.CountNodes(ctx, dq.driver, _spec) } @@ -733,6 +738,9 @@ func (dq *DeploymentQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = dq.sql selector.Select(selector.Columns(columns...)...) } + if dq.unique != nil && *dq.unique { + selector.Distinct() + } for _, m := range dq.modifiers { m(selector) } @@ -1040,9 +1048,7 @@ func (dgb *DeploymentGroupBy) sqlQuery() *sql.Selector { for _, f := range dgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(dgb.fields...)...) diff --git a/model/ent/deployment_update.go b/model/ent/deployment_update.go index ca733d4a..78ff3c03 100644 --- a/model/ent/deployment_update.go +++ b/model/ent/deployment_update.go @@ -468,24 +468,24 @@ func (du *DeploymentUpdate) defaults() { func (du *DeploymentUpdate) check() error { if v, ok := du.mutation.GetType(); ok { if err := deployment.TypeValidator(v); err != nil { - return &ValidationError{Name: "type", err: fmt.Errorf("ent: validator failed for field \"type\": %w", err)} + return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Deployment.type": %w`, err)} } } if v, ok := du.mutation.Status(); ok { if err := deployment.StatusValidator(v); err != nil { - return &ValidationError{Name: "status", err: fmt.Errorf("ent: validator failed for field \"status\": %w", err)} + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Deployment.status": %w`, err)} } } if v, ok := du.mutation.HTMLURL(); ok { if err := deployment.HTMLURLValidator(v); err != nil { - return &ValidationError{Name: "html_url", err: fmt.Errorf("ent: validator failed for field \"html_url\": %w", err)} + return &ValidationError{Name: "html_url", err: fmt.Errorf(`ent: validator failed for field "Deployment.html_url": %w`, err)} } } if _, ok := du.mutation.UserID(); du.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Deployment.user"`) } if _, ok := du.mutation.RepoID(); du.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "Deployment.repo"`) } return nil } @@ -1350,24 +1350,24 @@ func (duo *DeploymentUpdateOne) defaults() { func (duo *DeploymentUpdateOne) check() error { if v, ok := duo.mutation.GetType(); ok { if err := deployment.TypeValidator(v); err != nil { - return &ValidationError{Name: "type", err: fmt.Errorf("ent: validator failed for field \"type\": %w", err)} + return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Deployment.type": %w`, err)} } } if v, ok := duo.mutation.Status(); ok { if err := deployment.StatusValidator(v); err != nil { - return &ValidationError{Name: "status", err: fmt.Errorf("ent: validator failed for field \"status\": %w", err)} + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Deployment.status": %w`, err)} } } if v, ok := duo.mutation.HTMLURL(); ok { if err := deployment.HTMLURLValidator(v); err != nil { - return &ValidationError{Name: "html_url", err: fmt.Errorf("ent: validator failed for field \"html_url\": %w", err)} + return &ValidationError{Name: "html_url", err: fmt.Errorf(`ent: validator failed for field "Deployment.html_url": %w`, err)} } } if _, ok := duo.mutation.UserID(); duo.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Deployment.user"`) } if _, ok := duo.mutation.RepoID(); duo.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "Deployment.repo"`) } return nil } @@ -1385,7 +1385,7 @@ func (duo *DeploymentUpdateOne) sqlSave(ctx context.Context) (_node *Deployment, } id, ok := duo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing Deployment.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Deployment.id" for update`)} } _spec.Node.ID.Value = id if fields := duo.fields; len(fields) > 0 { diff --git a/model/ent/deploymentstatistics_create.go b/model/ent/deploymentstatistics_create.go index 566c60cf..3700ce1f 100644 --- a/model/ent/deploymentstatistics_create.go +++ b/model/ent/deploymentstatistics_create.go @@ -276,40 +276,40 @@ func (dsc *DeploymentStatisticsCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (dsc *DeploymentStatisticsCreate) check() error { if _, ok := dsc.mutation.Env(); !ok { - return &ValidationError{Name: "env", err: errors.New(`ent: missing required field "env"`)} + return &ValidationError{Name: "env", err: errors.New(`ent: missing required field "DeploymentStatistics.env"`)} } if _, ok := dsc.mutation.Count(); !ok { - return &ValidationError{Name: "count", err: errors.New(`ent: missing required field "count"`)} + return &ValidationError{Name: "count", err: errors.New(`ent: missing required field "DeploymentStatistics.count"`)} } if _, ok := dsc.mutation.RollbackCount(); !ok { - return &ValidationError{Name: "rollback_count", err: errors.New(`ent: missing required field "rollback_count"`)} + return &ValidationError{Name: "rollback_count", err: errors.New(`ent: missing required field "DeploymentStatistics.rollback_count"`)} } if _, ok := dsc.mutation.Additions(); !ok { - return &ValidationError{Name: "additions", err: errors.New(`ent: missing required field "additions"`)} + return &ValidationError{Name: "additions", err: errors.New(`ent: missing required field "DeploymentStatistics.additions"`)} } if _, ok := dsc.mutation.Deletions(); !ok { - return &ValidationError{Name: "deletions", err: errors.New(`ent: missing required field "deletions"`)} + return &ValidationError{Name: "deletions", err: errors.New(`ent: missing required field "DeploymentStatistics.deletions"`)} } if _, ok := dsc.mutation.Changes(); !ok { - return &ValidationError{Name: "changes", err: errors.New(`ent: missing required field "changes"`)} + return &ValidationError{Name: "changes", err: errors.New(`ent: missing required field "DeploymentStatistics.changes"`)} } if _, ok := dsc.mutation.LeadTimeSeconds(); !ok { - return &ValidationError{Name: "lead_time_seconds", err: errors.New(`ent: missing required field "lead_time_seconds"`)} + return &ValidationError{Name: "lead_time_seconds", err: errors.New(`ent: missing required field "DeploymentStatistics.lead_time_seconds"`)} } if _, ok := dsc.mutation.CommitCount(); !ok { - return &ValidationError{Name: "commit_count", err: errors.New(`ent: missing required field "commit_count"`)} + return &ValidationError{Name: "commit_count", err: errors.New(`ent: missing required field "DeploymentStatistics.commit_count"`)} } if _, ok := dsc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "DeploymentStatistics.created_at"`)} } if _, ok := dsc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "DeploymentStatistics.updated_at"`)} } if _, ok := dsc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "repo_id"`)} + return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "DeploymentStatistics.repo_id"`)} } if _, ok := dsc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo", err: errors.New("ent: missing required edge \"repo\"")} + return &ValidationError{Name: "repo", err: errors.New(`ent: missing required edge "DeploymentStatistics.repo"`)} } return nil } diff --git a/model/ent/deploymentstatistics_query.go b/model/ent/deploymentstatistics_query.go index 10f1a53e..124427f5 100644 --- a/model/ent/deploymentstatistics_query.go +++ b/model/ent/deploymentstatistics_query.go @@ -133,7 +133,7 @@ func (dsq *DeploymentStatisticsQuery) FirstIDX(ctx context.Context) int { } // Only returns a single DeploymentStatistics entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one DeploymentStatistics entity is not found. +// Returns a *NotSingularError when more than one DeploymentStatistics entity is found. // Returns a *NotFoundError when no DeploymentStatistics entities are found. func (dsq *DeploymentStatisticsQuery) Only(ctx context.Context) (*DeploymentStatistics, error) { nodes, err := dsq.Limit(2).All(ctx) @@ -160,7 +160,7 @@ func (dsq *DeploymentStatisticsQuery) OnlyX(ctx context.Context) *DeploymentStat } // OnlyID is like Only, but returns the only DeploymentStatistics ID in the query. -// Returns a *NotSingularError when exactly one DeploymentStatistics ID is not found. +// Returns a *NotSingularError when more than one DeploymentStatistics ID is found. // Returns a *NotFoundError when no entities are found. func (dsq *DeploymentStatisticsQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -270,8 +270,9 @@ func (dsq *DeploymentStatisticsQuery) Clone() *DeploymentStatisticsQuery { predicates: append([]predicate.DeploymentStatistics{}, dsq.predicates...), withRepo: dsq.withRepo.Clone(), // clone intermediate query. - sql: dsq.sql.Clone(), - path: dsq.path, + sql: dsq.sql.Clone(), + path: dsq.path, + unique: dsq.unique, } } @@ -412,6 +413,10 @@ func (dsq *DeploymentStatisticsQuery) sqlCount(ctx context.Context) (int, error) if len(dsq.modifiers) > 0 { _spec.Modifiers = dsq.modifiers } + _spec.Node.Columns = dsq.fields + if len(dsq.fields) > 0 { + _spec.Unique = dsq.unique != nil && *dsq.unique + } return sqlgraph.CountNodes(ctx, dsq.driver, _spec) } @@ -483,6 +488,9 @@ func (dsq *DeploymentStatisticsQuery) sqlQuery(ctx context.Context) *sql.Selecto selector = dsq.sql selector.Select(selector.Columns(columns...)...) } + if dsq.unique != nil && *dsq.unique { + selector.Distinct() + } for _, m := range dsq.modifiers { m(selector) } @@ -790,9 +798,7 @@ func (dsgb *DeploymentStatisticsGroupBy) sqlQuery() *sql.Selector { for _, f := range dsgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(dsgb.fields...)...) diff --git a/model/ent/deploymentstatistics_update.go b/model/ent/deploymentstatistics_update.go index b6cdce55..a0140b7f 100644 --- a/model/ent/deploymentstatistics_update.go +++ b/model/ent/deploymentstatistics_update.go @@ -296,7 +296,7 @@ func (dsu *DeploymentStatisticsUpdate) defaults() { // check runs all checks and user-defined validators on the builder. func (dsu *DeploymentStatisticsUpdate) check() error { if _, ok := dsu.mutation.RepoID(); dsu.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "DeploymentStatistics.repo"`) } return nil } @@ -766,7 +766,7 @@ func (dsuo *DeploymentStatisticsUpdateOne) defaults() { // check runs all checks and user-defined validators on the builder. func (dsuo *DeploymentStatisticsUpdateOne) check() error { if _, ok := dsuo.mutation.RepoID(); dsuo.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "DeploymentStatistics.repo"`) } return nil } @@ -784,7 +784,7 @@ func (dsuo *DeploymentStatisticsUpdateOne) sqlSave(ctx context.Context) (_node * } id, ok := dsuo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing DeploymentStatistics.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "DeploymentStatistics.id" for update`)} } _spec.Node.ID.Value = id if fields := dsuo.fields; len(fields) > 0 { diff --git a/model/ent/deploymentstatus_create.go b/model/ent/deploymentstatus_create.go index 8b32c4cd..e80f74c1 100644 --- a/model/ent/deploymentstatus_create.go +++ b/model/ent/deploymentstatus_create.go @@ -178,19 +178,19 @@ func (dsc *DeploymentStatusCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (dsc *DeploymentStatusCreate) check() error { if _, ok := dsc.mutation.Status(); !ok { - return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "status"`)} + return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "DeploymentStatus.status"`)} } if _, ok := dsc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "DeploymentStatus.created_at"`)} } if _, ok := dsc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "DeploymentStatus.updated_at"`)} } if _, ok := dsc.mutation.DeploymentID(); !ok { - return &ValidationError{Name: "deployment_id", err: errors.New(`ent: missing required field "deployment_id"`)} + return &ValidationError{Name: "deployment_id", err: errors.New(`ent: missing required field "DeploymentStatus.deployment_id"`)} } if _, ok := dsc.mutation.DeploymentID(); !ok { - return &ValidationError{Name: "deployment", err: errors.New("ent: missing required edge \"deployment\"")} + return &ValidationError{Name: "deployment", err: errors.New(`ent: missing required edge "DeploymentStatus.deployment"`)} } return nil } diff --git a/model/ent/deploymentstatus_query.go b/model/ent/deploymentstatus_query.go index 59c604e9..0eab01d9 100644 --- a/model/ent/deploymentstatus_query.go +++ b/model/ent/deploymentstatus_query.go @@ -133,7 +133,7 @@ func (dsq *DeploymentStatusQuery) FirstIDX(ctx context.Context) int { } // Only returns a single DeploymentStatus entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one DeploymentStatus entity is not found. +// Returns a *NotSingularError when more than one DeploymentStatus entity is found. // Returns a *NotFoundError when no DeploymentStatus entities are found. func (dsq *DeploymentStatusQuery) Only(ctx context.Context) (*DeploymentStatus, error) { nodes, err := dsq.Limit(2).All(ctx) @@ -160,7 +160,7 @@ func (dsq *DeploymentStatusQuery) OnlyX(ctx context.Context) *DeploymentStatus { } // OnlyID is like Only, but returns the only DeploymentStatus ID in the query. -// Returns a *NotSingularError when exactly one DeploymentStatus ID is not found. +// Returns a *NotSingularError when more than one DeploymentStatus ID is found. // Returns a *NotFoundError when no entities are found. func (dsq *DeploymentStatusQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -270,8 +270,9 @@ func (dsq *DeploymentStatusQuery) Clone() *DeploymentStatusQuery { predicates: append([]predicate.DeploymentStatus{}, dsq.predicates...), withDeployment: dsq.withDeployment.Clone(), // clone intermediate query. - sql: dsq.sql.Clone(), - path: dsq.path, + sql: dsq.sql.Clone(), + path: dsq.path, + unique: dsq.unique, } } @@ -412,6 +413,10 @@ func (dsq *DeploymentStatusQuery) sqlCount(ctx context.Context) (int, error) { if len(dsq.modifiers) > 0 { _spec.Modifiers = dsq.modifiers } + _spec.Node.Columns = dsq.fields + if len(dsq.fields) > 0 { + _spec.Unique = dsq.unique != nil && *dsq.unique + } return sqlgraph.CountNodes(ctx, dsq.driver, _spec) } @@ -483,6 +488,9 @@ func (dsq *DeploymentStatusQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = dsq.sql selector.Select(selector.Columns(columns...)...) } + if dsq.unique != nil && *dsq.unique { + selector.Distinct() + } for _, m := range dsq.modifiers { m(selector) } @@ -790,9 +798,7 @@ func (dsgb *DeploymentStatusGroupBy) sqlQuery() *sql.Selector { for _, f := range dsgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(dsgb.fields...)...) diff --git a/model/ent/deploymentstatus_update.go b/model/ent/deploymentstatus_update.go index 4be1c1bf..7c5fba3a 100644 --- a/model/ent/deploymentstatus_update.go +++ b/model/ent/deploymentstatus_update.go @@ -189,7 +189,7 @@ func (dsu *DeploymentStatusUpdate) defaults() { // check runs all checks and user-defined validators on the builder. func (dsu *DeploymentStatusUpdate) check() error { if _, ok := dsu.mutation.DeploymentID(); dsu.mutation.DeploymentCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"deployment\"") + return errors.New(`ent: clearing a required unique edge "DeploymentStatus.deployment"`) } return nil } @@ -480,7 +480,7 @@ func (dsuo *DeploymentStatusUpdateOne) defaults() { // check runs all checks and user-defined validators on the builder. func (dsuo *DeploymentStatusUpdateOne) check() error { if _, ok := dsuo.mutation.DeploymentID(); dsuo.mutation.DeploymentCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"deployment\"") + return errors.New(`ent: clearing a required unique edge "DeploymentStatus.deployment"`) } return nil } @@ -498,7 +498,7 @@ func (dsuo *DeploymentStatusUpdateOne) sqlSave(ctx context.Context) (_node *Depl } id, ok := dsuo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing DeploymentStatus.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "DeploymentStatus.id" for update`)} } _spec.Node.ID.Value = id if fields := dsuo.fields; len(fields) > 0 { diff --git a/model/ent/ent.go b/model/ent/ent.go index ec95b82b..7e221728 100644 --- a/model/ent/ent.go +++ b/model/ent/ent.go @@ -161,7 +161,7 @@ func Sum(field string) AggregateFunc { } } -// ValidationError returns when validating a field fails. +// ValidationError returns when validating a field or edge fails. type ValidationError struct { Name string // Field or edge name. err error diff --git a/model/ent/event_create.go b/model/ent/event_create.go index db7ba345..7067e73a 100644 --- a/model/ent/event_create.go +++ b/model/ent/event_create.go @@ -200,23 +200,23 @@ func (ec *EventCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (ec *EventCreate) check() error { if _, ok := ec.mutation.Kind(); !ok { - return &ValidationError{Name: "kind", err: errors.New(`ent: missing required field "kind"`)} + return &ValidationError{Name: "kind", err: errors.New(`ent: missing required field "Event.kind"`)} } if v, ok := ec.mutation.Kind(); ok { if err := event.KindValidator(v); err != nil { - return &ValidationError{Name: "kind", err: fmt.Errorf(`ent: validator failed for field "kind": %w`, err)} + return &ValidationError{Name: "kind", err: fmt.Errorf(`ent: validator failed for field "Event.kind": %w`, err)} } } if _, ok := ec.mutation.GetType(); !ok { - return &ValidationError{Name: "type", err: errors.New(`ent: missing required field "type"`)} + return &ValidationError{Name: "type", err: errors.New(`ent: missing required field "Event.type"`)} } if v, ok := ec.mutation.GetType(); ok { if err := event.TypeValidator(v); err != nil { - return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "type": %w`, err)} + return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Event.type": %w`, err)} } } if _, ok := ec.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Event.created_at"`)} } return nil } diff --git a/model/ent/event_query.go b/model/ent/event_query.go index b4f62a17..563d35dc 100644 --- a/model/ent/event_query.go +++ b/model/ent/event_query.go @@ -182,7 +182,7 @@ func (eq *EventQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Event entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Event entity is not found. +// Returns a *NotSingularError when more than one Event entity is found. // Returns a *NotFoundError when no Event entities are found. func (eq *EventQuery) Only(ctx context.Context) (*Event, error) { nodes, err := eq.Limit(2).All(ctx) @@ -209,7 +209,7 @@ func (eq *EventQuery) OnlyX(ctx context.Context) *Event { } // OnlyID is like Only, but returns the only Event ID in the query. -// Returns a *NotSingularError when exactly one Event ID is not found. +// Returns a *NotSingularError when more than one Event ID is found. // Returns a *NotFoundError when no entities are found. func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -321,8 +321,9 @@ func (eq *EventQuery) Clone() *EventQuery { withReview: eq.withReview.Clone(), withNotificationRecord: eq.withNotificationRecord.Clone(), // clone intermediate query. - sql: eq.sql.Clone(), - path: eq.path, + sql: eq.sql.Clone(), + path: eq.path, + unique: eq.unique, } } @@ -537,6 +538,10 @@ func (eq *EventQuery) sqlCount(ctx context.Context) (int, error) { if len(eq.modifiers) > 0 { _spec.Modifiers = eq.modifiers } + _spec.Node.Columns = eq.fields + if len(eq.fields) > 0 { + _spec.Unique = eq.unique != nil && *eq.unique + } return sqlgraph.CountNodes(ctx, eq.driver, _spec) } @@ -608,6 +613,9 @@ func (eq *EventQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = eq.sql selector.Select(selector.Columns(columns...)...) } + if eq.unique != nil && *eq.unique { + selector.Distinct() + } for _, m := range eq.modifiers { m(selector) } @@ -915,9 +923,7 @@ func (egb *EventGroupBy) sqlQuery() *sql.Selector { for _, f := range egb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(egb.fields...)...) diff --git a/model/ent/event_update.go b/model/ent/event_update.go index a3fe1511..cddcfeba 100644 --- a/model/ent/event_update.go +++ b/model/ent/event_update.go @@ -4,6 +4,7 @@ package ent import ( "context" + "errors" "fmt" "time" @@ -239,12 +240,12 @@ func (eu *EventUpdate) ExecX(ctx context.Context) { func (eu *EventUpdate) check() error { if v, ok := eu.mutation.Kind(); ok { if err := event.KindValidator(v); err != nil { - return &ValidationError{Name: "kind", err: fmt.Errorf("ent: validator failed for field \"kind\": %w", err)} + return &ValidationError{Name: "kind", err: fmt.Errorf(`ent: validator failed for field "Event.kind": %w`, err)} } } if v, ok := eu.mutation.GetType(); ok { if err := event.TypeValidator(v); err != nil { - return &ValidationError{Name: "type", err: fmt.Errorf("ent: validator failed for field \"type\": %w", err)} + return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Event.type": %w`, err)} } } return nil @@ -649,12 +650,12 @@ func (euo *EventUpdateOne) ExecX(ctx context.Context) { func (euo *EventUpdateOne) check() error { if v, ok := euo.mutation.Kind(); ok { if err := event.KindValidator(v); err != nil { - return &ValidationError{Name: "kind", err: fmt.Errorf("ent: validator failed for field \"kind\": %w", err)} + return &ValidationError{Name: "kind", err: fmt.Errorf(`ent: validator failed for field "Event.kind": %w`, err)} } } if v, ok := euo.mutation.GetType(); ok { if err := event.TypeValidator(v); err != nil { - return &ValidationError{Name: "type", err: fmt.Errorf("ent: validator failed for field \"type\": %w", err)} + return &ValidationError{Name: "type", err: fmt.Errorf(`ent: validator failed for field "Event.type": %w`, err)} } } return nil @@ -673,7 +674,7 @@ func (euo *EventUpdateOne) sqlSave(ctx context.Context) (_node *Event, err error } id, ok := euo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing Event.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Event.id" for update`)} } _spec.Node.ID.Value = id if fields := euo.fields; len(fields) > 0 { diff --git a/model/ent/lock_create.go b/model/ent/lock_create.go index 72bf1b75..84ad9fd3 100644 --- a/model/ent/lock_create.go +++ b/model/ent/lock_create.go @@ -158,22 +158,22 @@ func (lc *LockCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (lc *LockCreate) check() error { if _, ok := lc.mutation.Env(); !ok { - return &ValidationError{Name: "env", err: errors.New(`ent: missing required field "env"`)} + return &ValidationError{Name: "env", err: errors.New(`ent: missing required field "Lock.env"`)} } if _, ok := lc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Lock.created_at"`)} } if _, ok := lc.mutation.UserID(); !ok { - return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "user_id"`)} + return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "Lock.user_id"`)} } if _, ok := lc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "repo_id"`)} + return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "Lock.repo_id"`)} } if _, ok := lc.mutation.UserID(); !ok { - return &ValidationError{Name: "user", err: errors.New("ent: missing required edge \"user\"")} + return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "Lock.user"`)} } if _, ok := lc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo", err: errors.New("ent: missing required edge \"repo\"")} + return &ValidationError{Name: "repo", err: errors.New(`ent: missing required edge "Lock.repo"`)} } return nil } diff --git a/model/ent/lock_query.go b/model/ent/lock_query.go index d4e20a18..9cc82dcf 100644 --- a/model/ent/lock_query.go +++ b/model/ent/lock_query.go @@ -157,7 +157,7 @@ func (lq *LockQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Lock entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Lock entity is not found. +// Returns a *NotSingularError when more than one Lock entity is found. // Returns a *NotFoundError when no Lock entities are found. func (lq *LockQuery) Only(ctx context.Context) (*Lock, error) { nodes, err := lq.Limit(2).All(ctx) @@ -184,7 +184,7 @@ func (lq *LockQuery) OnlyX(ctx context.Context) *Lock { } // OnlyID is like Only, but returns the only Lock ID in the query. -// Returns a *NotSingularError when exactly one Lock ID is not found. +// Returns a *NotSingularError when more than one Lock ID is found. // Returns a *NotFoundError when no entities are found. func (lq *LockQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -295,8 +295,9 @@ func (lq *LockQuery) Clone() *LockQuery { withUser: lq.withUser.Clone(), withRepo: lq.withRepo.Clone(), // clone intermediate query. - sql: lq.sql.Clone(), - path: lq.path, + sql: lq.sql.Clone(), + path: lq.path, + unique: lq.unique, } } @@ -475,6 +476,10 @@ func (lq *LockQuery) sqlCount(ctx context.Context) (int, error) { if len(lq.modifiers) > 0 { _spec.Modifiers = lq.modifiers } + _spec.Node.Columns = lq.fields + if len(lq.fields) > 0 { + _spec.Unique = lq.unique != nil && *lq.unique + } return sqlgraph.CountNodes(ctx, lq.driver, _spec) } @@ -546,6 +551,9 @@ func (lq *LockQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = lq.sql selector.Select(selector.Columns(columns...)...) } + if lq.unique != nil && *lq.unique { + selector.Distinct() + } for _, m := range lq.modifiers { m(selector) } @@ -853,9 +861,7 @@ func (lgb *LockGroupBy) sqlQuery() *sql.Selector { for _, f := range lgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(lgb.fields...)...) diff --git a/model/ent/lock_update.go b/model/ent/lock_update.go index 25e6581b..7736bda5 100644 --- a/model/ent/lock_update.go +++ b/model/ent/lock_update.go @@ -172,10 +172,10 @@ func (lu *LockUpdate) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (lu *LockUpdate) check() error { if _, ok := lu.mutation.UserID(); lu.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Lock.user"`) } if _, ok := lu.mutation.RepoID(); lu.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "Lock.repo"`) } return nil } @@ -463,10 +463,10 @@ func (luo *LockUpdateOne) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (luo *LockUpdateOne) check() error { if _, ok := luo.mutation.UserID(); luo.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Lock.user"`) } if _, ok := luo.mutation.RepoID(); luo.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "Lock.repo"`) } return nil } @@ -484,7 +484,7 @@ func (luo *LockUpdateOne) sqlSave(ctx context.Context) (_node *Lock, err error) } id, ok := luo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing Lock.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Lock.id" for update`)} } _spec.Node.ID.Value = id if fields := luo.fields; len(fields) > 0 { diff --git a/model/ent/migrate/migrate.go b/model/ent/migrate/migrate.go index e4a9a221..9bdaf523 100644 --- a/model/ent/migrate/migrate.go +++ b/model/ent/migrate/migrate.go @@ -37,8 +37,7 @@ var ( // Schema is the API for creating, migrating and dropping a schema. type Schema struct { - drv dialect.Driver - universalID bool + drv dialect.Driver } // NewSchema creates a new schema client. diff --git a/model/ent/migrate/schema.go b/model/ent/migrate/schema.go index b3284b22..da66523a 100644 --- a/model/ent/migrate/schema.go +++ b/model/ent/migrate/schema.go @@ -17,7 +17,7 @@ var ( {Name: "bot_token", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, - {Name: "user_id", Type: field.TypeInt64, Unique: true, Nullable: true}, + {Name: "user_id", Type: field.TypeInt64, Unique: true}, } // ChatUsersTable holds the schema information for the "chat_users" table. ChatUsersTable = &schema.Table{ @@ -50,8 +50,8 @@ var ( {Name: "updated_at", Type: field.TypeTime}, {Name: "is_approval_enabled", Type: field.TypeBool, Nullable: true}, {Name: "required_approval_count", Type: field.TypeInt, Nullable: true}, - {Name: "repo_id", Type: field.TypeInt64, Nullable: true}, - {Name: "user_id", Type: field.TypeInt64, Nullable: true}, + {Name: "repo_id", Type: field.TypeInt64}, + {Name: "user_id", Type: field.TypeInt64}, } // DeploymentsTable holds the schema information for the "deployments" table. DeploymentsTable = &schema.Table{ @@ -69,7 +69,7 @@ var ( Symbol: "deployments_users_deployments", Columns: []*schema.Column{DeploymentsColumns[16]}, RefColumns: []*schema.Column{UsersColumns[0]}, - OnDelete: schema.SetNull, + OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ @@ -118,7 +118,7 @@ var ( {Name: "commit_count", Type: field.TypeInt, Default: 0}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, - {Name: "repo_id", Type: field.TypeInt64, Nullable: true}, + {Name: "repo_id", Type: field.TypeInt64}, } // DeploymentStatisticsTable holds the schema information for the "deployment_statistics" table. DeploymentStatisticsTable = &schema.Table{ @@ -154,7 +154,7 @@ var ( {Name: "log_url", Type: field.TypeString, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, - {Name: "deployment_id", Type: field.TypeInt, Nullable: true}, + {Name: "deployment_id", Type: field.TypeInt}, } // DeploymentStatusTable holds the schema information for the "deployment_status" table. DeploymentStatusTable = &schema.Table{ @@ -213,8 +213,8 @@ var ( {Name: "env", Type: field.TypeString}, {Name: "expired_at", Type: field.TypeTime, Nullable: true}, {Name: "created_at", Type: field.TypeTime}, - {Name: "repo_id", Type: field.TypeInt64, Nullable: true}, - {Name: "user_id", Type: field.TypeInt64, Nullable: true}, + {Name: "repo_id", Type: field.TypeInt64}, + {Name: "user_id", Type: field.TypeInt64}, } // LocksTable holds the schema information for the "locks" table. LocksTable = &schema.Table{ @@ -232,7 +232,7 @@ var ( Symbol: "locks_users_locks", Columns: []*schema.Column{LocksColumns[5]}, RefColumns: []*schema.Column{UsersColumns[0]}, - OnDelete: schema.SetNull, + OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ @@ -246,7 +246,7 @@ var ( // NotificationRecordsColumns holds the columns for the "notification_records" table. NotificationRecordsColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt, Increment: true}, - {Name: "event_id", Type: field.TypeInt, Unique: true, Nullable: true}, + {Name: "event_id", Type: field.TypeInt, Unique: true}, } // NotificationRecordsTable holds the schema information for the "notification_records" table. NotificationRecordsTable = &schema.Table{ @@ -258,7 +258,7 @@ var ( Symbol: "notification_records_events_notification_record", Columns: []*schema.Column{NotificationRecordsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, - OnDelete: schema.SetNull, + OnDelete: schema.NoAction, }, }, } @@ -269,8 +269,8 @@ var ( {Name: "synced_at", Type: field.TypeTime, Nullable: true, SchemaType: map[string]string{"mysql": "timestamp(6)"}}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, - {Name: "repo_id", Type: field.TypeInt64, Nullable: true}, - {Name: "user_id", Type: field.TypeInt64, Nullable: true}, + {Name: "repo_id", Type: field.TypeInt64}, + {Name: "user_id", Type: field.TypeInt64}, } // PermsTable holds the schema information for the "perms" table. PermsTable = &schema.Table{ @@ -356,8 +356,8 @@ var ( {Name: "comment", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "created_at", Type: field.TypeTime}, {Name: "updated_at", Type: field.TypeTime}, - {Name: "deployment_id", Type: field.TypeInt, Nullable: true}, - {Name: "user_id", Type: field.TypeInt64, Nullable: true}, + {Name: "deployment_id", Type: field.TypeInt}, + {Name: "user_id", Type: field.TypeInt64}, } // ReviewsTable holds the schema information for the "reviews" table. ReviewsTable = &schema.Table{ @@ -375,7 +375,7 @@ var ( Symbol: "reviews_users_reviews", Columns: []*schema.Column{ReviewsColumns[6]}, RefColumns: []*schema.Column{UsersColumns[0]}, - OnDelete: schema.SetNull, + OnDelete: schema.NoAction, }, }, } diff --git a/model/ent/mutation.go b/model/ent/mutation.go index 26ce11f6..14ee1e62 100644 --- a/model/ent/mutation.go +++ b/model/ent/mutation.go @@ -4,6 +4,7 @@ package ent import ( "context" + "errors" "fmt" "sync" "time" @@ -96,7 +97,7 @@ func withChatUserID(id string) chatuserOption { m.oldValue = func(ctx context.Context) (*ChatUser, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().ChatUser.Get(ctx, id) } @@ -129,7 +130,7 @@ func (m ChatUserMutation) Client() *Client { // it returns an error otherwise. func (m ChatUserMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -151,6 +152,25 @@ func (m *ChatUserMutation) ID() (id string, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *ChatUserMutation) IDs(ctx context.Context) ([]string, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []string{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().ChatUser.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetToken sets the "token" field. func (m *ChatUserMutation) SetToken(s string) { m.token = &s @@ -170,10 +190,10 @@ func (m *ChatUserMutation) Token() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldToken(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldToken is only allowed on UpdateOne operations") + return v, errors.New("OldToken is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldToken requires an ID field in the mutation") + return v, errors.New("OldToken requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -206,10 +226,10 @@ func (m *ChatUserMutation) Refresh() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldRefresh(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRefresh is only allowed on UpdateOne operations") + return v, errors.New("OldRefresh is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRefresh requires an ID field in the mutation") + return v, errors.New("OldRefresh requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -242,10 +262,10 @@ func (m *ChatUserMutation) Expiry() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldExpiry(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldExpiry is only allowed on UpdateOne operations") + return v, errors.New("OldExpiry is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldExpiry requires an ID field in the mutation") + return v, errors.New("OldExpiry requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -278,10 +298,10 @@ func (m *ChatUserMutation) BotToken() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldBotToken(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldBotToken is only allowed on UpdateOne operations") + return v, errors.New("OldBotToken is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldBotToken requires an ID field in the mutation") + return v, errors.New("OldBotToken requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -314,10 +334,10 @@ func (m *ChatUserMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -350,10 +370,10 @@ func (m *ChatUserMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -386,10 +406,10 @@ func (m *ChatUserMutation) UserID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ChatUserMutation) OldUserID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUserID is only allowed on UpdateOne operations") + return v, errors.New("OldUserID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUserID requires an ID field in the mutation") + return v, errors.New("OldUserID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -798,7 +818,7 @@ func withDeploymentID(id int) deploymentOption { m.oldValue = func(ctx context.Context) (*Deployment, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().Deployment.Get(ctx, id) } @@ -831,7 +851,7 @@ func (m DeploymentMutation) Client() *Client { // it returns an error otherwise. func (m DeploymentMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -847,6 +867,25 @@ func (m *DeploymentMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *DeploymentMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Deployment.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetNumber sets the "number" field. func (m *DeploymentMutation) SetNumber(i int) { m.number = &i @@ -867,10 +906,10 @@ func (m *DeploymentMutation) Number() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldNumber(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldNumber is only allowed on UpdateOne operations") + return v, errors.New("OldNumber is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldNumber requires an ID field in the mutation") + return v, errors.New("OldNumber requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -922,10 +961,10 @@ func (m *DeploymentMutation) GetType() (r deployment.Type, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldType(ctx context.Context) (v deployment.Type, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldType is only allowed on UpdateOne operations") + return v, errors.New("OldType is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldType requires an ID field in the mutation") + return v, errors.New("OldType requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -958,10 +997,10 @@ func (m *DeploymentMutation) Env() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldEnv(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldEnv is only allowed on UpdateOne operations") + return v, errors.New("OldEnv is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldEnv requires an ID field in the mutation") + return v, errors.New("OldEnv requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -994,10 +1033,10 @@ func (m *DeploymentMutation) Ref() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldRef(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRef is only allowed on UpdateOne operations") + return v, errors.New("OldRef is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRef requires an ID field in the mutation") + return v, errors.New("OldRef requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1030,10 +1069,10 @@ func (m *DeploymentMutation) Status() (r deployment.Status, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldStatus(ctx context.Context) (v deployment.Status, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldStatus is only allowed on UpdateOne operations") + return v, errors.New("OldStatus is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldStatus requires an ID field in the mutation") + return v, errors.New("OldStatus requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1067,10 +1106,10 @@ func (m *DeploymentMutation) UID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldUID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUID is only allowed on UpdateOne operations") + return v, errors.New("OldUID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUID requires an ID field in the mutation") + return v, errors.New("OldUID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1136,10 +1175,10 @@ func (m *DeploymentMutation) Sha() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldSha(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldSha is only allowed on UpdateOne operations") + return v, errors.New("OldSha is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldSha requires an ID field in the mutation") + return v, errors.New("OldSha requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1185,10 +1224,10 @@ func (m *DeploymentMutation) HTMLURL() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldHTMLURL(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldHTMLURL is only allowed on UpdateOne operations") + return v, errors.New("OldHTMLURL is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldHTMLURL requires an ID field in the mutation") + return v, errors.New("OldHTMLURL requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1234,10 +1273,10 @@ func (m *DeploymentMutation) ProductionEnvironment() (r bool, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldProductionEnvironment(ctx context.Context) (v bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldProductionEnvironment is only allowed on UpdateOne operations") + return v, errors.New("OldProductionEnvironment is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldProductionEnvironment requires an ID field in the mutation") + return v, errors.New("OldProductionEnvironment requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1270,10 +1309,10 @@ func (m *DeploymentMutation) IsRollback() (r bool, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldIsRollback(ctx context.Context) (v bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldIsRollback is only allowed on UpdateOne operations") + return v, errors.New("OldIsRollback is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldIsRollback requires an ID field in the mutation") + return v, errors.New("OldIsRollback requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1306,10 +1345,10 @@ func (m *DeploymentMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1342,10 +1381,10 @@ func (m *DeploymentMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1378,10 +1417,10 @@ func (m *DeploymentMutation) UserID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldUserID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUserID is only allowed on UpdateOne operations") + return v, errors.New("OldUserID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUserID requires an ID field in the mutation") + return v, errors.New("OldUserID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1414,10 +1453,10 @@ func (m *DeploymentMutation) RepoID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldRepoID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRepoID is only allowed on UpdateOne operations") + return v, errors.New("OldRepoID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRepoID requires an ID field in the mutation") + return v, errors.New("OldRepoID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1450,10 +1489,10 @@ func (m *DeploymentMutation) IsApprovalEnabled() (r bool, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldIsApprovalEnabled(ctx context.Context) (v *bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldIsApprovalEnabled is only allowed on UpdateOne operations") + return v, errors.New("OldIsApprovalEnabled is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldIsApprovalEnabled requires an ID field in the mutation") + return v, errors.New("OldIsApprovalEnabled requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -1500,10 +1539,10 @@ func (m *DeploymentMutation) RequiredApprovalCount() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentMutation) OldRequiredApprovalCount(ctx context.Context) (v *int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRequiredApprovalCount is only allowed on UpdateOne operations") + return v, errors.New("OldRequiredApprovalCount is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRequiredApprovalCount requires an ID field in the mutation") + return v, errors.New("OldRequiredApprovalCount requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2440,7 +2479,7 @@ func withDeploymentStatisticsID(id int) deploymentstatisticsOption { m.oldValue = func(ctx context.Context) (*DeploymentStatistics, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().DeploymentStatistics.Get(ctx, id) } @@ -2473,7 +2512,7 @@ func (m DeploymentStatisticsMutation) Client() *Client { // it returns an error otherwise. func (m DeploymentStatisticsMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -2489,6 +2528,25 @@ func (m *DeploymentStatisticsMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *DeploymentStatisticsMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().DeploymentStatistics.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetEnv sets the "env" field. func (m *DeploymentStatisticsMutation) SetEnv(s string) { m.env = &s @@ -2508,10 +2566,10 @@ func (m *DeploymentStatisticsMutation) Env() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldEnv(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldEnv is only allowed on UpdateOne operations") + return v, errors.New("OldEnv is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldEnv requires an ID field in the mutation") + return v, errors.New("OldEnv requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2545,10 +2603,10 @@ func (m *DeploymentStatisticsMutation) Count() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldCount(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCount is only allowed on UpdateOne operations") + return v, errors.New("OldCount is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCount requires an ID field in the mutation") + return v, errors.New("OldCount requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2601,10 +2659,10 @@ func (m *DeploymentStatisticsMutation) RollbackCount() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldRollbackCount(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRollbackCount is only allowed on UpdateOne operations") + return v, errors.New("OldRollbackCount is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRollbackCount requires an ID field in the mutation") + return v, errors.New("OldRollbackCount requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2657,10 +2715,10 @@ func (m *DeploymentStatisticsMutation) Additions() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldAdditions(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldAdditions is only allowed on UpdateOne operations") + return v, errors.New("OldAdditions is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldAdditions requires an ID field in the mutation") + return v, errors.New("OldAdditions requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2713,10 +2771,10 @@ func (m *DeploymentStatisticsMutation) Deletions() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldDeletions(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDeletions is only allowed on UpdateOne operations") + return v, errors.New("OldDeletions is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDeletions requires an ID field in the mutation") + return v, errors.New("OldDeletions requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2769,10 +2827,10 @@ func (m *DeploymentStatisticsMutation) Changes() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldChanges(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldChanges is only allowed on UpdateOne operations") + return v, errors.New("OldChanges is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldChanges requires an ID field in the mutation") + return v, errors.New("OldChanges requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2825,10 +2883,10 @@ func (m *DeploymentStatisticsMutation) LeadTimeSeconds() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldLeadTimeSeconds(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldLeadTimeSeconds is only allowed on UpdateOne operations") + return v, errors.New("OldLeadTimeSeconds is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldLeadTimeSeconds requires an ID field in the mutation") + return v, errors.New("OldLeadTimeSeconds requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2881,10 +2939,10 @@ func (m *DeploymentStatisticsMutation) CommitCount() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldCommitCount(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCommitCount is only allowed on UpdateOne operations") + return v, errors.New("OldCommitCount is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCommitCount requires an ID field in the mutation") + return v, errors.New("OldCommitCount requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2936,10 +2994,10 @@ func (m *DeploymentStatisticsMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -2972,10 +3030,10 @@ func (m *DeploymentStatisticsMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3008,10 +3066,10 @@ func (m *DeploymentStatisticsMutation) RepoID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatisticsMutation) OldRepoID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRepoID is only allowed on UpdateOne operations") + return v, errors.New("OldRepoID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRepoID requires an ID field in the mutation") + return v, errors.New("OldRepoID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3549,7 +3607,7 @@ func withDeploymentStatusID(id int) deploymentstatusOption { m.oldValue = func(ctx context.Context) (*DeploymentStatus, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().DeploymentStatus.Get(ctx, id) } @@ -3582,7 +3640,7 @@ func (m DeploymentStatusMutation) Client() *Client { // it returns an error otherwise. func (m DeploymentStatusMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -3598,6 +3656,25 @@ func (m *DeploymentStatusMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *DeploymentStatusMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().DeploymentStatus.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetStatus sets the "status" field. func (m *DeploymentStatusMutation) SetStatus(s string) { m.status = &s @@ -3617,10 +3694,10 @@ func (m *DeploymentStatusMutation) Status() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatusMutation) OldStatus(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldStatus is only allowed on UpdateOne operations") + return v, errors.New("OldStatus is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldStatus requires an ID field in the mutation") + return v, errors.New("OldStatus requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3653,10 +3730,10 @@ func (m *DeploymentStatusMutation) Description() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatusMutation) OldDescription(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDescription is only allowed on UpdateOne operations") + return v, errors.New("OldDescription is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDescription requires an ID field in the mutation") + return v, errors.New("OldDescription requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3702,10 +3779,10 @@ func (m *DeploymentStatusMutation) LogURL() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatusMutation) OldLogURL(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldLogURL is only allowed on UpdateOne operations") + return v, errors.New("OldLogURL is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldLogURL requires an ID field in the mutation") + return v, errors.New("OldLogURL requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3751,10 +3828,10 @@ func (m *DeploymentStatusMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatusMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3787,10 +3864,10 @@ func (m *DeploymentStatusMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatusMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -3823,10 +3900,10 @@ func (m *DeploymentStatusMutation) DeploymentID() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *DeploymentStatusMutation) OldDeploymentID(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDeploymentID is only allowed on UpdateOne operations") + return v, errors.New("OldDeploymentID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDeploymentID requires an ID field in the mutation") + return v, errors.New("OldDeploymentID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -4214,7 +4291,7 @@ func withEventID(id int) eventOption { m.oldValue = func(ctx context.Context) (*Event, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().Event.Get(ctx, id) } @@ -4247,7 +4324,7 @@ func (m EventMutation) Client() *Client { // it returns an error otherwise. func (m EventMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -4263,6 +4340,25 @@ func (m *EventMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *EventMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Event.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetKind sets the "kind" field. func (m *EventMutation) SetKind(e event.Kind) { m.kind = &e @@ -4282,10 +4378,10 @@ func (m *EventMutation) Kind() (r event.Kind, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *EventMutation) OldKind(ctx context.Context) (v event.Kind, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldKind is only allowed on UpdateOne operations") + return v, errors.New("OldKind is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldKind requires an ID field in the mutation") + return v, errors.New("OldKind requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -4318,10 +4414,10 @@ func (m *EventMutation) GetType() (r event.Type, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *EventMutation) OldType(ctx context.Context) (v event.Type, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldType is only allowed on UpdateOne operations") + return v, errors.New("OldType is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldType requires an ID field in the mutation") + return v, errors.New("OldType requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -4354,10 +4450,10 @@ func (m *EventMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *EventMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -4390,10 +4486,10 @@ func (m *EventMutation) DeploymentID() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *EventMutation) OldDeploymentID(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDeploymentID is only allowed on UpdateOne operations") + return v, errors.New("OldDeploymentID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDeploymentID requires an ID field in the mutation") + return v, errors.New("OldDeploymentID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -4439,10 +4535,10 @@ func (m *EventMutation) ReviewID() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *EventMutation) OldReviewID(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldReviewID is only allowed on UpdateOne operations") + return v, errors.New("OldReviewID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldReviewID requires an ID field in the mutation") + return v, errors.New("OldReviewID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -4489,10 +4585,10 @@ func (m *EventMutation) DeletedID() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *EventMutation) OldDeletedID(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDeletedID is only allowed on UpdateOne operations") + return v, errors.New("OldDeletedID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDeletedID requires an ID field in the mutation") + return v, errors.New("OldDeletedID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -5028,7 +5124,7 @@ func withLockID(id int) lockOption { m.oldValue = func(ctx context.Context) (*Lock, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().Lock.Get(ctx, id) } @@ -5061,7 +5157,7 @@ func (m LockMutation) Client() *Client { // it returns an error otherwise. func (m LockMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -5077,6 +5173,25 @@ func (m *LockMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *LockMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Lock.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetEnv sets the "env" field. func (m *LockMutation) SetEnv(s string) { m.env = &s @@ -5096,10 +5211,10 @@ func (m *LockMutation) Env() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *LockMutation) OldEnv(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldEnv is only allowed on UpdateOne operations") + return v, errors.New("OldEnv is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldEnv requires an ID field in the mutation") + return v, errors.New("OldEnv requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -5132,10 +5247,10 @@ func (m *LockMutation) ExpiredAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *LockMutation) OldExpiredAt(ctx context.Context) (v *time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldExpiredAt is only allowed on UpdateOne operations") + return v, errors.New("OldExpiredAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldExpiredAt requires an ID field in the mutation") + return v, errors.New("OldExpiredAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -5181,10 +5296,10 @@ func (m *LockMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *LockMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -5217,10 +5332,10 @@ func (m *LockMutation) UserID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *LockMutation) OldUserID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUserID is only allowed on UpdateOne operations") + return v, errors.New("OldUserID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUserID requires an ID field in the mutation") + return v, errors.New("OldUserID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -5253,10 +5368,10 @@ func (m *LockMutation) RepoID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *LockMutation) OldRepoID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRepoID is only allowed on UpdateOne operations") + return v, errors.New("OldRepoID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRepoID requires an ID field in the mutation") + return v, errors.New("OldRepoID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -5656,7 +5771,7 @@ func withNotificationRecordID(id int) notificationrecordOption { m.oldValue = func(ctx context.Context) (*NotificationRecord, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().NotificationRecord.Get(ctx, id) } @@ -5689,7 +5804,7 @@ func (m NotificationRecordMutation) Client() *Client { // it returns an error otherwise. func (m NotificationRecordMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -5705,6 +5820,25 @@ func (m *NotificationRecordMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *NotificationRecordMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().NotificationRecord.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetEventID sets the "event_id" field. func (m *NotificationRecordMutation) SetEventID(i int) { m.event = &i @@ -5724,10 +5858,10 @@ func (m *NotificationRecordMutation) EventID() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *NotificationRecordMutation) OldEventID(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldEventID is only allowed on UpdateOne operations") + return v, errors.New("OldEventID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldEventID requires an ID field in the mutation") + return v, errors.New("OldEventID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6012,7 +6146,7 @@ func withPermID(id int) permOption { m.oldValue = func(ctx context.Context) (*Perm, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().Perm.Get(ctx, id) } @@ -6045,7 +6179,7 @@ func (m PermMutation) Client() *Client { // it returns an error otherwise. func (m PermMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -6061,6 +6195,25 @@ func (m *PermMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *PermMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Perm.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetRepoPerm sets the "repo_perm" field. func (m *PermMutation) SetRepoPerm(pp perm.RepoPerm) { m.repo_perm = &pp @@ -6080,10 +6233,10 @@ func (m *PermMutation) RepoPerm() (r perm.RepoPerm, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *PermMutation) OldRepoPerm(ctx context.Context) (v perm.RepoPerm, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRepoPerm is only allowed on UpdateOne operations") + return v, errors.New("OldRepoPerm is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRepoPerm requires an ID field in the mutation") + return v, errors.New("OldRepoPerm requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6116,10 +6269,10 @@ func (m *PermMutation) SyncedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *PermMutation) OldSyncedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldSyncedAt is only allowed on UpdateOne operations") + return v, errors.New("OldSyncedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldSyncedAt requires an ID field in the mutation") + return v, errors.New("OldSyncedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6165,10 +6318,10 @@ func (m *PermMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *PermMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6201,10 +6354,10 @@ func (m *PermMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *PermMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6237,10 +6390,10 @@ func (m *PermMutation) UserID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *PermMutation) OldUserID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUserID is only allowed on UpdateOne operations") + return v, errors.New("OldUserID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUserID requires an ID field in the mutation") + return v, errors.New("OldUserID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6273,10 +6426,10 @@ func (m *PermMutation) RepoID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *PermMutation) OldRepoID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRepoID is only allowed on UpdateOne operations") + return v, errors.New("OldRepoID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRepoID requires an ID field in the mutation") + return v, errors.New("OldRepoID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6715,7 +6868,7 @@ func withRepoID(id int64) repoOption { m.oldValue = func(ctx context.Context) (*Repo, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().Repo.Get(ctx, id) } @@ -6748,7 +6901,7 @@ func (m RepoMutation) Client() *Client { // it returns an error otherwise. func (m RepoMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -6770,6 +6923,25 @@ func (m *RepoMutation) ID() (id int64, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *RepoMutation) IDs(ctx context.Context) ([]int64, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int64{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Repo.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetNamespace sets the "namespace" field. func (m *RepoMutation) SetNamespace(s string) { m.namespace = &s @@ -6789,10 +6961,10 @@ func (m *RepoMutation) Namespace() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldNamespace(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldNamespace is only allowed on UpdateOne operations") + return v, errors.New("OldNamespace is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldNamespace requires an ID field in the mutation") + return v, errors.New("OldNamespace requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6825,10 +6997,10 @@ func (m *RepoMutation) Name() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldName(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldName is only allowed on UpdateOne operations") + return v, errors.New("OldName is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldName requires an ID field in the mutation") + return v, errors.New("OldName requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6861,10 +7033,10 @@ func (m *RepoMutation) Description() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldDescription(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDescription is only allowed on UpdateOne operations") + return v, errors.New("OldDescription is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDescription requires an ID field in the mutation") + return v, errors.New("OldDescription requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6897,10 +7069,10 @@ func (m *RepoMutation) ConfigPath() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldConfigPath(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldConfigPath is only allowed on UpdateOne operations") + return v, errors.New("OldConfigPath is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldConfigPath requires an ID field in the mutation") + return v, errors.New("OldConfigPath requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6933,10 +7105,10 @@ func (m *RepoMutation) Active() (r bool, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldActive(ctx context.Context) (v bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldActive is only allowed on UpdateOne operations") + return v, errors.New("OldActive is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldActive requires an ID field in the mutation") + return v, errors.New("OldActive requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -6970,10 +7142,10 @@ func (m *RepoMutation) WebhookID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldWebhookID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldWebhookID is only allowed on UpdateOne operations") + return v, errors.New("OldWebhookID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldWebhookID requires an ID field in the mutation") + return v, errors.New("OldWebhookID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -7039,10 +7211,10 @@ func (m *RepoMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -7075,10 +7247,10 @@ func (m *RepoMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -7111,10 +7283,10 @@ func (m *RepoMutation) LatestDeployedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldLatestDeployedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldLatestDeployedAt is only allowed on UpdateOne operations") + return v, errors.New("OldLatestDeployedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldLatestDeployedAt requires an ID field in the mutation") + return v, errors.New("OldLatestDeployedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -7160,10 +7332,10 @@ func (m *RepoMutation) OwnerID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *RepoMutation) OldOwnerID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldOwnerID is only allowed on UpdateOne operations") + return v, errors.New("OldOwnerID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldOwnerID requires an ID field in the mutation") + return v, errors.New("OldOwnerID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -7970,7 +8142,7 @@ func withReviewID(id int) reviewOption { m.oldValue = func(ctx context.Context) (*Review, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().Review.Get(ctx, id) } @@ -8003,7 +8175,7 @@ func (m ReviewMutation) Client() *Client { // it returns an error otherwise. func (m ReviewMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -8019,6 +8191,25 @@ func (m *ReviewMutation) ID() (id int, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *ReviewMutation) IDs(ctx context.Context) ([]int, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().Review.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetStatus sets the "status" field. func (m *ReviewMutation) SetStatus(r review.Status) { m.status = &r @@ -8038,10 +8229,10 @@ func (m *ReviewMutation) Status() (r review.Status, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ReviewMutation) OldStatus(ctx context.Context) (v review.Status, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldStatus is only allowed on UpdateOne operations") + return v, errors.New("OldStatus is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldStatus requires an ID field in the mutation") + return v, errors.New("OldStatus requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8074,10 +8265,10 @@ func (m *ReviewMutation) Comment() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ReviewMutation) OldComment(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldComment is only allowed on UpdateOne operations") + return v, errors.New("OldComment is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldComment requires an ID field in the mutation") + return v, errors.New("OldComment requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8123,10 +8314,10 @@ func (m *ReviewMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ReviewMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8159,10 +8350,10 @@ func (m *ReviewMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ReviewMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8195,10 +8386,10 @@ func (m *ReviewMutation) UserID() (r int64, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ReviewMutation) OldUserID(ctx context.Context) (v int64, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUserID is only allowed on UpdateOne operations") + return v, errors.New("OldUserID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUserID requires an ID field in the mutation") + return v, errors.New("OldUserID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8231,10 +8422,10 @@ func (m *ReviewMutation) DeploymentID() (r int, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *ReviewMutation) OldDeploymentID(ctx context.Context) (v int, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldDeploymentID is only allowed on UpdateOne operations") + return v, errors.New("OldDeploymentID is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldDeploymentID requires an ID field in the mutation") + return v, errors.New("OldDeploymentID requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8755,7 +8946,7 @@ func withUserID(id int64) userOption { m.oldValue = func(ctx context.Context) (*User, error) { once.Do(func() { if m.done { - err = fmt.Errorf("querying old values post mutation is not allowed") + err = errors.New("querying old values post mutation is not allowed") } else { value, err = m.Client().User.Get(ctx, id) } @@ -8788,7 +8979,7 @@ func (m UserMutation) Client() *Client { // it returns an error otherwise. func (m UserMutation) Tx() (*Tx, error) { if _, ok := m.driver.(*txDriver); !ok { - return nil, fmt.Errorf("ent: mutation is not running in a transaction") + return nil, errors.New("ent: mutation is not running in a transaction") } tx := &Tx{config: m.config} tx.init() @@ -8810,6 +9001,25 @@ func (m *UserMutation) ID() (id int64, exists bool) { return *m.id, true } +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *UserMutation) IDs(ctx context.Context) ([]int64, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []int64{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().User.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + // SetLogin sets the "login" field. func (m *UserMutation) SetLogin(s string) { m.login = &s @@ -8829,10 +9039,10 @@ func (m *UserMutation) Login() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldLogin(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldLogin is only allowed on UpdateOne operations") + return v, errors.New("OldLogin is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldLogin requires an ID field in the mutation") + return v, errors.New("OldLogin requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8865,10 +9075,10 @@ func (m *UserMutation) Avatar() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldAvatar(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldAvatar is only allowed on UpdateOne operations") + return v, errors.New("OldAvatar is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldAvatar requires an ID field in the mutation") + return v, errors.New("OldAvatar requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8901,10 +9111,10 @@ func (m *UserMutation) Admin() (r bool, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldAdmin is only allowed on UpdateOne operations") + return v, errors.New("OldAdmin is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldAdmin requires an ID field in the mutation") + return v, errors.New("OldAdmin requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8937,10 +9147,10 @@ func (m *UserMutation) Token() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldToken(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldToken is only allowed on UpdateOne operations") + return v, errors.New("OldToken is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldToken requires an ID field in the mutation") + return v, errors.New("OldToken requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -8973,10 +9183,10 @@ func (m *UserMutation) Refresh() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldRefresh(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldRefresh is only allowed on UpdateOne operations") + return v, errors.New("OldRefresh is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldRefresh requires an ID field in the mutation") + return v, errors.New("OldRefresh requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -9009,10 +9219,10 @@ func (m *UserMutation) Expiry() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldExpiry(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldExpiry is only allowed on UpdateOne operations") + return v, errors.New("OldExpiry is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldExpiry requires an ID field in the mutation") + return v, errors.New("OldExpiry requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -9045,10 +9255,10 @@ func (m *UserMutation) Hash() (r string, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldHash(ctx context.Context) (v string, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldHash is only allowed on UpdateOne operations") + return v, errors.New("OldHash is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldHash requires an ID field in the mutation") + return v, errors.New("OldHash requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -9081,10 +9291,10 @@ func (m *UserMutation) CreatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldCreatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldCreatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldCreatedAt requires an ID field in the mutation") + return v, errors.New("OldCreatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { @@ -9117,10 +9327,10 @@ func (m *UserMutation) UpdatedAt() (r time.Time, exists bool) { // An error is returned if the mutation operation is not UpdateOne, or the database query fails. func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error) { if !m.op.Is(OpUpdateOne) { - return v, fmt.Errorf("OldUpdatedAt is only allowed on UpdateOne operations") + return v, errors.New("OldUpdatedAt is only allowed on UpdateOne operations") } if m.id == nil || m.oldValue == nil { - return v, fmt.Errorf("OldUpdatedAt requires an ID field in the mutation") + return v, errors.New("OldUpdatedAt requires an ID field in the mutation") } oldValue, err := m.oldValue(ctx) if err != nil { diff --git a/model/ent/notificationrecord_create.go b/model/ent/notificationrecord_create.go index 5474d29c..42321847 100644 --- a/model/ent/notificationrecord_create.go +++ b/model/ent/notificationrecord_create.go @@ -102,10 +102,10 @@ func (nrc *NotificationRecordCreate) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (nrc *NotificationRecordCreate) check() error { if _, ok := nrc.mutation.EventID(); !ok { - return &ValidationError{Name: "event_id", err: errors.New(`ent: missing required field "event_id"`)} + return &ValidationError{Name: "event_id", err: errors.New(`ent: missing required field "NotificationRecord.event_id"`)} } if _, ok := nrc.mutation.EventID(); !ok { - return &ValidationError{Name: "event", err: errors.New("ent: missing required edge \"event\"")} + return &ValidationError{Name: "event", err: errors.New(`ent: missing required edge "NotificationRecord.event"`)} } return nil } diff --git a/model/ent/notificationrecord_query.go b/model/ent/notificationrecord_query.go index 82159324..9a77ecb9 100644 --- a/model/ent/notificationrecord_query.go +++ b/model/ent/notificationrecord_query.go @@ -133,7 +133,7 @@ func (nrq *NotificationRecordQuery) FirstIDX(ctx context.Context) int { } // Only returns a single NotificationRecord entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one NotificationRecord entity is not found. +// Returns a *NotSingularError when more than one NotificationRecord entity is found. // Returns a *NotFoundError when no NotificationRecord entities are found. func (nrq *NotificationRecordQuery) Only(ctx context.Context) (*NotificationRecord, error) { nodes, err := nrq.Limit(2).All(ctx) @@ -160,7 +160,7 @@ func (nrq *NotificationRecordQuery) OnlyX(ctx context.Context) *NotificationReco } // OnlyID is like Only, but returns the only NotificationRecord ID in the query. -// Returns a *NotSingularError when exactly one NotificationRecord ID is not found. +// Returns a *NotSingularError when more than one NotificationRecord ID is found. // Returns a *NotFoundError when no entities are found. func (nrq *NotificationRecordQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -270,8 +270,9 @@ func (nrq *NotificationRecordQuery) Clone() *NotificationRecordQuery { predicates: append([]predicate.NotificationRecord{}, nrq.predicates...), withEvent: nrq.withEvent.Clone(), // clone intermediate query. - sql: nrq.sql.Clone(), - path: nrq.path, + sql: nrq.sql.Clone(), + path: nrq.path, + unique: nrq.unique, } } @@ -412,6 +413,10 @@ func (nrq *NotificationRecordQuery) sqlCount(ctx context.Context) (int, error) { if len(nrq.modifiers) > 0 { _spec.Modifiers = nrq.modifiers } + _spec.Node.Columns = nrq.fields + if len(nrq.fields) > 0 { + _spec.Unique = nrq.unique != nil && *nrq.unique + } return sqlgraph.CountNodes(ctx, nrq.driver, _spec) } @@ -483,6 +488,9 @@ func (nrq *NotificationRecordQuery) sqlQuery(ctx context.Context) *sql.Selector selector = nrq.sql selector.Select(selector.Columns(columns...)...) } + if nrq.unique != nil && *nrq.unique { + selector.Distinct() + } for _, m := range nrq.modifiers { m(selector) } @@ -790,9 +798,7 @@ func (nrgb *NotificationRecordGroupBy) sqlQuery() *sql.Selector { for _, f := range nrgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(nrgb.fields...)...) diff --git a/model/ent/notificationrecord_update.go b/model/ent/notificationrecord_update.go index 76039fc1..b4430a76 100644 --- a/model/ent/notificationrecord_update.go +++ b/model/ent/notificationrecord_update.go @@ -113,7 +113,7 @@ func (nru *NotificationRecordUpdate) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (nru *NotificationRecordUpdate) check() error { if _, ok := nru.mutation.EventID(); nru.mutation.EventCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"event\"") + return errors.New(`ent: clearing a required unique edge "NotificationRecord.event"`) } return nil } @@ -282,7 +282,7 @@ func (nruo *NotificationRecordUpdateOne) ExecX(ctx context.Context) { // check runs all checks and user-defined validators on the builder. func (nruo *NotificationRecordUpdateOne) check() error { if _, ok := nruo.mutation.EventID(); nruo.mutation.EventCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"event\"") + return errors.New(`ent: clearing a required unique edge "NotificationRecord.event"`) } return nil } @@ -300,7 +300,7 @@ func (nruo *NotificationRecordUpdateOne) sqlSave(ctx context.Context) (_node *No } id, ok := nruo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing NotificationRecord.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "NotificationRecord.id" for update`)} } _spec.Node.ID.Value = id if fields := nruo.fields; len(fields) > 0 { diff --git a/model/ent/perm_create.go b/model/ent/perm_create.go index 574b152a..32da57e0 100644 --- a/model/ent/perm_create.go +++ b/model/ent/perm_create.go @@ -188,30 +188,30 @@ func (pc *PermCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (pc *PermCreate) check() error { if _, ok := pc.mutation.RepoPerm(); !ok { - return &ValidationError{Name: "repo_perm", err: errors.New(`ent: missing required field "repo_perm"`)} + return &ValidationError{Name: "repo_perm", err: errors.New(`ent: missing required field "Perm.repo_perm"`)} } if v, ok := pc.mutation.RepoPerm(); ok { if err := perm.RepoPermValidator(v); err != nil { - return &ValidationError{Name: "repo_perm", err: fmt.Errorf(`ent: validator failed for field "repo_perm": %w`, err)} + return &ValidationError{Name: "repo_perm", err: fmt.Errorf(`ent: validator failed for field "Perm.repo_perm": %w`, err)} } } if _, ok := pc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Perm.created_at"`)} } if _, ok := pc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Perm.updated_at"`)} } if _, ok := pc.mutation.UserID(); !ok { - return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "user_id"`)} + return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "Perm.user_id"`)} } if _, ok := pc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "repo_id"`)} + return &ValidationError{Name: "repo_id", err: errors.New(`ent: missing required field "Perm.repo_id"`)} } if _, ok := pc.mutation.UserID(); !ok { - return &ValidationError{Name: "user", err: errors.New("ent: missing required edge \"user\"")} + return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "Perm.user"`)} } if _, ok := pc.mutation.RepoID(); !ok { - return &ValidationError{Name: "repo", err: errors.New("ent: missing required edge \"repo\"")} + return &ValidationError{Name: "repo", err: errors.New(`ent: missing required edge "Perm.repo"`)} } return nil } diff --git a/model/ent/perm_query.go b/model/ent/perm_query.go index b5cda54d..e0051661 100644 --- a/model/ent/perm_query.go +++ b/model/ent/perm_query.go @@ -157,7 +157,7 @@ func (pq *PermQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Perm entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Perm entity is not found. +// Returns a *NotSingularError when more than one Perm entity is found. // Returns a *NotFoundError when no Perm entities are found. func (pq *PermQuery) Only(ctx context.Context) (*Perm, error) { nodes, err := pq.Limit(2).All(ctx) @@ -184,7 +184,7 @@ func (pq *PermQuery) OnlyX(ctx context.Context) *Perm { } // OnlyID is like Only, but returns the only Perm ID in the query. -// Returns a *NotSingularError when exactly one Perm ID is not found. +// Returns a *NotSingularError when more than one Perm ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PermQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -295,8 +295,9 @@ func (pq *PermQuery) Clone() *PermQuery { withUser: pq.withUser.Clone(), withRepo: pq.withRepo.Clone(), // clone intermediate query. - sql: pq.sql.Clone(), - path: pq.path, + sql: pq.sql.Clone(), + path: pq.path, + unique: pq.unique, } } @@ -475,6 +476,10 @@ func (pq *PermQuery) sqlCount(ctx context.Context) (int, error) { if len(pq.modifiers) > 0 { _spec.Modifiers = pq.modifiers } + _spec.Node.Columns = pq.fields + if len(pq.fields) > 0 { + _spec.Unique = pq.unique != nil && *pq.unique + } return sqlgraph.CountNodes(ctx, pq.driver, _spec) } @@ -546,6 +551,9 @@ func (pq *PermQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = pq.sql selector.Select(selector.Columns(columns...)...) } + if pq.unique != nil && *pq.unique { + selector.Distinct() + } for _, m := range pq.modifiers { m(selector) } @@ -853,9 +861,7 @@ func (pgb *PermGroupBy) sqlQuery() *sql.Selector { for _, f := range pgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(pgb.fields...)...) diff --git a/model/ent/perm_update.go b/model/ent/perm_update.go index 9b49b538..f3f1678a 100644 --- a/model/ent/perm_update.go +++ b/model/ent/perm_update.go @@ -196,14 +196,14 @@ func (pu *PermUpdate) defaults() { func (pu *PermUpdate) check() error { if v, ok := pu.mutation.RepoPerm(); ok { if err := perm.RepoPermValidator(v); err != nil { - return &ValidationError{Name: "repo_perm", err: fmt.Errorf("ent: validator failed for field \"repo_perm\": %w", err)} + return &ValidationError{Name: "repo_perm", err: fmt.Errorf(`ent: validator failed for field "Perm.repo_perm": %w`, err)} } } if _, ok := pu.mutation.UserID(); pu.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Perm.user"`) } if _, ok := pu.mutation.RepoID(); pu.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "Perm.repo"`) } return nil } @@ -522,14 +522,14 @@ func (puo *PermUpdateOne) defaults() { func (puo *PermUpdateOne) check() error { if v, ok := puo.mutation.RepoPerm(); ok { if err := perm.RepoPermValidator(v); err != nil { - return &ValidationError{Name: "repo_perm", err: fmt.Errorf("ent: validator failed for field \"repo_perm\": %w", err)} + return &ValidationError{Name: "repo_perm", err: fmt.Errorf(`ent: validator failed for field "Perm.repo_perm": %w`, err)} } } if _, ok := puo.mutation.UserID(); puo.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Perm.user"`) } if _, ok := puo.mutation.RepoID(); puo.mutation.RepoCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"repo\"") + return errors.New(`ent: clearing a required unique edge "Perm.repo"`) } return nil } @@ -547,7 +547,7 @@ func (puo *PermUpdateOne) sqlSave(ctx context.Context) (_node *Perm, err error) } id, ok := puo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing Perm.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Perm.id" for update`)} } _spec.Node.ID.Value = id if fields := puo.fields; len(fields) > 0 { diff --git a/model/ent/repo_create.go b/model/ent/repo_create.go index 21107a8a..14fa6fd4 100644 --- a/model/ent/repo_create.go +++ b/model/ent/repo_create.go @@ -308,25 +308,25 @@ func (rc *RepoCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (rc *RepoCreate) check() error { if _, ok := rc.mutation.Namespace(); !ok { - return &ValidationError{Name: "namespace", err: errors.New(`ent: missing required field "namespace"`)} + return &ValidationError{Name: "namespace", err: errors.New(`ent: missing required field "Repo.namespace"`)} } if _, ok := rc.mutation.Name(); !ok { - return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "name"`)} + return &ValidationError{Name: "name", err: errors.New(`ent: missing required field "Repo.name"`)} } if _, ok := rc.mutation.Description(); !ok { - return &ValidationError{Name: "description", err: errors.New(`ent: missing required field "description"`)} + return &ValidationError{Name: "description", err: errors.New(`ent: missing required field "Repo.description"`)} } if _, ok := rc.mutation.ConfigPath(); !ok { - return &ValidationError{Name: "config_path", err: errors.New(`ent: missing required field "config_path"`)} + return &ValidationError{Name: "config_path", err: errors.New(`ent: missing required field "Repo.config_path"`)} } if _, ok := rc.mutation.Active(); !ok { - return &ValidationError{Name: "active", err: errors.New(`ent: missing required field "active"`)} + return &ValidationError{Name: "active", err: errors.New(`ent: missing required field "Repo.active"`)} } if _, ok := rc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Repo.created_at"`)} } if _, ok := rc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Repo.updated_at"`)} } return nil } diff --git a/model/ent/repo_query.go b/model/ent/repo_query.go index 07266095..d6c8df84 100644 --- a/model/ent/repo_query.go +++ b/model/ent/repo_query.go @@ -230,7 +230,7 @@ func (rq *RepoQuery) FirstIDX(ctx context.Context) int64 { } // Only returns a single Repo entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Repo entity is not found. +// Returns a *NotSingularError when more than one Repo entity is found. // Returns a *NotFoundError when no Repo entities are found. func (rq *RepoQuery) Only(ctx context.Context) (*Repo, error) { nodes, err := rq.Limit(2).All(ctx) @@ -257,7 +257,7 @@ func (rq *RepoQuery) OnlyX(ctx context.Context) *Repo { } // OnlyID is like Only, but returns the only Repo ID in the query. -// Returns a *NotSingularError when exactly one Repo ID is not found. +// Returns a *NotSingularError when more than one Repo ID is found. // Returns a *NotFoundError when no entities are found. func (rq *RepoQuery) OnlyID(ctx context.Context) (id int64, err error) { var ids []int64 @@ -371,8 +371,9 @@ func (rq *RepoQuery) Clone() *RepoQuery { withDeploymentStatistics: rq.withDeploymentStatistics.Clone(), withOwner: rq.withOwner.Clone(), // clone intermediate query. - sql: rq.sql.Clone(), - path: rq.path, + sql: rq.sql.Clone(), + path: rq.path, + unique: rq.unique, } } @@ -661,6 +662,10 @@ func (rq *RepoQuery) sqlCount(ctx context.Context) (int, error) { if len(rq.modifiers) > 0 { _spec.Modifiers = rq.modifiers } + _spec.Node.Columns = rq.fields + if len(rq.fields) > 0 { + _spec.Unique = rq.unique != nil && *rq.unique + } return sqlgraph.CountNodes(ctx, rq.driver, _spec) } @@ -732,6 +737,9 @@ func (rq *RepoQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = rq.sql selector.Select(selector.Columns(columns...)...) } + if rq.unique != nil && *rq.unique { + selector.Distinct() + } for _, m := range rq.modifiers { m(selector) } @@ -1039,9 +1047,7 @@ func (rgb *RepoGroupBy) sqlQuery() *sql.Selector { for _, f := range rgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(rgb.fields...)...) diff --git a/model/ent/repo_update.go b/model/ent/repo_update.go index fcb4fe10..0b516239 100644 --- a/model/ent/repo_update.go +++ b/model/ent/repo_update.go @@ -4,6 +4,7 @@ package ent import ( "context" + "errors" "fmt" "time" @@ -1134,7 +1135,7 @@ func (ruo *RepoUpdateOne) sqlSave(ctx context.Context) (_node *Repo, err error) } id, ok := ruo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing Repo.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Repo.id" for update`)} } _spec.Node.ID.Value = id if fields := ruo.fields; len(fields) > 0 { diff --git a/model/ent/review_create.go b/model/ent/review_create.go index 67c65b3c..0ab217ea 100644 --- a/model/ent/review_create.go +++ b/model/ent/review_create.go @@ -204,30 +204,30 @@ func (rc *ReviewCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (rc *ReviewCreate) check() error { if _, ok := rc.mutation.Status(); !ok { - return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "status"`)} + return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "Review.status"`)} } if v, ok := rc.mutation.Status(); ok { if err := review.StatusValidator(v); err != nil { - return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "status": %w`, err)} + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Review.status": %w`, err)} } } if _, ok := rc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "Review.created_at"`)} } if _, ok := rc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "Review.updated_at"`)} } if _, ok := rc.mutation.UserID(); !ok { - return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "user_id"`)} + return &ValidationError{Name: "user_id", err: errors.New(`ent: missing required field "Review.user_id"`)} } if _, ok := rc.mutation.DeploymentID(); !ok { - return &ValidationError{Name: "deployment_id", err: errors.New(`ent: missing required field "deployment_id"`)} + return &ValidationError{Name: "deployment_id", err: errors.New(`ent: missing required field "Review.deployment_id"`)} } if _, ok := rc.mutation.UserID(); !ok { - return &ValidationError{Name: "user", err: errors.New("ent: missing required edge \"user\"")} + return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "Review.user"`)} } if _, ok := rc.mutation.DeploymentID(); !ok { - return &ValidationError{Name: "deployment", err: errors.New("ent: missing required edge \"deployment\"")} + return &ValidationError{Name: "deployment", err: errors.New(`ent: missing required edge "Review.deployment"`)} } return nil } diff --git a/model/ent/review_query.go b/model/ent/review_query.go index 92e27665..9a7ac006 100644 --- a/model/ent/review_query.go +++ b/model/ent/review_query.go @@ -182,7 +182,7 @@ func (rq *ReviewQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Review entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Review entity is not found. +// Returns a *NotSingularError when more than one Review entity is found. // Returns a *NotFoundError when no Review entities are found. func (rq *ReviewQuery) Only(ctx context.Context) (*Review, error) { nodes, err := rq.Limit(2).All(ctx) @@ -209,7 +209,7 @@ func (rq *ReviewQuery) OnlyX(ctx context.Context) *Review { } // OnlyID is like Only, but returns the only Review ID in the query. -// Returns a *NotSingularError when exactly one Review ID is not found. +// Returns a *NotSingularError when more than one Review ID is found. // Returns a *NotFoundError when no entities are found. func (rq *ReviewQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int @@ -321,8 +321,9 @@ func (rq *ReviewQuery) Clone() *ReviewQuery { withDeployment: rq.withDeployment.Clone(), withEvent: rq.withEvent.Clone(), // clone intermediate query. - sql: rq.sql.Clone(), - path: rq.path, + sql: rq.sql.Clone(), + path: rq.path, + unique: rq.unique, } } @@ -538,6 +539,10 @@ func (rq *ReviewQuery) sqlCount(ctx context.Context) (int, error) { if len(rq.modifiers) > 0 { _spec.Modifiers = rq.modifiers } + _spec.Node.Columns = rq.fields + if len(rq.fields) > 0 { + _spec.Unique = rq.unique != nil && *rq.unique + } return sqlgraph.CountNodes(ctx, rq.driver, _spec) } @@ -609,6 +614,9 @@ func (rq *ReviewQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = rq.sql selector.Select(selector.Columns(columns...)...) } + if rq.unique != nil && *rq.unique { + selector.Distinct() + } for _, m := range rq.modifiers { m(selector) } @@ -916,9 +924,7 @@ func (rgb *ReviewGroupBy) sqlQuery() *sql.Selector { for _, f := range rgb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(rgb.fields...)...) diff --git a/model/ent/review_update.go b/model/ent/review_update.go index e892f148..74805bbc 100644 --- a/model/ent/review_update.go +++ b/model/ent/review_update.go @@ -233,14 +233,14 @@ func (ru *ReviewUpdate) defaults() { func (ru *ReviewUpdate) check() error { if v, ok := ru.mutation.Status(); ok { if err := review.StatusValidator(v); err != nil { - return &ValidationError{Name: "status", err: fmt.Errorf("ent: validator failed for field \"status\": %w", err)} + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Review.status": %w`, err)} } } if _, ok := ru.mutation.UserID(); ru.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Review.user"`) } if _, ok := ru.mutation.DeploymentID(); ru.mutation.DeploymentCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"deployment\"") + return errors.New(`ent: clearing a required unique edge "Review.deployment"`) } return nil } @@ -649,14 +649,14 @@ func (ruo *ReviewUpdateOne) defaults() { func (ruo *ReviewUpdateOne) check() error { if v, ok := ruo.mutation.Status(); ok { if err := review.StatusValidator(v); err != nil { - return &ValidationError{Name: "status", err: fmt.Errorf("ent: validator failed for field \"status\": %w", err)} + return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Review.status": %w`, err)} } } if _, ok := ruo.mutation.UserID(); ruo.mutation.UserCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"user\"") + return errors.New(`ent: clearing a required unique edge "Review.user"`) } if _, ok := ruo.mutation.DeploymentID(); ruo.mutation.DeploymentCleared() && !ok { - return errors.New("ent: clearing a required unique edge \"deployment\"") + return errors.New(`ent: clearing a required unique edge "Review.deployment"`) } return nil } @@ -674,7 +674,7 @@ func (ruo *ReviewUpdateOne) sqlSave(ctx context.Context) (_node *Review, err err } id, ok := ruo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing Review.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "Review.id" for update`)} } _spec.Node.ID.Value = id if fields := ruo.fields; len(fields) > 0 { diff --git a/model/ent/runtime/runtime.go b/model/ent/runtime/runtime.go index 500b6f76..cd5c0a8e 100644 --- a/model/ent/runtime/runtime.go +++ b/model/ent/runtime/runtime.go @@ -5,5 +5,6 @@ package runtime // The schema-stitching logic is generated in github.com/gitploy-io/gitploy/model/ent/runtime.go const ( - Version = "(devel)" // Version of ent codegen. + Version = "v0.10.1" // Version of ent codegen. + Sum = "h1:dM5h4Zk6yHGIgw4dCqVzGw3nWgpGYJiV4/kyHEF6PFo=" // Sum of ent codegen. ) diff --git a/model/ent/tx.go b/model/ent/tx.go index 0eb8607e..93785f97 100644 --- a/model/ent/tx.go +++ b/model/ent/tx.go @@ -50,7 +50,7 @@ type Tx struct { } type ( - // Committer is the interface that wraps the Committer method. + // Committer is the interface that wraps the Commit method. Committer interface { Commit(context.Context, *Tx) error } @@ -64,7 +64,7 @@ type ( // and returns a Committer. For example: // // hook := func(next ent.Committer) ent.Committer { - // return ent.CommitFunc(func(context.Context, tx *ent.Tx) error { + // return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // // Do some stuff before. // if err := next.Commit(ctx, tx); err != nil { // return err @@ -105,7 +105,7 @@ func (tx *Tx) OnCommit(f CommitHook) { } type ( - // Rollbacker is the interface that wraps the Rollbacker method. + // Rollbacker is the interface that wraps the Rollback method. Rollbacker interface { Rollback(context.Context, *Tx) error } @@ -119,7 +119,7 @@ type ( // and returns a Rollbacker. For example: // // hook := func(next ent.Rollbacker) ent.Rollbacker { - // return ent.RollbackFunc(func(context.Context, tx *ent.Tx) error { + // return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // // Do some stuff before. // if err := next.Rollback(ctx, tx); err != nil { // return err diff --git a/model/ent/user_create.go b/model/ent/user_create.go index 7e279deb..d18c5a76 100644 --- a/model/ent/user_create.go +++ b/model/ent/user_create.go @@ -304,31 +304,31 @@ func (uc *UserCreate) defaults() { // check runs all checks and user-defined validators on the builder. func (uc *UserCreate) check() error { if _, ok := uc.mutation.Login(); !ok { - return &ValidationError{Name: "login", err: errors.New(`ent: missing required field "login"`)} + return &ValidationError{Name: "login", err: errors.New(`ent: missing required field "User.login"`)} } if _, ok := uc.mutation.Avatar(); !ok { - return &ValidationError{Name: "avatar", err: errors.New(`ent: missing required field "avatar"`)} + return &ValidationError{Name: "avatar", err: errors.New(`ent: missing required field "User.avatar"`)} } if _, ok := uc.mutation.Admin(); !ok { - return &ValidationError{Name: "admin", err: errors.New(`ent: missing required field "admin"`)} + return &ValidationError{Name: "admin", err: errors.New(`ent: missing required field "User.admin"`)} } if _, ok := uc.mutation.Token(); !ok { - return &ValidationError{Name: "token", err: errors.New(`ent: missing required field "token"`)} + return &ValidationError{Name: "token", err: errors.New(`ent: missing required field "User.token"`)} } if _, ok := uc.mutation.Refresh(); !ok { - return &ValidationError{Name: "refresh", err: errors.New(`ent: missing required field "refresh"`)} + return &ValidationError{Name: "refresh", err: errors.New(`ent: missing required field "User.refresh"`)} } if _, ok := uc.mutation.Expiry(); !ok { - return &ValidationError{Name: "expiry", err: errors.New(`ent: missing required field "expiry"`)} + return &ValidationError{Name: "expiry", err: errors.New(`ent: missing required field "User.expiry"`)} } if _, ok := uc.mutation.Hash(); !ok { - return &ValidationError{Name: "hash", err: errors.New(`ent: missing required field "hash"`)} + return &ValidationError{Name: "hash", err: errors.New(`ent: missing required field "User.hash"`)} } if _, ok := uc.mutation.CreatedAt(); !ok { - return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "created_at"`)} + return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "User.created_at"`)} } if _, ok := uc.mutation.UpdatedAt(); !ok { - return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "updated_at"`)} + return &ValidationError{Name: "updated_at", err: errors.New(`ent: missing required field "User.updated_at"`)} } return nil } diff --git a/model/ent/user_query.go b/model/ent/user_query.go index ffad6cdf..32883f68 100644 --- a/model/ent/user_query.go +++ b/model/ent/user_query.go @@ -254,7 +254,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int64 { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -281,7 +281,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int64, err error) { var ids []int64 @@ -396,8 +396,9 @@ func (uq *UserQuery) Clone() *UserQuery { withLocks: uq.withLocks.Clone(), withRepos: uq.withRepos.Clone(), // clone intermediate query. - sql: uq.sql.Clone(), - path: uq.path, + sql: uq.sql.Clone(), + path: uq.path, + unique: uq.unique, } } @@ -721,6 +722,10 @@ func (uq *UserQuery) sqlCount(ctx context.Context) (int, error) { if len(uq.modifiers) > 0 { _spec.Modifiers = uq.modifiers } + _spec.Node.Columns = uq.fields + if len(uq.fields) > 0 { + _spec.Unique = uq.unique != nil && *uq.unique + } return sqlgraph.CountNodes(ctx, uq.driver, _spec) } @@ -792,6 +797,9 @@ func (uq *UserQuery) sqlQuery(ctx context.Context) *sql.Selector { selector = uq.sql selector.Select(selector.Columns(columns...)...) } + if uq.unique != nil && *uq.unique { + selector.Distinct() + } for _, m := range uq.modifiers { m(selector) } @@ -1099,9 +1107,7 @@ func (ugb *UserGroupBy) sqlQuery() *sql.Selector { for _, f := range ugb.fields { columns = append(columns, selector.C(f)) } - for _, c := range aggregation { - columns = append(columns, c) - } + columns = append(columns, aggregation...) selector.Select(columns...) } return selector.GroupBy(selector.Columns(ugb.fields...)...) diff --git a/model/ent/user_update.go b/model/ent/user_update.go index cb1e70bd..754cdcb9 100644 --- a/model/ent/user_update.go +++ b/model/ent/user_update.go @@ -4,6 +4,7 @@ package ent import ( "context" + "errors" "fmt" "time" @@ -1125,7 +1126,7 @@ func (uuo *UserUpdateOne) sqlSave(ctx context.Context) (_node *User, err error) } id, ok := uuo.mutation.ID() if !ok { - return nil, &ValidationError{Name: "ID", err: fmt.Errorf("missing User.ID for update")} + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "User.id" for update`)} } _spec.Node.ID.Value = id if fields := uuo.fields; len(fields) > 0 {