From 796d53656f88f81d2b5177c99a5002bf2b56fa21 Mon Sep 17 00:00:00 2001 From: Ryan Su Date: Tue, 2 May 2023 12:45:03 +0800 Subject: [PATCH] chore: update dependencies and version --- api/core.go | 2 +- api/etc/core.yaml | 1 + core.yml | 2 +- go.mod | 44 +++++------ go.sum | 114 +++++++++++++---------------- rpc/ent/api_create.go | 2 +- rpc/ent/api_delete.go | 2 +- rpc/ent/api_update.go | 4 +- rpc/ent/department_create.go | 2 +- rpc/ent/department_delete.go | 2 +- rpc/ent/department_query.go | 10 ++- rpc/ent/department_update.go | 4 +- rpc/ent/dictionary_create.go | 2 +- rpc/ent/dictionary_delete.go | 2 +- rpc/ent/dictionary_query.go | 5 +- rpc/ent/dictionary_update.go | 4 +- rpc/ent/dictionarydetail_create.go | 2 +- rpc/ent/dictionarydetail_delete.go | 2 +- rpc/ent/dictionarydetail_update.go | 4 +- rpc/ent/menu_create.go | 2 +- rpc/ent/menu_delete.go | 2 +- rpc/ent/menu_query.go | 5 +- rpc/ent/menu_update.go | 4 +- rpc/ent/oauthprovider_create.go | 2 +- rpc/ent/oauthprovider_delete.go | 2 +- rpc/ent/oauthprovider_update.go | 4 +- rpc/ent/position_create.go | 2 +- rpc/ent/position_delete.go | 2 +- rpc/ent/position_update.go | 4 +- rpc/ent/role_create.go | 2 +- rpc/ent/role_delete.go | 2 +- rpc/ent/role_update.go | 4 +- rpc/ent/runtime/runtime.go | 4 +- rpc/ent/token_create.go | 2 +- rpc/ent/token_delete.go | 2 +- rpc/ent/token_update.go | 4 +- rpc/ent/user_create.go | 2 +- rpc/ent/user_delete.go | 2 +- rpc/ent/user_update.go | 4 +- 39 files changed, 132 insertions(+), 135 deletions(-) diff --git a/api/core.go b/api/core.go index a43c7dd0..28cbbbe0 100644 --- a/api/core.go +++ b/api/core.go @@ -5,7 +5,7 @@ // Schemes: http, https // Host: localhost:9100 // BasePath: / -// Version: 1.0.2 +// Version: 1.0.3 // Contact: yuansu.china.work@gmail.com // SecurityDefinitions: // Token: diff --git a/api/etc/core.yaml b/api/etc/core.yaml index 11391e12..edf9b031 100644 --- a/api/etc/core.yaml +++ b/api/etc/core.yaml @@ -32,6 +32,7 @@ Captcha: KeyLong: 5 ImgWidth: 240 ImgHeight: 80 + Driver: digit DatabaseConf: Type: mysql diff --git a/core.yml b/core.yml index 0545c6e6..00891198 100644 --- a/core.yml +++ b/core.yml @@ -2505,7 +2505,7 @@ info: email: yuansu.china.work@gmail.com description: This is simple admin api doc title: Simple Admin - version: 1.0.2 + version: 1.0.3 paths: /api: post: diff --git a/go.mod b/go.mod index 76215a5b..c5ad98af 100644 --- a/go.mod +++ b/go.mod @@ -3,24 +3,24 @@ module github.com/suyuan32/simple-admin-core go 1.20 require ( - entgo.io/ent v0.12.2 + entgo.io/ent v0.12.3 github.com/casbin/casbin/v2 v2.68.0 github.com/gofrs/uuid/v5 v5.0.0 - github.com/hibiken/asynq v0.24.0 + github.com/hibiken/asynq v0.24.1 github.com/mojocn/base64Captcha v1.3.5 - github.com/suyuan32/simple-admin-common v1.0.2 - github.com/suyuan32/simple-admin-job v1.0.2 - github.com/zeromicro/go-zero v1.5.1 + github.com/suyuan32/simple-admin-common v1.0.3 + github.com/suyuan32/simple-admin-job v1.0.3 + github.com/zeromicro/go-zero v1.5.2 golang.org/x/oauth2 v0.6.0 google.golang.org/grpc v1.54.0 google.golang.org/protobuf v1.30.0 ) -replace github.com/zeromicro/go-zero v1.5.1 => github.com/suyuan32/simple-admin-tools v1.5.3 +replace github.com/zeromicro/go-zero v1.5.2 => github.com/suyuan32/simple-admin-tools v1.5.4 require ( - ariga.io/atlas v0.10.0 // indirect - ariga.io/entcache v0.1.1-0.20220825100256-1b8bbeb21c75 // indirect + ariga.io/atlas v0.10.2-0.20230427182402-87a07dfb83bf // indirect + ariga.io/entcache v0.1.1-0.20230414114609-164fed2e1c70 // indirect github.com/BurntSushi/toml v1.1.0 // indirect github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect github.com/agext/levenshtein v1.2.3 // indirect @@ -28,7 +28,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/casbin/ent-adapter v0.3.0 // indirect github.com/casbin/redis-watcher/v2 v2.5.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect @@ -47,7 +47,7 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.12.0 // indirect github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-sql-driver/mysql v1.7.0 // indirect + github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect @@ -72,7 +72,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/leodido/go-urn v1.2.2 // indirect - github.com/lib/pq v1.10.8 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect @@ -99,15 +99,15 @@ require ( go.etcd.io/etcd/api/v3 v3.5.8 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.8 // indirect go.etcd.io/etcd/client/v3 v3.5.8 // indirect - go.opentelemetry.io/otel v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.14.0 // indirect - go.opentelemetry.io/otel/sdk v1.14.0 // indirect - go.opentelemetry.io/otel/trace v1.14.0 // indirect + go.opentelemetry.io/otel v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/jaeger v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/zipkin v1.15.0 // indirect + go.opentelemetry.io/otel/sdk v1.15.0 // indirect + go.opentelemetry.io/otel/trace v1.15.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/automaxprocs v1.5.2 // indirect @@ -115,7 +115,7 @@ require ( go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.8.0 // indirect golang.org/x/image v0.6.0 // indirect - golang.org/x/mod v0.9.0 // indirect + golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.9.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/term v0.7.0 // indirect @@ -127,7 +127,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.26.3 // indirect - k8s.io/apimachinery v0.27.0-alpha.3 // indirect + k8s.io/apimachinery v0.28.0-alpha.0 // indirect k8s.io/client-go v0.26.3 // indirect k8s.io/klog/v2 v2.90.1 // indirect k8s.io/kube-openapi v0.0.0-20230327201221-f5883ff37f0c // indirect diff --git a/go.sum b/go.sum index 2d47e2d4..b77dd9de 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ -ariga.io/atlas v0.10.0 h1:B1aCP6gSDQET6j8ybn7m6MArjQuoLH5d4DQBT+NP5k8= -ariga.io/atlas v0.10.0/go.mod h1:+TR129FJZ5Lvzms6dvCeGWh1yR6hMvmXBhug4hrNIGk= -ariga.io/entcache v0.1.1-0.20220825100256-1b8bbeb21c75 h1:zl7g5wEJyZI7UTLWyj8ZrH3GlGpXoVFHOd2t/glAE+w= -ariga.io/entcache v0.1.1-0.20220825100256-1b8bbeb21c75/go.mod h1:MjalxvL0davaFD+o9j5fTFx091xnQTkslb9N0lYfHcw= +ariga.io/atlas v0.10.2-0.20230427182402-87a07dfb83bf h1:Tq2DRB39ZHScIwWACjPKLv5oEErv7zv6PBb5RTz5CKA= +ariga.io/atlas v0.10.2-0.20230427182402-87a07dfb83bf/go.mod h1:+TR129FJZ5Lvzms6dvCeGWh1yR6hMvmXBhug4hrNIGk= +ariga.io/entcache v0.1.1-0.20230414114609-164fed2e1c70 h1:JD5skl+XOOSLdXnzaJP/T3NK2Oc6qmRq0GCI4kW9C7k= +ariga.io/entcache v0.1.1-0.20230414114609-164fed2e1c70/go.mod h1:MjalxvL0davaFD+o9j5fTFx091xnQTkslb9N0lYfHcw= 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= @@ -37,8 +37,8 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX 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.8.0/go.mod h1:KNjsukat/NJi6zJh1utwRadsbGOZsBbAZNDxkW7tMCc= -entgo.io/ent v0.12.2 h1:Ndl/JvCX76xCtUDlrUfMnOKBRodAtxE5yfGYxjbOxmM= -entgo.io/ent v0.12.2/go.mod h1:OA1Y5bNE8EtlxKv4IyzWwt4jgvGbkoKMcwp668iEKQE= +entgo.io/ent v0.12.3 h1:N5lO2EOrHpCH5HYfiMOCHYbo+oh5M8GjT0/cx5x6xkk= +entgo.io/ent v0.12.3/go.mod h1:AigGGx+tbrBBYHAzGOg8ND661E5cxx1Uiu5o/otJ6Yg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.0.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I= @@ -71,7 +71,9 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r 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/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao= +github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w= github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y= +github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/casbin/casbin/v2 v2.29.2/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/casbin/casbin/v2 v2.68.0 h1:7L4kwNJJw/pzdSEhl4SkeHz+1JzYn8guO+Q422sxzLM= @@ -80,8 +82,8 @@ github.com/casbin/ent-adapter v0.3.0 h1:4lkhB/BwXAhj84iSrZG/gQ4avkO4uPwz4kdDP1VE github.com/casbin/ent-adapter v0.3.0/go.mod h1:U6saAFuVDEOWLCtrgx35d95M12FC0uh5GtJL82QunRM= github.com/casbin/redis-watcher/v2 v2.5.0 h1:a0922GOKYDSSiD7hEQxmLh/psea2eLZtf1V12XzLI5w= github.com/casbin/redis-watcher/v2 v2.5.0/go.mod h1:lgtjnQrfbo+xZIwMPtLu9is/XpnCfAT94SLgMzY7HGk= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -139,7 +141,6 @@ github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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= @@ -171,14 +172,14 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.12.0 h1:E4gtWgxWxp8YSxExrQFv5BpCahla0PVF2oTTEYaWQGI= github.com/go-playground/validator/v10 v10.12.0/go.mod h1:hCAPuzYvKdP33pxWa+2+6AIKXEKqjIUyqsNCtbsSJrA= -github.com/go-redis/redis/v8 v8.11.2/go.mod h1:DLomh7y2e3ggQXQLd1YgmvIfecPJoFl7WU5SOQ/r06M= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-redis/redismock/v8 v8.0.6 h1:rtuijPgGynsRB2Y7KDACm09WvjHWS4RaG44Nm7rcj4Y= github.com/go-sql-driver/mysql v1.5.1-0.20200311113236-681ffa848bae/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= -github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= 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= @@ -299,9 +300,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO 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/hibiken/asynq v0.24.0 h1:r1CiSVYCy1vGq9REKGI/wdB2D5n/QmtzihYHHXOuBUs= -github.com/hibiken/asynq v0.24.0/go.mod h1:FVnRfUTm6gcoDkM/EjF4OIh5/06ergCPUO6pS2B2y+w= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hibiken/asynq v0.24.1 h1:+5iIEAyA9K/lcSPvx3qoPtsKJeKI5u9aOIvUmSsazEw= +github.com/hibiken/asynq v0.24.1/go.mod h1:u5qVeSbrnfT+vtG5Mq8ZPzQu/BmCKMHvTGb91uy9Tts= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= @@ -389,8 +389,8 @@ 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.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.8 h1:3fdt97i/cwSU83+E0hZTC/Xpc9mTZxc6UWSCRcSbxiE= -github.com/lib/pq v1.10.8/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= @@ -441,19 +441,12 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nicksnyder/go-i18n/v2 v2.2.1 h1:aOzRCdwsJuoExfZhoiXHy4bjruwCMdt5otbYojM/PaA= github.com/nicksnyder/go-i18n/v2 v2.2.1/go.mod h1:fF2++lPHlo+/kPaj3nB0uxtPwzlPm+BlgwGX7MkeGj0= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= 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/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.7.0 h1:/XxtEV3I3Eif/HobnVx9YmJgk8ENdRsuUmM+fLCFNow= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= -github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/openzipkin/zipkin-go v0.4.1 h1:kNd/ST2yLLWhaWrkgchya40TJabe8Hioj9udfPcEO5A= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -546,12 +539,12 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/suyuan32/simple-admin-common v1.0.2 h1:PET7+EQFY7pLi1z1J5nfy5X/iJCpvIrlM4RVluH5I8Y= -github.com/suyuan32/simple-admin-common v1.0.2/go.mod h1:LuG6NZI6qBUVGhHra5nigTI2djg/h+F+Zfhxz2/9jk4= -github.com/suyuan32/simple-admin-job v1.0.2 h1:jdh7dUEwwYKdhvJcvHZL26dgk1w6DVFhwEGlSRwroYk= -github.com/suyuan32/simple-admin-job v1.0.2/go.mod h1:rGCf0j5It19Sbnp4mpLKzzYuFuJCqluqIoCeV6N91DA= -github.com/suyuan32/simple-admin-tools v1.5.3 h1:+2L21dOERIWJ32e5rg7HXIMQHw2nE2GEE9SBlfRX8fo= -github.com/suyuan32/simple-admin-tools v1.5.3/go.mod h1:tp1ckkABgFmo0DG+nmGL7SFiwEe2T0LyJ8U2J79v+rU= +github.com/suyuan32/simple-admin-common v1.0.3 h1:iu+KNlpEjGWau1V/0GFaJyfWFTAHnw5PtIE+WTmIEBs= +github.com/suyuan32/simple-admin-common v1.0.3/go.mod h1:UQU9/gV7TTb+BH/giV+YiCRhxdQW4xI1Uv+lf6End7s= +github.com/suyuan32/simple-admin-job v1.0.3 h1:Ozcn3GyR1cIrAOGrrlgWLn0L9nNCzkaWTXcX6DyK6zY= +github.com/suyuan32/simple-admin-job v1.0.3/go.mod h1:LOuteuQKegcuNZHUO2rO9WGdjOC+p00AC2Z3vxJR11w= +github.com/suyuan32/simple-admin-tools v1.5.4 h1:fkslPoMLV42r3CAxS9yhxAvJVlo1mzK4duL8CaxslNw= +github.com/suyuan32/simple-admin-tools v1.5.4/go.mod h1:4mYut+77p5FO2H85KNn6XQaQw6Citnu5/FiUqJ8Ekns= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= @@ -580,24 +573,24 @@ 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.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/exporters/jaeger v1.14.0 h1:CjbUNd4iN2hHmWekmOqZ+zSCU+dzZppG8XsV+A3oc8Q= -go.opentelemetry.io/otel/exporters/jaeger v1.14.0/go.mod h1:4Ay9kk5vELRrbg5z4cpP9EtmQRFap2Wb0woPG4lujZA= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 h1:/fXHZHGvro6MVqV34fJzDhi7sHGpX3Ej/Qjmfn003ho= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0/go.mod h1:UFG7EBMRdXyFstOwH028U0sVf+AvukSGhF0g8+dmNG8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 h1:TKf2uAs2ueguzLaxOCBXNpHxfO/aC7PAdDsSH0IbeRQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0/go.mod h1:HrbCVv40OOLTABmOn1ZWty6CHXkU8DK/Urc43tHug70= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 h1:3jAYbRHQAqzLjd9I4tzxwJ8Pk/N6AqBcF6m1ZHrxG94= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0/go.mod h1:+N7zNjIJv4K+DeX67XXET0P+eIciESgaFDBqh+ZJFS4= -go.opentelemetry.io/otel/exporters/zipkin v1.14.0 h1:reEVE1upBF9tcujgvSqLJS0SrI7JQPaTKP4s4rymnSs= -go.opentelemetry.io/otel/exporters/zipkin v1.14.0/go.mod h1:RcjvOAcvhzcufQP8aHmzRw1gE9g/VEZufDdo2w+s4sk= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= +go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk= +go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek= +go.opentelemetry.io/otel/exporters/jaeger v1.15.0 h1:LUWu1vHy3KGxjSb9RijEsJ1UREjpDX43RVYnoDKoyq8= +go.opentelemetry.io/otel/exporters/jaeger v1.15.0/go.mod h1:PxigiLay9m921aZ1gQ3fDAE1oaxMSbOok/lZrpPndIg= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.0 h1:ZSdnH1x5Gm/eUFNQquwSt4/LMCOqS6KPlI9qaTKx5Ho= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.0/go.mod h1:uOTV75+LOzV+ODmL8ahRLWkFA3eQcSC2aAsbxIu4duk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.0 h1:rk5I7PaOk5NGQHfHR2Rz6MgdA8AYQSHwsigFsOxEC1c= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.0/go.mod h1:pvkFJxNUXyJ5i8u6m8NIcqkoOf/65VM2mSyBbBJfeVQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.0 h1:rHD0vfQbtki6/FnsMzTpAOgdv+Ku+T6R47MZXmgelf8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.0/go.mod h1:RPagkaZrpwD+rSwQjzos6rBLsHOvenOqufCj4/7I46E= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.0 h1:MOeyNzoSvrn4/08FtGint7wwodzSXdXefoi6bPsBhVM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.0/go.mod h1:3YofWWr7LMDyBtpDC0RYvRmjcUwk99YOZl3TmwFsp8w= +go.opentelemetry.io/otel/exporters/zipkin v1.15.0 h1:PBWPRtWTCsGWhrkZ/SMLIPuA0S35KxyRg8HkW1Ygdzo= +go.opentelemetry.io/otel/exporters/zipkin v1.15.0/go.mod h1:S4F8L8oqVdegb7BO8fl9F658VnZZI980KFZWZmUhL28= +go.opentelemetry.io/otel/sdk v1.15.0 h1:jZTCkRRd08nxD6w7rIaZeDNGZGGQstH3SfLQ3ZsKICk= +go.opentelemetry.io/otel/sdk v1.15.0/go.mod h1:XDEMrYWzJ4YlC17i6Luih2lwDw2j6G0PkUfr1ZqE+rQ= +go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo= +go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -674,11 +667,10 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -704,14 +696,12 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 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-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -742,7 +732,6 @@ golang.org/x/sync v0.1.0/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-20180909124046-d0be0721c37e/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= @@ -758,11 +747,8 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w 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-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/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= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -781,7 +767,6 @@ golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/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-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/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= @@ -789,6 +774,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210510120138-977fb7262007/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-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -871,13 +857,13 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY 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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.8.1-0.20230428195545-5283a0178901 h1:0wxTF6pSjIIhNt7mo9GvjDfzyCOiWhmICgtO/Ah948s= 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= @@ -983,7 +969,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 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/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -991,7 +976,6 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= 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= @@ -1014,8 +998,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU= k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= -k8s.io/apimachinery v0.27.0-alpha.3 h1:uujqsdFrbqF+cEbqFHrkLKp+s3XxRgphTpc6Yg84qLo= -k8s.io/apimachinery v0.27.0-alpha.3/go.mod h1:TO4higCGNMwebVSdb1XPJdXMU4kk+nmMY/cTMVCGa6M= +k8s.io/apimachinery v0.28.0-alpha.0 h1:GZf6I49h9Sjl2Rjc+jY72nEYApr1pCKEHoOP/KxWWrA= +k8s.io/apimachinery v0.28.0-alpha.0/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= k8s.io/client-go v0.26.3 h1:k1UY+KXfkxV2ScEL3gilKcF7761xkYsSD6BC9szIu8s= k8s.io/client-go v0.26.3/go.mod h1:ZPNu9lm8/dbRIPAgteN30RSXea6vrCpFvq+MateTUuQ= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= diff --git a/rpc/ent/api_create.go b/rpc/ent/api_create.go index 3b92388c..8e1f6c22 100644 --- a/rpc/ent/api_create.go +++ b/rpc/ent/api_create.go @@ -94,7 +94,7 @@ func (ac *APICreate) Mutation() *APIMutation { // Save creates the API in the database. func (ac *APICreate) Save(ctx context.Context) (*API, error) { ac.defaults() - return withHooks[*API, APIMutation](ctx, ac.sqlSave, ac.mutation, ac.hooks) + return withHooks(ctx, ac.sqlSave, ac.mutation, ac.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/api_delete.go b/rpc/ent/api_delete.go index 6ba67a68..bb00a9c5 100644 --- a/rpc/ent/api_delete.go +++ b/rpc/ent/api_delete.go @@ -27,7 +27,7 @@ func (ad *APIDelete) Where(ps ...predicate.API) *APIDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ad *APIDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, APIMutation](ctx, ad.sqlExec, ad.mutation, ad.hooks) + return withHooks(ctx, ad.sqlExec, ad.mutation, ad.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/api_update.go b/rpc/ent/api_update.go index c0375fc3..157bf5f7 100644 --- a/rpc/ent/api_update.go +++ b/rpc/ent/api_update.go @@ -74,7 +74,7 @@ func (au *APIUpdate) Mutation() *APIMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (au *APIUpdate) Save(ctx context.Context) (int, error) { au.defaults() - return withHooks[int, APIMutation](ctx, au.sqlSave, au.mutation, au.hooks) + return withHooks(ctx, au.sqlSave, au.mutation, au.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -210,7 +210,7 @@ func (auo *APIUpdateOne) Select(field string, fields ...string) *APIUpdateOne { // Save executes the query and returns the updated API entity. func (auo *APIUpdateOne) Save(ctx context.Context) (*API, error) { auo.defaults() - return withHooks[*API, APIMutation](ctx, auo.sqlSave, auo.mutation, auo.hooks) + return withHooks(ctx, auo.sqlSave, auo.mutation, auo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/department_create.go b/rpc/ent/department_create.go index f858d092..c2dc7fe1 100644 --- a/rpc/ent/department_create.go +++ b/rpc/ent/department_create.go @@ -177,7 +177,7 @@ func (dc *DepartmentCreate) Mutation() *DepartmentMutation { // Save creates the Department in the database. func (dc *DepartmentCreate) Save(ctx context.Context) (*Department, error) { dc.defaults() - return withHooks[*Department, DepartmentMutation](ctx, dc.sqlSave, dc.mutation, dc.hooks) + return withHooks(ctx, dc.sqlSave, dc.mutation, dc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/department_delete.go b/rpc/ent/department_delete.go index 042927fa..5e4c2f2c 100644 --- a/rpc/ent/department_delete.go +++ b/rpc/ent/department_delete.go @@ -27,7 +27,7 @@ func (dd *DepartmentDelete) Where(ps ...predicate.Department) *DepartmentDelete // Exec executes the deletion query and returns how many vertices were deleted. func (dd *DepartmentDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, DepartmentMutation](ctx, dd.sqlExec, dd.mutation, dd.hooks) + return withHooks(ctx, dd.sqlExec, dd.mutation, dd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/department_query.go b/rpc/ent/department_query.go index 1b3381df..c6e6bf00 100644 --- a/rpc/ent/department_query.go +++ b/rpc/ent/department_query.go @@ -526,6 +526,9 @@ func (dq *DepartmentQuery) loadChildren(ctx context.Context, query *DepartmentQu init(nodes[i]) } } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(department.FieldParentID) + } query.Where(predicate.Department(func(s *sql.Selector) { s.Where(sql.InValues(s.C(department.ChildrenColumn), fks...)) })) @@ -537,7 +540,7 @@ func (dq *DepartmentQuery) loadChildren(ctx context.Context, query *DepartmentQu fk := n.ParentID node, ok := nodeids[fk] if !ok { - return fmt.Errorf(`unexpected foreign-key "parent_id" returned %v for node %v`, fk, n.ID) + return fmt.Errorf(`unexpected referenced foreign-key "parent_id" returned %v for node %v`, fk, n.ID) } assign(node, n) } @@ -553,6 +556,9 @@ func (dq *DepartmentQuery) loadUsers(ctx context.Context, query *UserQuery, node init(nodes[i]) } } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(user.FieldDepartmentID) + } query.Where(predicate.User(func(s *sql.Selector) { s.Where(sql.InValues(s.C(department.UsersColumn), fks...)) })) @@ -564,7 +570,7 @@ func (dq *DepartmentQuery) loadUsers(ctx context.Context, query *UserQuery, node fk := n.DepartmentID node, ok := nodeids[fk] if !ok { - return fmt.Errorf(`unexpected foreign-key "department_id" returned %v for node %v`, fk, n.ID) + return fmt.Errorf(`unexpected referenced foreign-key "department_id" returned %v for node %v`, fk, n.ID) } assign(node, n) } diff --git a/rpc/ent/department_update.go b/rpc/ent/department_update.go index 6d568925..252e6f7b 100644 --- a/rpc/ent/department_update.go +++ b/rpc/ent/department_update.go @@ -231,7 +231,7 @@ func (du *DepartmentUpdate) RemoveUsers(u ...*User) *DepartmentUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (du *DepartmentUpdate) Save(ctx context.Context) (int, error) { du.defaults() - return withHooks[int, DepartmentMutation](ctx, du.sqlSave, du.mutation, du.hooks) + return withHooks(ctx, du.sqlSave, du.mutation, du.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -662,7 +662,7 @@ func (duo *DepartmentUpdateOne) Select(field string, fields ...string) *Departme // Save executes the query and returns the updated Department entity. func (duo *DepartmentUpdateOne) Save(ctx context.Context) (*Department, error) { duo.defaults() - return withHooks[*Department, DepartmentMutation](ctx, duo.sqlSave, duo.mutation, duo.hooks) + return withHooks(ctx, duo.sqlSave, duo.mutation, duo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/dictionary_create.go b/rpc/ent/dictionary_create.go index 7dd80995..ffb999e4 100644 --- a/rpc/ent/dictionary_create.go +++ b/rpc/ent/dictionary_create.go @@ -110,7 +110,7 @@ func (dc *DictionaryCreate) Mutation() *DictionaryMutation { // Save creates the Dictionary in the database. func (dc *DictionaryCreate) Save(ctx context.Context) (*Dictionary, error) { dc.defaults() - return withHooks[*Dictionary, DictionaryMutation](ctx, dc.sqlSave, dc.mutation, dc.hooks) + return withHooks(ctx, dc.sqlSave, dc.mutation, dc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/dictionary_delete.go b/rpc/ent/dictionary_delete.go index 22372b20..17f8372b 100644 --- a/rpc/ent/dictionary_delete.go +++ b/rpc/ent/dictionary_delete.go @@ -27,7 +27,7 @@ func (dd *DictionaryDelete) Where(ps ...predicate.Dictionary) *DictionaryDelete // Exec executes the deletion query and returns how many vertices were deleted. func (dd *DictionaryDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, DictionaryMutation](ctx, dd.sqlExec, dd.mutation, dd.hooks) + return withHooks(ctx, dd.sqlExec, dd.mutation, dd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/dictionary_query.go b/rpc/ent/dictionary_query.go index ed98210d..37bd69a6 100644 --- a/rpc/ent/dictionary_query.go +++ b/rpc/ent/dictionary_query.go @@ -414,6 +414,9 @@ func (dq *DictionaryQuery) loadDictionaryDetails(ctx context.Context, query *Dic init(nodes[i]) } } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(dictionarydetail.FieldDictionaryID) + } query.Where(predicate.DictionaryDetail(func(s *sql.Selector) { s.Where(sql.InValues(s.C(dictionary.DictionaryDetailsColumn), fks...)) })) @@ -425,7 +428,7 @@ func (dq *DictionaryQuery) loadDictionaryDetails(ctx context.Context, query *Dic fk := n.DictionaryID node, ok := nodeids[fk] if !ok { - return fmt.Errorf(`unexpected foreign-key "dictionary_id" returned %v for node %v`, fk, n.ID) + return fmt.Errorf(`unexpected referenced foreign-key "dictionary_id" returned %v for node %v`, fk, n.ID) } assign(node, n) } diff --git a/rpc/ent/dictionary_update.go b/rpc/ent/dictionary_update.go index 5add44fa..b769144c 100644 --- a/rpc/ent/dictionary_update.go +++ b/rpc/ent/dictionary_update.go @@ -124,7 +124,7 @@ func (du *DictionaryUpdate) RemoveDictionaryDetails(d ...*DictionaryDetail) *Dic // Save executes the query and returns the number of nodes affected by the update operation. func (du *DictionaryUpdate) Save(ctx context.Context) (int, error) { du.defaults() - return withHooks[int, DictionaryMutation](ctx, du.sqlSave, du.mutation, du.hooks) + return withHooks(ctx, du.sqlSave, du.mutation, du.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -360,7 +360,7 @@ func (duo *DictionaryUpdateOne) Select(field string, fields ...string) *Dictiona // Save executes the query and returns the updated Dictionary entity. func (duo *DictionaryUpdateOne) Save(ctx context.Context) (*Dictionary, error) { duo.defaults() - return withHooks[*Dictionary, DictionaryMutation](ctx, duo.sqlSave, duo.mutation, duo.hooks) + return withHooks(ctx, duo.sqlSave, duo.mutation, duo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/dictionarydetail_create.go b/rpc/ent/dictionarydetail_create.go index 449ddac9..1b7dbfbe 100644 --- a/rpc/ent/dictionarydetail_create.go +++ b/rpc/ent/dictionarydetail_create.go @@ -142,7 +142,7 @@ func (ddc *DictionaryDetailCreate) Mutation() *DictionaryDetailMutation { // Save creates the DictionaryDetail in the database. func (ddc *DictionaryDetailCreate) Save(ctx context.Context) (*DictionaryDetail, error) { ddc.defaults() - return withHooks[*DictionaryDetail, DictionaryDetailMutation](ctx, ddc.sqlSave, ddc.mutation, ddc.hooks) + return withHooks(ctx, ddc.sqlSave, ddc.mutation, ddc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/dictionarydetail_delete.go b/rpc/ent/dictionarydetail_delete.go index 0411cd46..28e1c459 100644 --- a/rpc/ent/dictionarydetail_delete.go +++ b/rpc/ent/dictionarydetail_delete.go @@ -27,7 +27,7 @@ func (ddd *DictionaryDetailDelete) Where(ps ...predicate.DictionaryDetail) *Dict // Exec executes the deletion query and returns how many vertices were deleted. func (ddd *DictionaryDetailDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, DictionaryDetailMutation](ctx, ddd.sqlExec, ddd.mutation, ddd.hooks) + return withHooks(ctx, ddd.sqlExec, ddd.mutation, ddd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/dictionarydetail_update.go b/rpc/ent/dictionarydetail_update.go index d24c026d..f75778f4 100644 --- a/rpc/ent/dictionarydetail_update.go +++ b/rpc/ent/dictionarydetail_update.go @@ -154,7 +154,7 @@ func (ddu *DictionaryDetailUpdate) ClearDictionaries() *DictionaryDetailUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ddu *DictionaryDetailUpdate) Save(ctx context.Context) (int, error) { ddu.defaults() - return withHooks[int, DictionaryDetailMutation](ctx, ddu.sqlSave, ddu.mutation, ddu.hooks) + return withHooks(ctx, ddu.sqlSave, ddu.mutation, ddu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -410,7 +410,7 @@ func (dduo *DictionaryDetailUpdateOne) Select(field string, fields ...string) *D // Save executes the query and returns the updated DictionaryDetail entity. func (dduo *DictionaryDetailUpdateOne) Save(ctx context.Context) (*DictionaryDetail, error) { dduo.defaults() - return withHooks[*DictionaryDetail, DictionaryDetailMutation](ctx, dduo.sqlSave, dduo.mutation, dduo.hooks) + return withHooks(ctx, dduo.sqlSave, dduo.mutation, dduo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/menu_create.go b/rpc/ent/menu_create.go index 9ef5d880..ae473544 100644 --- a/rpc/ent/menu_create.go +++ b/rpc/ent/menu_create.go @@ -352,7 +352,7 @@ func (mc *MenuCreate) Mutation() *MenuMutation { // Save creates the Menu in the database. func (mc *MenuCreate) Save(ctx context.Context) (*Menu, error) { mc.defaults() - return withHooks[*Menu, MenuMutation](ctx, mc.sqlSave, mc.mutation, mc.hooks) + return withHooks(ctx, mc.sqlSave, mc.mutation, mc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/menu_delete.go b/rpc/ent/menu_delete.go index 7b437e08..f9017ee5 100644 --- a/rpc/ent/menu_delete.go +++ b/rpc/ent/menu_delete.go @@ -27,7 +27,7 @@ func (md *MenuDelete) Where(ps ...predicate.Menu) *MenuDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (md *MenuDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, MenuMutation](ctx, md.sqlExec, md.mutation, md.hooks) + return withHooks(ctx, md.sqlExec, md.mutation, md.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/menu_query.go b/rpc/ent/menu_query.go index a2b5e1c4..36c8cdd6 100644 --- a/rpc/ent/menu_query.go +++ b/rpc/ent/menu_query.go @@ -587,6 +587,9 @@ func (mq *MenuQuery) loadChildren(ctx context.Context, query *MenuQuery, nodes [ init(nodes[i]) } } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(menu.FieldParentID) + } query.Where(predicate.Menu(func(s *sql.Selector) { s.Where(sql.InValues(s.C(menu.ChildrenColumn), fks...)) })) @@ -598,7 +601,7 @@ func (mq *MenuQuery) loadChildren(ctx context.Context, query *MenuQuery, nodes [ fk := n.ParentID node, ok := nodeids[fk] if !ok { - return fmt.Errorf(`unexpected foreign-key "parent_id" returned %v for node %v`, fk, n.ID) + return fmt.Errorf(`unexpected referenced foreign-key "parent_id" returned %v for node %v`, fk, n.ID) } assign(node, n) } diff --git a/rpc/ent/menu_update.go b/rpc/ent/menu_update.go index a4b1b194..991844b8 100644 --- a/rpc/ent/menu_update.go +++ b/rpc/ent/menu_update.go @@ -498,7 +498,7 @@ func (mu *MenuUpdate) RemoveChildren(m ...*Menu) *MenuUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (mu *MenuUpdate) Save(ctx context.Context) (int, error) { mu.defaults() - return withHooks[int, MenuMutation](ctx, mu.sqlSave, mu.mutation, mu.hooks) + return withHooks(ctx, mu.sqlSave, mu.mutation, mu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -1278,7 +1278,7 @@ func (muo *MenuUpdateOne) Select(field string, fields ...string) *MenuUpdateOne // Save executes the query and returns the updated Menu entity. func (muo *MenuUpdateOne) Save(ctx context.Context) (*Menu, error) { muo.defaults() - return withHooks[*Menu, MenuMutation](ctx, muo.sqlSave, muo.mutation, muo.hooks) + return withHooks(ctx, muo.sqlSave, muo.mutation, muo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/oauthprovider_create.go b/rpc/ent/oauthprovider_create.go index 0effc93f..7cd08196 100644 --- a/rpc/ent/oauthprovider_create.go +++ b/rpc/ent/oauthprovider_create.go @@ -116,7 +116,7 @@ func (opc *OauthProviderCreate) Mutation() *OauthProviderMutation { // Save creates the OauthProvider in the database. func (opc *OauthProviderCreate) Save(ctx context.Context) (*OauthProvider, error) { opc.defaults() - return withHooks[*OauthProvider, OauthProviderMutation](ctx, opc.sqlSave, opc.mutation, opc.hooks) + return withHooks(ctx, opc.sqlSave, opc.mutation, opc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/oauthprovider_delete.go b/rpc/ent/oauthprovider_delete.go index 9b1a8029..52120c3a 100644 --- a/rpc/ent/oauthprovider_delete.go +++ b/rpc/ent/oauthprovider_delete.go @@ -27,7 +27,7 @@ func (opd *OauthProviderDelete) Where(ps ...predicate.OauthProvider) *OauthProvi // Exec executes the deletion query and returns how many vertices were deleted. func (opd *OauthProviderDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, OauthProviderMutation](ctx, opd.sqlExec, opd.mutation, opd.hooks) + return withHooks(ctx, opd.sqlExec, opd.mutation, opd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/oauthprovider_update.go b/rpc/ent/oauthprovider_update.go index f159dcb5..f8d29b70 100644 --- a/rpc/ent/oauthprovider_update.go +++ b/rpc/ent/oauthprovider_update.go @@ -103,7 +103,7 @@ func (opu *OauthProviderUpdate) Mutation() *OauthProviderMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (opu *OauthProviderUpdate) Save(ctx context.Context) (int, error) { opu.defaults() - return withHooks[int, OauthProviderMutation](ctx, opu.sqlSave, opu.mutation, opu.hooks) + return withHooks(ctx, opu.sqlSave, opu.mutation, opu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -286,7 +286,7 @@ func (opuo *OauthProviderUpdateOne) Select(field string, fields ...string) *Oaut // Save executes the query and returns the updated OauthProvider entity. func (opuo *OauthProviderUpdateOne) Save(ctx context.Context) (*OauthProvider, error) { opuo.defaults() - return withHooks[*OauthProvider, OauthProviderMutation](ctx, opuo.sqlSave, opuo.mutation, opuo.hooks) + return withHooks(ctx, opuo.sqlSave, opuo.mutation, opuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/position_create.go b/rpc/ent/position_create.go index 90efef99..31f3aa43 100644 --- a/rpc/ent/position_create.go +++ b/rpc/ent/position_create.go @@ -125,7 +125,7 @@ func (pc *PositionCreate) Mutation() *PositionMutation { // Save creates the Position in the database. func (pc *PositionCreate) Save(ctx context.Context) (*Position, error) { pc.defaults() - return withHooks[*Position, PositionMutation](ctx, pc.sqlSave, pc.mutation, pc.hooks) + return withHooks(ctx, pc.sqlSave, pc.mutation, pc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/position_delete.go b/rpc/ent/position_delete.go index e086a086..f3848f66 100644 --- a/rpc/ent/position_delete.go +++ b/rpc/ent/position_delete.go @@ -27,7 +27,7 @@ func (pd *PositionDelete) Where(ps ...predicate.Position) *PositionDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (pd *PositionDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, PositionMutation](ctx, pd.sqlExec, pd.mutation, pd.hooks) + return withHooks(ctx, pd.sqlExec, pd.mutation, pd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/position_update.go b/rpc/ent/position_update.go index b1bce0ec..20b0786d 100644 --- a/rpc/ent/position_update.go +++ b/rpc/ent/position_update.go @@ -146,7 +146,7 @@ func (pu *PositionUpdate) RemoveUsers(u ...*User) *PositionUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (pu *PositionUpdate) Save(ctx context.Context) (int, error) { pu.defaults() - return withHooks[int, PositionMutation](ctx, pu.sqlSave, pu.mutation, pu.hooks) + return withHooks(ctx, pu.sqlSave, pu.mutation, pu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -409,7 +409,7 @@ func (puo *PositionUpdateOne) Select(field string, fields ...string) *PositionUp // Save executes the query and returns the updated Position entity. func (puo *PositionUpdateOne) Save(ctx context.Context) (*Position, error) { puo.defaults() - return withHooks[*Position, PositionMutation](ctx, puo.sqlSave, puo.mutation, puo.hooks) + return withHooks(ctx, puo.sqlSave, puo.mutation, puo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/role_create.go b/rpc/ent/role_create.go index aad9004e..da75015e 100644 --- a/rpc/ent/role_create.go +++ b/rpc/ent/role_create.go @@ -163,7 +163,7 @@ func (rc *RoleCreate) Mutation() *RoleMutation { // Save creates the Role in the database. func (rc *RoleCreate) Save(ctx context.Context) (*Role, error) { rc.defaults() - return withHooks[*Role, RoleMutation](ctx, rc.sqlSave, rc.mutation, rc.hooks) + return withHooks(ctx, rc.sqlSave, rc.mutation, rc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/role_delete.go b/rpc/ent/role_delete.go index e458ac98..d5037f54 100644 --- a/rpc/ent/role_delete.go +++ b/rpc/ent/role_delete.go @@ -27,7 +27,7 @@ func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (rd *RoleDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, RoleMutation](ctx, rd.sqlExec, rd.mutation, rd.hooks) + return withHooks(ctx, rd.sqlExec, rd.mutation, rd.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/role_update.go b/rpc/ent/role_update.go index 80d4fdd6..0da7a556 100644 --- a/rpc/ent/role_update.go +++ b/rpc/ent/role_update.go @@ -205,7 +205,7 @@ func (ru *RoleUpdate) RemoveUsers(u ...*User) *RoleUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (ru *RoleUpdate) Save(ctx context.Context) (int, error) { ru.defaults() - return withHooks[int, RoleMutation](ctx, ru.sqlSave, ru.mutation, ru.hooks) + return withHooks(ctx, ru.sqlSave, ru.mutation, ru.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -574,7 +574,7 @@ func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne // Save executes the query and returns the updated Role entity. func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error) { ruo.defaults() - return withHooks[*Role, RoleMutation](ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) + return withHooks(ctx, ruo.sqlSave, ruo.mutation, ruo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/runtime/runtime.go b/rpc/ent/runtime/runtime.go index b78bec26..a20e94c6 100644 --- a/rpc/ent/runtime/runtime.go +++ b/rpc/ent/runtime/runtime.go @@ -5,6 +5,6 @@ package runtime // The schema-stitching logic is generated in github.com/suyuan32/simple-admin-core/rpc/ent/runtime.go const ( - Version = "v0.12.1" // Version of ent codegen. - Sum = "h1:bqK+WMwfjpTsFiXx9tQSEZMNLyAADSx5Y1xySjT4Tm8=" // Sum of ent codegen. + Version = "v0.12.3" // Version of ent codegen. + Sum = "h1:N5lO2EOrHpCH5HYfiMOCHYbo+oh5M8GjT0/cx5x6xkk=" // Sum of ent codegen. ) diff --git a/rpc/ent/token_create.go b/rpc/ent/token_create.go index 2d0568f1..022eb4ad 100644 --- a/rpc/ent/token_create.go +++ b/rpc/ent/token_create.go @@ -109,7 +109,7 @@ func (tc *TokenCreate) Mutation() *TokenMutation { // Save creates the Token in the database. func (tc *TokenCreate) Save(ctx context.Context) (*Token, error) { tc.defaults() - return withHooks[*Token, TokenMutation](ctx, tc.sqlSave, tc.mutation, tc.hooks) + return withHooks(ctx, tc.sqlSave, tc.mutation, tc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/token_delete.go b/rpc/ent/token_delete.go index c159c131..60040d57 100644 --- a/rpc/ent/token_delete.go +++ b/rpc/ent/token_delete.go @@ -27,7 +27,7 @@ func (td *TokenDelete) Where(ps ...predicate.Token) *TokenDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (td *TokenDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, TokenMutation](ctx, td.sqlExec, td.mutation, td.hooks) + return withHooks(ctx, td.sqlExec, td.mutation, td.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/token_update.go b/rpc/ent/token_update.go index 7d06bdad..2bd9838b 100644 --- a/rpc/ent/token_update.go +++ b/rpc/ent/token_update.go @@ -94,7 +94,7 @@ func (tu *TokenUpdate) Mutation() *TokenMutation { // Save executes the query and returns the number of nodes affected by the update operation. func (tu *TokenUpdate) Save(ctx context.Context) (int, error) { tu.defaults() - return withHooks[int, TokenMutation](ctx, tu.sqlSave, tu.mutation, tu.hooks) + return withHooks(ctx, tu.sqlSave, tu.mutation, tu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -258,7 +258,7 @@ func (tuo *TokenUpdateOne) Select(field string, fields ...string) *TokenUpdateOn // Save executes the query and returns the updated Token entity. func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error) { tuo.defaults() - return withHooks[*Token, TokenMutation](ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) + return withHooks(ctx, tuo.sqlSave, tuo.mutation, tuo.hooks) } // SaveX is like Save, but panics if an error occurs. diff --git a/rpc/ent/user_create.go b/rpc/ent/user_create.go index 44bb87e4..54eaecdb 100644 --- a/rpc/ent/user_create.go +++ b/rpc/ent/user_create.go @@ -239,7 +239,7 @@ func (uc *UserCreate) Mutation() *UserMutation { // Save creates the User in the database. func (uc *UserCreate) Save(ctx context.Context) (*User, error) { uc.defaults() - return withHooks[*User, UserMutation](ctx, uc.sqlSave, uc.mutation, uc.hooks) + return withHooks(ctx, uc.sqlSave, uc.mutation, uc.hooks) } // SaveX calls Save and panics if Save returns an error. diff --git a/rpc/ent/user_delete.go b/rpc/ent/user_delete.go index 57383241..d51256f8 100644 --- a/rpc/ent/user_delete.go +++ b/rpc/ent/user_delete.go @@ -27,7 +27,7 @@ func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete { // Exec executes the deletion query and returns how many vertices were deleted. func (ud *UserDelete) Exec(ctx context.Context) (int, error) { - return withHooks[int, UserMutation](ctx, ud.sqlExec, ud.mutation, ud.hooks) + return withHooks(ctx, ud.sqlExec, ud.mutation, ud.hooks) } // ExecX is like Exec, but panics if an error occurs. diff --git a/rpc/ent/user_update.go b/rpc/ent/user_update.go index e5da85e3..ab889e70 100644 --- a/rpc/ent/user_update.go +++ b/rpc/ent/user_update.go @@ -301,7 +301,7 @@ func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate { // Save executes the query and returns the number of nodes affected by the update operation. func (uu *UserUpdate) Save(ctx context.Context) (int, error) { uu.defaults() - return withHooks[int, UserMutation](ctx, uu.sqlSave, uu.mutation, uu.hooks) + return withHooks(ctx, uu.sqlSave, uu.mutation, uu.hooks) } // SaveX is like Save, but panics if an error occurs. @@ -813,7 +813,7 @@ func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne // Save executes the query and returns the updated User entity. func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error) { uuo.defaults() - return withHooks[*User, UserMutation](ctx, uuo.sqlSave, uuo.mutation, uuo.hooks) + return withHooks(ctx, uuo.sqlSave, uuo.mutation, uuo.hooks) } // SaveX is like Save, but panics if an error occurs.