diff --git a/deploy/apisix/lua/auth.lua b/deploy/apisix/lua/auth.lua index 3864c5d..5f228f5 100644 --- a/deploy/apisix/lua/auth.lua +++ b/deploy/apisix/lua/auth.lua @@ -43,6 +43,8 @@ function _M.access(conf, ctx) ["/api/v2/analysis/oss/callback"] = true, ["/api/v2/analysis/py/callback"] = true, + ["/device/v1/login/face"] = true, + } local user_key = core.request.header(ctx, "authorization") diff --git a/go.mod b/go.mod index e7c3bd2..21fda82 100644 --- a/go.mod +++ b/go.mod @@ -12,11 +12,14 @@ require ( github.com/alibabacloud-go/tea v1.5.3 github.com/alibabacloud-go/tea-utils/v2 v2.0.9 github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible + github.com/disintegration/imaging v1.6.2 github.com/fsnotify/fsnotify v1.10.1 github.com/go-playground/validator/v10 v10.30.3 github.com/golang-jwt/jwt/v4 v4.5.2 github.com/google/uuid v1.6.0 + github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 github.com/json-iterator/go v1.1.12 + github.com/milvus-io/milvus-sdk-go/v2 v2.4.2 github.com/mssola/user_agent v0.6.0 github.com/redis/go-redis/v9 v9.21.0 github.com/samber/lo v1.53.0 @@ -50,10 +53,12 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/clbanning/mxj/v2 v2.7.0 // indirect github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 // indirect + github.com/cockroachdb/errors v1.9.1 // indirect + github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect + github.com/cockroachdb/redact v1.1.3 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/disintegration/imaging v1.6.2 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/envoyproxy/go-control-plane/envoy v1.37.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.3.3 // indirect @@ -61,6 +66,7 @@ require ( github.com/fullstorydev/grpcurl v1.9.3 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/gabriel-vasile/mimetype v1.4.13 // indirect + github.com/getsentry/sentry-go v0.12.0 // indirect github.com/go-jose/go-jose/v4 v4.1.4 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -76,9 +82,9 @@ require ( github.com/google/cel-go v0.25.0 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/grafana/pyroscope-go v1.3.0 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.10 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect github.com/jhump/protoreflect v1.18.0 // indirect github.com/jhump/protoreflect/v2 v2.0.0-beta.1 // indirect @@ -87,10 +93,13 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/klauspost/compress v1.18.6 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // 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.20 // indirect + github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240819025435-512e3b98866a // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -106,6 +115,7 @@ require ( github.com/prometheus/procfs v0.16.1 // indirect github.com/richardlehane/mscfb v1.0.7 // indirect github.com/richardlehane/msoleps v1.0.6 // indirect + github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/sagikazarmark/locafero v0.11.0 // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect @@ -115,6 +125,9 @@ require ( github.com/spiffe/go-spiffe/v2 v2.7.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect + github.com/tidwall/gjson v1.14.4 // indirect + github.com/tidwall/match v1.1.1 // indirect + github.com/tidwall/pretty v1.2.0 // indirect github.com/tiendc/go-deepcopy v1.7.2 // indirect github.com/titanous/json5 v1.0.0 // indirect github.com/tjfoc/gmsm v1.4.1 // indirect diff --git a/go.sum b/go.sum index 0a9193e..49afff8 100644 --- a/go.sum +++ b/go.sum @@ -7,7 +7,13 @@ cel.dev/expr v0.25.2/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= filippo.io/edwards25519 v1.2.0 h1:crnVqOiS4jqYleHd9vaKZ+HKtHfllngJIiOpNpoJsjo= filippo.io/edwards25519 v1.2.0/go.mod h1:xzAOLCNug/yB62zG1bQ8uziwrIqIuxhctzJT18Q77mc= +github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6 h1:eIf+iGJxdU4U9ypaUfbtOWCsZSbTb8AUHvyPrxu6mAA= github.com/alibabacloud-go/alibabacloud-gateway-pop v0.0.6/go.mod h1:4EUIoxs/do24zMOGGqYVWgw0s9NtiylnJglOeEB5UJo= github.com/alibabacloud-go/alibabacloud-gateway-spi v0.0.4/go.mod h1:sCavSAvdzOjul4cEqeVtvlSaSScfNsTQ+46HwlTL1hc= @@ -77,6 +83,8 @@ github.com/aliyun/credentials-go v1.4.13 h1:alJaUIolzjrw0sZjOTwYpI34Djqo3MJJh4q+ github.com/aliyun/credentials-go v1.4.13/go.mod h1:Jm6d+xIgwJVLVWT561vy67ZRP4lPTQxMbEYRuT2Ti1U= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -98,31 +106,54 @@ github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyM github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s= 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-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 h1:aBangftG7EVZoUb69Os8IaYg++6uMOdKK83QtkkvJik= github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2/go.mod h1:qwXFYgsP6T7XnJtbKlf1HP8AjxZZyzxMmc+Lq5GjlU4= +github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= +github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f h1:6jduT9Hfc0njg5jJ1DdKCFPdMBrp/mdZfCpa5h+WM74= +github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= +github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= 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.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane/envoy v1.37.0 h1:u3riX6BoYRfF4Dr7dwSOroNfdSbEPe9Yyl09/B6wBrQ= github.com/envoyproxy/go-control-plane/envoy v1.37.0/go.mod h1:DReE9MMrmecPy+YvQOAOHNYMALuowAnbjjEMkkWOi6A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.3.3 h1:MVQghNeW+LZcmXe7SY1V36Z+WFMDjpqGAGacLe2T0ds= github.com/envoyproxy/protoc-gen-validate v1.3.3/go.mod h1:TsndJ/ngyIdQRhMcVVGDDHINPLWB7C82oDArY51KfB0= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho= github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo= github.com/fullstorydev/grpcurl v1.9.3 h1:PC1Xi3w+JAvEE2Tg2Gf2RfVgPbf9+tbuQr1ZkyVU3jk= @@ -131,13 +162,26 @@ github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sa github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/gabriel-vasile/mimetype v1.4.13 h1:46nXokslUBsAJE/wMsp5gtO500a4F3Nkz9Ufpk2AcUM= github.com/gabriel-vasile/mimetype v1.4.13/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= +github.com/getsentry/sentry-go v0.12.0 h1:era7g0re5iY13bHSdN/xMkyV+5zZppjRVQhZrXCaEIk= +github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-faker/faker/v4 v4.1.0 h1:ffuWmpDrducIUOO0QSKSF5Q2dxAht+dhsT9FvVHhPEI= +github.com/go-faker/faker/v4 v4.1.0/go.mod h1:uuNc0PSRxF8nMgjGrrrU4Nw5cF30Jc6Kd0/FUTTYbhg= github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= @@ -156,19 +200,29 @@ github.com/go-playground/validator/v10 v10.30.3 h1:4MU6YkEwx7GbcPJOZxrtbu+QfF3pJ github.com/go-playground/validator/v10 v10.30.3/go.mod h1:4Axh7oCNGcoGkqLoE4YWt6n20mcEIsPRlB7vPk3lpyc= github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw= github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 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= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= @@ -176,9 +230,13 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/cel-go v0.25.0 h1:jsFw9Fhn+3y2kBbltZR4VEz5xKkcIFRPDnuEzAGv5GY= github.com/google/cel-go v0.25.0/go.mod h1:hjEb6r5SuOSlhCHmFoLzu8HGCERvIsDAbxDAyNU/MmI= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= @@ -187,16 +245,21 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= @@ -204,10 +267,23 @@ github.com/grafana/pyroscope-go v1.3.0 h1:t3Jehad8vvqN4oRAB0LdmfQ5ZSUXQw3asoft+K github.com/grafana/pyroscope-go v1.3.0/go.mod h1:XA7I3usNx+UdjOZfQnl1WV8y924vsJo9KIVrKB+9jx4= github.com/grafana/pyroscope-go/godeltaprof v0.1.10 h1:dvhndEbyavTb59vFCd6PsrAG5qi69/qZZtegh/TJKSY= github.com/grafana/pyroscope-go/godeltaprof v0.1.10/go.mod h1:XnWRGg2XO5uxZdiz1rfeJH6w1eZ+YICCBVXNWOfH86g= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= 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/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= +github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= +github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jhump/protoreflect v1.18.0 h1:TOz0MSR/0JOZ5kECB/0ufGnC2jdsgZ123Rd/k4Z5/2w= github.com/jhump/protoreflect v1.18.0/go.mod h1:ezWcltJIVF4zYdIFM+D/sHV4Oh5LNU08ORzCGfwvTz8= github.com/jhump/protoreflect/v2 v2.0.0-beta.1 h1:Dw1rslK/VotaUGYsv53XVWITr+5RCPXfvvlGrM/+B6w= @@ -218,17 +294,32 @@ github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= +github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= +github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= +github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= 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/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.18.6 h1:2jupLlAwFm95+YDR+NwD2MEfFO9d4z4Prjl1XXDjuao= github.com/klauspost/compress v1.18.6/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -237,17 +328,37 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= +github.com/magiconair/properties v1.8.0/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= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +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.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240819025435-512e3b98866a h1:0B/8Fo66D8Aa23Il0yrQvg1KKz92tE/BJ5BvkUxxAAk= +github.com/milvus-io/milvus-proto/go-api/v2 v2.4.10-0.20240819025435-512e3b98866a/go.mod h1:1OIl0v5PQeNxIJhCvY+K55CBUOYDZevw9g9380u1Wek= +github.com/milvus-io/milvus-sdk-go/v2 v2.4.2 h1:Xqf+S7iicElwYoS2Zly8Nf/zKHuZsNy1xQajfdtygVY= +github.com/milvus-io/milvus-sdk-go/v2 v2.4.2/go.mod h1:ulO1YUXKH0PGg50q27grw048GDY9ayB4FPmh7D+FFTA= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 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= @@ -256,21 +367,36 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mssola/user_agent v0.6.0 h1:uwPR4rtWlCHRFyyP9u2KOV0u8iQXmS7Z7feTrstQwk4= github.com/mssola/user_agent v0.6.0/go.mod h1:TTPno8LPY3wAIEKRpAtkdMT0f8SE24pLRGPahjCH4uw= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= +github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3 h1:OoxbjfXVZyod1fmWYhI7SEyaD8B00ynP3T+D5GiyHOY= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.4.3 h1:GTRvJQutkOSftxIFD5xw9aepkYNuPWmVJpffdDPYVpY= github.com/pelletier/go-toml/v2 v2.4.3/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741 h1:KPpdlQLZcHfTMQRi6bFQ7ogNO0ltFT4PmtwTLW4W+14= github.com/petermattis/goid v0.0.0-20260113132338-7c7de50cc741/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +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/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= @@ -298,12 +424,21 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robertkrimen/otto v0.2.1 h1:FVP0PJ0AHIjC+N4pKCG9yCDz6LHNPCwi/GKID5pGGF0= github.com/robertkrimen/otto v0.2.1/go.mod h1:UPwtJ1Xu7JrLcZjNWN8orJaM5n5YEtqL//farB5FlRY= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc= github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik= github.com/samber/lo v1.53.0 h1:t975lj2py4kJPQ6haz1QMgtId2gtmfktACxIXArw3HM= github.com/samber/lo v1.53.0/go.mod h1:4+MXEGsJzbKGaUEQFKBq2xtfuznW9oz/WrgyzMzRoM0= +github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -311,12 +446,18 @@ github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrel github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I= github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +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/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU= github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY= github.com/spiffe/go-spiffe/v2 v2.7.0 h1:uXe1MflJoHw58wAUvxVlcM7WpKtijWG7I1UidcGh6g4= @@ -324,13 +465,17 @@ github.com/spiffe/go-spiffe/v2 v2.7.0/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnO github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= 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= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +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.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= @@ -338,6 +483,12 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= +github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +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/tiendc/go-deepcopy v1.7.2 h1:Ut2yYR7W9tWjTQitganoIue4UGxZwCcJy3orjrrIj44= github.com/tiendc/go-deepcopy v1.7.2/go.mod h1:4bKjNC2r7boYOkD2IOuZpYjmlDdzjbpTRyCx+goBCJQ= github.com/titanous/json5 v1.0.0 h1:hJf8Su1d9NuI/ffpxgxQfxh/UiBFZX7bMPid0rIL/7s= @@ -345,17 +496,36 @@ github.com/titanous/json5 v1.0.0/go.mod h1:7JH1M8/LHKc6cyP5o5g3CSaRj+mBrIimTxzpv github.com/tjfoc/gmsm v1.3.2/go.mod h1:HaUcFuY0auTiaHB9MHFGCPx5IaLhTUd2atbCFBQXn9w= github.com/tjfoc/gmsm v1.4.1 h1:aMe1GlZb+0bLjn+cKTPEvvn9oUEBlJitaZiiBwsbgho= github.com/tjfoc/gmsm v1.4.1/go.mod h1:j4INPkHWMrhJb38G+J6W4Tw0AbuN8Thu3PbdVYhVcTE= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +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= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xuri/efp v0.0.1 h1:fws5Rv3myXyYni8uwj2qKjVaRP30PdjeYe2Y6FDsCL8= github.com/xuri/efp v0.0.1/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= github.com/xuri/excelize/v2 v2.11.0 h1:HxaEFl6sRN2+8J5a8HaKq+0M4FsjBGMnWWtjOCPSG88= github.com/xuri/excelize/v2 v2.11.0/go.mod h1:jxFLbzaIwGQ5ufFNvYfUOHqXhfPaNmP14KWfmNz2Uak= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9 h1:+C0TIdyyYmzadGaL/HBLbf3WdLgC29pgyhTjAT/0nuE= github.com/xuri/nfp v0.0.2-0.20250530014748-2ddeb826f9a9/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.30/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.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= @@ -393,6 +563,7 @@ go.opentelemetry.io/otel/trace v1.44.0 h1:jxF5CsGYCe74MCRx2X4g7WsY/VBKRqqpNvXlX/ go.opentelemetry.io/otel/trace v1.44.0/go.mod h1:oLl1jrMQAVo6v3GAggN+1VH9VIz9iUSvW53sW1Q8PIE= go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= @@ -401,20 +572,26 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191219195013-becbf705a915/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= @@ -434,8 +611,11 @@ golang.org/x/image v0.38.0/go.mod h1:/3f6vaXC+6CEanU4KJxbcUZyEePbyKbaLoDOe4ehFYY golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/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.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.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -443,15 +623,23 @@ golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-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-20181220203305-927f97764cc3/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= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/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-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -470,10 +658,12 @@ golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= 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-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= @@ -482,13 +672,29 @@ golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20181205085412-a5c9d58dba9a/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-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-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/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-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-20210615035016-665e8c7367d1/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-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-20220209214540-3681064d5158/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= @@ -521,6 +727,8 @@ golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y= golang.org/x/text v0.3.0/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.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/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= @@ -530,18 +738,23 @@ golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181221001348-537d06c36207/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-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.3/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.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= @@ -556,50 +769,77 @@ gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= 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/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa h1:Kjn0N0tCrDgiAFW+lGO4JZ3ck44CehvJQMAwj9QF0G8= google.golang.org/genproto/googleapis/api v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:q4lMZS6kskjT5HvCPrnnypcDPVJqT/f4nfxmkE7gryY= google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa h1:mZHHdPZl0dbGHCflZgAq/Q468DWVFcU2whhB2KAo8fk= google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.83.0 h1:JeNZEKJFbQxArAMl+hiytHauacDNqJUllNfmIMmpqnQ= google.golang.org/grpc v1.83.0/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= +google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6 h1:ExN12ndbJ608cboPYflpTny6mXSzPrDLh0iTaVrRrds= +google.golang.org/grpc/examples v0.0.0-20250407062114-b368379ef8f6/go.mod h1:6ytKWczdvnpnO+m+JiG9NjEDzR1FJfsnmJdG7B8QVZ8= 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= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= 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/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/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/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= 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/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.6.0 h1:eNbLmNTpPpTOVZi8MMxCi2aaIm0ZpInbORNXDwyLGvg= diff --git a/pkg/utils/status.go b/pkg/utils/status.go index b7a8960..06edf79 100644 --- a/pkg/utils/status.go +++ b/pkg/utils/status.go @@ -132,6 +132,7 @@ var ( ErrorQRcodeExp = Status{Code: 10015, Msg: "二维码已过期"} ErrorNotFace = Status{Code: 10016, Msg: "未检测到人脸"} ErrorFileUpFailed = Status{Code: 10017, Msg: "文件上传失败"} + ErrorFaceNotMatch = Status{Code: 13001, Msg: "未注册人脸"} // ErrorNotFund 数据类 ErrorFormatDataError = Status{Code: 11014, Msg: "格式化数据出错"} diff --git a/rpc/analysis/analysis.pb b/rpc/analysis/analysis.pb index 7a82565..4cfe0fc 100644 Binary files a/rpc/analysis/analysis.pb and b/rpc/analysis/analysis.pb differ diff --git a/rpc/analysis/analysis.proto b/rpc/analysis/analysis.proto index 6acbdca..6083ded 100644 --- a/rpc/analysis/analysis.proto +++ b/rpc/analysis/analysis.proto @@ -274,6 +274,13 @@ service AnalysisStore { } service AnalysisDevice { + rpc FaceLogin(FaceLoginReq) returns (Response) { + option (google.api.http) = { + post: "/device/v1/login/face" + body: "*" + }; + } + rpc Policy(DevicePolicyReq) returns (Response) { option (google.api.http) = { post: "/device/v1/analysis/policy" @@ -303,6 +310,29 @@ service AnalysisDevice { } } +service AnalysisAdmin { + rpc UserList(AdminUserListReq) returns (Response) { + option (google.api.http) = { + post: "/admin/v2/analysis/user/list" + body: "*" + }; + } + + rpc UserArchive(AdminUserArchiveReq) returns (Response) { + option (google.api.http) = { + post: "/admin/v2/analysis/user/archive" + body: "*" + }; + } + + rpc UserDetail(AdminUserDetailReq) returns (Response) { + option (google.api.http) = { + post: "/admin/v2/analysis/user/detail" + body: "*" + }; + } +} + message Response { int32 code = 1; string msg = 2; @@ -503,3 +533,26 @@ message DeviceUpdateReq { int64 id = 1; string device_name = 2; } + +message AdminUserListReq { + string keyword = 1; + int32 page = 2; + int32 size = 3; +} + +message AdminUserArchiveReq { + int64 user_id = 1; + int32 page = 2; + int32 size = 3; +} + +message AdminUserDetailReq { + int64 id = 1; +} + +// FaceLoginReq 设备人脸登录。gRPC/网关不走 multipart,传 file(图片字节) 或共享盘 file_path 其一。 +message FaceLoginReq { + bytes file = 1; + string file_path = 2; + string client_code = 3; +} diff --git a/rpc/analysis/pb/analysis.pb.go b/rpc/analysis/pb/analysis.pb.go index e9d8c90..98b6e16 100644 --- a/rpc/analysis/pb/analysis.pb.go +++ b/rpc/analysis/pb/analysis.pb.go @@ -2214,6 +2214,231 @@ func (x *DeviceUpdateReq) GetDeviceName() string { return "" } +type AdminUserListReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdminUserListReq) Reset() { + *x = AdminUserListReq{} + mi := &file_analysis_analysis_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdminUserListReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminUserListReq) ProtoMessage() {} + +func (x *AdminUserListReq) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdminUserListReq.ProtoReflect.Descriptor instead. +func (*AdminUserListReq) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{44} +} + +func (x *AdminUserListReq) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +func (x *AdminUserListReq) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *AdminUserListReq) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +type AdminUserArchiveReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + Size int32 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdminUserArchiveReq) Reset() { + *x = AdminUserArchiveReq{} + mi := &file_analysis_analysis_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdminUserArchiveReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminUserArchiveReq) ProtoMessage() {} + +func (x *AdminUserArchiveReq) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdminUserArchiveReq.ProtoReflect.Descriptor instead. +func (*AdminUserArchiveReq) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{45} +} + +func (x *AdminUserArchiveReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *AdminUserArchiveReq) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *AdminUserArchiveReq) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +type AdminUserDetailReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdminUserDetailReq) Reset() { + *x = AdminUserDetailReq{} + mi := &file_analysis_analysis_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdminUserDetailReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdminUserDetailReq) ProtoMessage() {} + +func (x *AdminUserDetailReq) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdminUserDetailReq.ProtoReflect.Descriptor instead. +func (*AdminUserDetailReq) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{46} +} + +func (x *AdminUserDetailReq) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +// FaceLoginReq 设备人脸登录。gRPC/网关不走 multipart,传 file(图片字节) 或共享盘 file_path 其一。 +type FaceLoginReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + File []byte `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"` + FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + ClientCode string `protobuf:"bytes,3,opt,name=client_code,json=clientCode,proto3" json:"client_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FaceLoginReq) Reset() { + *x = FaceLoginReq{} + mi := &file_analysis_analysis_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FaceLoginReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FaceLoginReq) ProtoMessage() {} + +func (x *FaceLoginReq) ProtoReflect() protoreflect.Message { + mi := &file_analysis_analysis_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FaceLoginReq.ProtoReflect.Descriptor instead. +func (*FaceLoginReq) Descriptor() ([]byte, []int) { + return file_analysis_analysis_proto_rawDescGZIP(), []int{47} +} + +func (x *FaceLoginReq) GetFile() []byte { + if x != nil { + return x.File + } + return nil +} + +func (x *FaceLoginReq) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (x *FaceLoginReq) GetClientCode() string { + if x != nil { + return x.ClientCode + } + return "" +} + var File_analysis_analysis_proto protoreflect.FileDescriptor const file_analysis_analysis_proto_rawDesc = "" + @@ -2345,7 +2570,22 @@ const file_analysis_analysis_proto_rawDesc = "" + "\x0fDeviceUpdateReq\x12\x0e\n" + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1f\n" + "\vdevice_name\x18\x02 \x01(\tR\n" + - "deviceName2\xe6\x11\n" + + "deviceName\"T\n" + + "\x10AdminUserListReq\x12\x18\n" + + "\akeyword\x18\x01 \x01(\tR\akeyword\x12\x12\n" + + "\x04page\x18\x02 \x01(\x05R\x04page\x12\x12\n" + + "\x04size\x18\x03 \x01(\x05R\x04size\"V\n" + + "\x13AdminUserArchiveReq\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x12\n" + + "\x04page\x18\x02 \x01(\x05R\x04page\x12\x12\n" + + "\x04size\x18\x03 \x01(\x05R\x04size\"$\n" + + "\x12AdminUserDetailReq\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"`\n" + + "\fFaceLoginReq\x12\x12\n" + + "\x04file\x18\x01 \x01(\fR\x04file\x12\x1b\n" + + "\tfile_path\x18\x02 \x01(\tR\bfilePath\x12\x1f\n" + + "\vclient_code\x18\x03 \x01(\tR\n" + + "clientCode2\xe6\x11\n" + "\bAnalysis\x12W\n" + "\x12InternalCreateUser\x12\x1f.analysis.InternalCreateUserReq\x1a .analysis.InternalCreateUserData\x12`\n" + "\x15InternalSetRegistered\x12\".analysis.InternalSetRegisteredReq\x1a#.analysis.InternalSetRegisteredData\x12k\n" + @@ -2397,13 +2637,19 @@ const file_analysis_analysis_proto_rawDesc = "" + "\tStoreInfo\x12\x16.analysis.StoreInfoReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v2/analysis/store/info\x12g\n" + "\rStoreUserList\x12\x1a.analysis.StoreUserListReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/api/v2/analysis/store/list\x12r\n" + "\x0fStoreUserUpdate\x12\x1c.analysis.StoreUserUpdateReq\x1a\x12.analysis.Response\"-\x82\xd3\xe4\x93\x02':\x01*\"\"/api/v2/analysis/store/user/update\x12l\n" + - "\rStoreUserInfo\x12\x1a.analysis.StoreUserInfoReq\x1a\x12.analysis.Response\"+\x82\xd3\xe4\x93\x02%:\x01*\" /api/v2/analysis/store/user/info2\xa5\x03\n" + - "\x0eAnalysisDevice\x12^\n" + + "\rStoreUserInfo\x12\x1a.analysis.StoreUserInfoReq\x1a\x12.analysis.Response\"+\x82\xd3\xe4\x93\x02%:\x01*\" /api/v2/analysis/store/user/info2\x80\x04\n" + + "\x0eAnalysisDevice\x12Y\n" + + "\tFaceLogin\x12\x16.analysis.FaceLoginReq\x1a\x12.analysis.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/device/v1/login/face\x12^\n" + "\x06Policy\x12\x19.analysis.DevicePolicyReq\x1a\x12.analysis.Response\"%\x82\xd3\xe4\x93\x02\x1f:\x01*\"\x1a/device/v1/analysis/policy\x12a\n" + "\aDisplay\x12\x1a.analysis.DeviceDisplayReq\x1a\x12.analysis.Response\"&\x82\xd3\xe4\x93\x02 :\x01*\"\x1b/device/v1/analysis/display\x12l\n" + "\vOssCallback\x12\x18.analysis.OssCallbackReq\x1a\x19.analysis.OssCallbackResp\"(\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/api/v2/analysis/oss/callback\x12b\n" + "\n" + - "PyCallback\x12\x17.analysis.PyCallbackReq\x1a\x12.analysis.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v2/analysis/py/callbackB\x1cZ\x1alone-services/rpc/analysisb\x06proto3" + "PyCallback\x12\x17.analysis.PyCallbackReq\x1a\x12.analysis.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v2/analysis/py/callback2\xcd\x02\n" + + "\rAnalysisAdmin\x12c\n" + + "\bUserList\x12\x1a.analysis.AdminUserListReq\x1a\x12.analysis.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/admin/v2/analysis/user/list\x12l\n" + + "\vUserArchive\x12\x1d.analysis.AdminUserArchiveReq\x1a\x12.analysis.Response\"*\x82\xd3\xe4\x93\x02$:\x01*\"\x1f/admin/v2/analysis/user/archive\x12i\n" + + "\n" + + "UserDetail\x12\x1c.analysis.AdminUserDetailReq\x1a\x12.analysis.Response\")\x82\xd3\xe4\x93\x02#:\x01*\"\x1e/admin/v2/analysis/user/detailB\x1cZ\x1alone-services/rpc/analysisb\x06proto3" var ( file_analysis_analysis_proto_rawDescOnce sync.Once @@ -2417,7 +2663,7 @@ func file_analysis_analysis_proto_rawDescGZIP() []byte { return file_analysis_analysis_proto_rawDescData } -var file_analysis_analysis_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_analysis_analysis_proto_msgTypes = make([]protoimpl.MessageInfo, 48) var file_analysis_analysis_proto_goTypes = []any{ (*Response)(nil), // 0: analysis.Response (*InternalCreateUserReq)(nil), // 1: analysis.InternalCreateUserReq @@ -2463,6 +2709,10 @@ var file_analysis_analysis_proto_goTypes = []any{ (*ImagesDateReq)(nil), // 41: analysis.ImagesDateReq (*ImagesListReq)(nil), // 42: analysis.ImagesListReq (*DeviceUpdateReq)(nil), // 43: analysis.DeviceUpdateReq + (*AdminUserListReq)(nil), // 44: analysis.AdminUserListReq + (*AdminUserArchiveReq)(nil), // 45: analysis.AdminUserArchiveReq + (*AdminUserDetailReq)(nil), // 46: analysis.AdminUserDetailReq + (*FaceLoginReq)(nil), // 47: analysis.FaceLoginReq } var file_analysis_analysis_proto_depIdxs = []int32{ 1, // 0: analysis.Analysis.InternalCreateUser:input_type -> analysis.InternalCreateUserReq @@ -2504,55 +2754,63 @@ var file_analysis_analysis_proto_depIdxs = []int32{ 15, // 36: analysis.AnalysisStore.StoreUserList:input_type -> analysis.StoreUserListReq 16, // 37: analysis.AnalysisStore.StoreUserUpdate:input_type -> analysis.StoreUserUpdateReq 17, // 38: analysis.AnalysisStore.StoreUserInfo:input_type -> analysis.StoreUserInfoReq - 24, // 39: analysis.AnalysisDevice.Policy:input_type -> analysis.DevicePolicyReq - 25, // 40: analysis.AnalysisDevice.Display:input_type -> analysis.DeviceDisplayReq - 26, // 41: analysis.AnalysisDevice.OssCallback:input_type -> analysis.OssCallbackReq - 28, // 42: analysis.AnalysisDevice.PyCallback:input_type -> analysis.PyCallbackReq - 2, // 43: analysis.Analysis.InternalCreateUser:output_type -> analysis.InternalCreateUserData - 4, // 44: analysis.Analysis.InternalSetRegistered:output_type -> analysis.InternalSetRegisteredData - 0, // 45: analysis.Analysis.AgreementInfo:output_type -> analysis.Response - 0, // 46: analysis.Analysis.Switch:output_type -> analysis.Response - 0, // 47: analysis.Analysis.QrcodeInfo:output_type -> analysis.Response - 0, // 48: analysis.Analysis.Log:output_type -> analysis.Response - 0, // 49: analysis.Analysis.Overview:output_type -> analysis.Response - 0, // 50: analysis.Analysis.User:output_type -> analysis.Response - 0, // 51: analysis.Analysis.UserDetail:output_type -> analysis.Response - 0, // 52: analysis.Analysis.UserFacepp:output_type -> analysis.Response - 0, // 53: analysis.Analysis.UserMode:output_type -> analysis.Response - 0, // 54: analysis.Analysis.UserLog:output_type -> analysis.Response - 0, // 55: analysis.Analysis.Banners:output_type -> analysis.Response - 0, // 56: analysis.Analysis.QrcodeShare:output_type -> analysis.Response - 0, // 57: analysis.Analysis.GraphDetail:output_type -> analysis.Response - 0, // 58: analysis.Analysis.FaceppMaps:output_type -> analysis.Response - 0, // 59: analysis.Analysis.FaceppMapBoxes:output_type -> analysis.Response - 0, // 60: analysis.Analysis.FaceppMapBoxDelete:output_type -> analysis.Response - 0, // 61: analysis.Analysis.ImagesDate:output_type -> analysis.Response - 0, // 62: analysis.Analysis.ImagesList:output_type -> analysis.Response - 0, // 63: analysis.Analysis.ModeImage:output_type -> analysis.Response - 0, // 64: analysis.Analysis.DeviceUpdate:output_type -> analysis.Response - 0, // 65: analysis.AnalysisUser.FaceBind:output_type -> analysis.Response - 0, // 66: analysis.AnalysisUser.UserImprove:output_type -> analysis.Response - 0, // 67: analysis.AnalysisUser.UserDelete:output_type -> analysis.Response - 0, // 68: analysis.AnalysisUser.UserAuth:output_type -> analysis.Response - 0, // 69: analysis.AnalysisUser.UserAuthList:output_type -> analysis.Response - 0, // 70: analysis.AnalysisUser.UserAuthDelete:output_type -> analysis.Response - 0, // 71: analysis.AnalysisUser.UserAuthUpdate:output_type -> analysis.Response - 0, // 72: analysis.AnalysisUser.DeviceBind:output_type -> analysis.Response - 0, // 73: analysis.AnalysisUser.DeviceInfo:output_type -> analysis.Response - 0, // 74: analysis.AnalysisUser.UserLogDelete:output_type -> analysis.Response - 0, // 75: analysis.AnalysisUser.UserStatus:output_type -> analysis.Response - 0, // 76: analysis.AnalysisStore.StoreAuth:output_type -> analysis.Response - 0, // 77: analysis.AnalysisStore.StoreAuthQrcode:output_type -> analysis.Response - 0, // 78: analysis.AnalysisStore.StoreInfo:output_type -> analysis.Response - 0, // 79: analysis.AnalysisStore.StoreUserList:output_type -> analysis.Response - 0, // 80: analysis.AnalysisStore.StoreUserUpdate:output_type -> analysis.Response - 0, // 81: analysis.AnalysisStore.StoreUserInfo:output_type -> analysis.Response - 0, // 82: analysis.AnalysisDevice.Policy:output_type -> analysis.Response - 0, // 83: analysis.AnalysisDevice.Display:output_type -> analysis.Response - 27, // 84: analysis.AnalysisDevice.OssCallback:output_type -> analysis.OssCallbackResp - 0, // 85: analysis.AnalysisDevice.PyCallback:output_type -> analysis.Response - 43, // [43:86] is the sub-list for method output_type - 0, // [0:43] is the sub-list for method input_type + 47, // 39: analysis.AnalysisDevice.FaceLogin:input_type -> analysis.FaceLoginReq + 24, // 40: analysis.AnalysisDevice.Policy:input_type -> analysis.DevicePolicyReq + 25, // 41: analysis.AnalysisDevice.Display:input_type -> analysis.DeviceDisplayReq + 26, // 42: analysis.AnalysisDevice.OssCallback:input_type -> analysis.OssCallbackReq + 28, // 43: analysis.AnalysisDevice.PyCallback:input_type -> analysis.PyCallbackReq + 44, // 44: analysis.AnalysisAdmin.UserList:input_type -> analysis.AdminUserListReq + 45, // 45: analysis.AnalysisAdmin.UserArchive:input_type -> analysis.AdminUserArchiveReq + 46, // 46: analysis.AnalysisAdmin.UserDetail:input_type -> analysis.AdminUserDetailReq + 2, // 47: analysis.Analysis.InternalCreateUser:output_type -> analysis.InternalCreateUserData + 4, // 48: analysis.Analysis.InternalSetRegistered:output_type -> analysis.InternalSetRegisteredData + 0, // 49: analysis.Analysis.AgreementInfo:output_type -> analysis.Response + 0, // 50: analysis.Analysis.Switch:output_type -> analysis.Response + 0, // 51: analysis.Analysis.QrcodeInfo:output_type -> analysis.Response + 0, // 52: analysis.Analysis.Log:output_type -> analysis.Response + 0, // 53: analysis.Analysis.Overview:output_type -> analysis.Response + 0, // 54: analysis.Analysis.User:output_type -> analysis.Response + 0, // 55: analysis.Analysis.UserDetail:output_type -> analysis.Response + 0, // 56: analysis.Analysis.UserFacepp:output_type -> analysis.Response + 0, // 57: analysis.Analysis.UserMode:output_type -> analysis.Response + 0, // 58: analysis.Analysis.UserLog:output_type -> analysis.Response + 0, // 59: analysis.Analysis.Banners:output_type -> analysis.Response + 0, // 60: analysis.Analysis.QrcodeShare:output_type -> analysis.Response + 0, // 61: analysis.Analysis.GraphDetail:output_type -> analysis.Response + 0, // 62: analysis.Analysis.FaceppMaps:output_type -> analysis.Response + 0, // 63: analysis.Analysis.FaceppMapBoxes:output_type -> analysis.Response + 0, // 64: analysis.Analysis.FaceppMapBoxDelete:output_type -> analysis.Response + 0, // 65: analysis.Analysis.ImagesDate:output_type -> analysis.Response + 0, // 66: analysis.Analysis.ImagesList:output_type -> analysis.Response + 0, // 67: analysis.Analysis.ModeImage:output_type -> analysis.Response + 0, // 68: analysis.Analysis.DeviceUpdate:output_type -> analysis.Response + 0, // 69: analysis.AnalysisUser.FaceBind:output_type -> analysis.Response + 0, // 70: analysis.AnalysisUser.UserImprove:output_type -> analysis.Response + 0, // 71: analysis.AnalysisUser.UserDelete:output_type -> analysis.Response + 0, // 72: analysis.AnalysisUser.UserAuth:output_type -> analysis.Response + 0, // 73: analysis.AnalysisUser.UserAuthList:output_type -> analysis.Response + 0, // 74: analysis.AnalysisUser.UserAuthDelete:output_type -> analysis.Response + 0, // 75: analysis.AnalysisUser.UserAuthUpdate:output_type -> analysis.Response + 0, // 76: analysis.AnalysisUser.DeviceBind:output_type -> analysis.Response + 0, // 77: analysis.AnalysisUser.DeviceInfo:output_type -> analysis.Response + 0, // 78: analysis.AnalysisUser.UserLogDelete:output_type -> analysis.Response + 0, // 79: analysis.AnalysisUser.UserStatus:output_type -> analysis.Response + 0, // 80: analysis.AnalysisStore.StoreAuth:output_type -> analysis.Response + 0, // 81: analysis.AnalysisStore.StoreAuthQrcode:output_type -> analysis.Response + 0, // 82: analysis.AnalysisStore.StoreInfo:output_type -> analysis.Response + 0, // 83: analysis.AnalysisStore.StoreUserList:output_type -> analysis.Response + 0, // 84: analysis.AnalysisStore.StoreUserUpdate:output_type -> analysis.Response + 0, // 85: analysis.AnalysisStore.StoreUserInfo:output_type -> analysis.Response + 0, // 86: analysis.AnalysisDevice.FaceLogin:output_type -> analysis.Response + 0, // 87: analysis.AnalysisDevice.Policy:output_type -> analysis.Response + 0, // 88: analysis.AnalysisDevice.Display:output_type -> analysis.Response + 27, // 89: analysis.AnalysisDevice.OssCallback:output_type -> analysis.OssCallbackResp + 0, // 90: analysis.AnalysisDevice.PyCallback:output_type -> analysis.Response + 0, // 91: analysis.AnalysisAdmin.UserList:output_type -> analysis.Response + 0, // 92: analysis.AnalysisAdmin.UserArchive:output_type -> analysis.Response + 0, // 93: analysis.AnalysisAdmin.UserDetail:output_type -> analysis.Response + 47, // [47:94] is the sub-list for method output_type + 0, // [0:47] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -2570,9 +2828,9 @@ func file_analysis_analysis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_analysis_analysis_proto_rawDesc), len(file_analysis_analysis_proto_rawDesc)), NumEnums: 0, - NumMessages: 44, + NumMessages: 48, NumExtensions: 0, - NumServices: 4, + NumServices: 5, }, GoTypes: file_analysis_analysis_proto_goTypes, DependencyIndexes: file_analysis_analysis_proto_depIdxs, diff --git a/rpc/analysis/pb/analysis_grpc.pb.go b/rpc/analysis/pb/analysis_grpc.pb.go index ea19e1a..eb962d0 100644 --- a/rpc/analysis/pb/analysis_grpc.pb.go +++ b/rpc/analysis/pb/analysis_grpc.pb.go @@ -1693,6 +1693,7 @@ var AnalysisStore_ServiceDesc = grpc.ServiceDesc{ } const ( + AnalysisDevice_FaceLogin_FullMethodName = "/analysis.AnalysisDevice/FaceLogin" AnalysisDevice_Policy_FullMethodName = "/analysis.AnalysisDevice/Policy" AnalysisDevice_Display_FullMethodName = "/analysis.AnalysisDevice/Display" AnalysisDevice_OssCallback_FullMethodName = "/analysis.AnalysisDevice/OssCallback" @@ -1703,6 +1704,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AnalysisDeviceClient interface { + FaceLogin(ctx context.Context, in *FaceLoginReq, opts ...grpc.CallOption) (*Response, error) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) Display(ctx context.Context, in *DeviceDisplayReq, opts ...grpc.CallOption) (*Response, error) OssCallback(ctx context.Context, in *OssCallbackReq, opts ...grpc.CallOption) (*OssCallbackResp, error) @@ -1717,6 +1719,16 @@ func NewAnalysisDeviceClient(cc grpc.ClientConnInterface) AnalysisDeviceClient { return &analysisDeviceClient{cc} } +func (c *analysisDeviceClient) FaceLogin(ctx context.Context, in *FaceLoginReq, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, AnalysisDevice_FaceLogin_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *analysisDeviceClient) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Response) @@ -1761,6 +1773,7 @@ func (c *analysisDeviceClient) PyCallback(ctx context.Context, in *PyCallbackReq // All implementations must embed UnimplementedAnalysisDeviceServer // for forward compatibility. type AnalysisDeviceServer interface { + FaceLogin(context.Context, *FaceLoginReq) (*Response, error) Policy(context.Context, *DevicePolicyReq) (*Response, error) Display(context.Context, *DeviceDisplayReq) (*Response, error) OssCallback(context.Context, *OssCallbackReq) (*OssCallbackResp, error) @@ -1775,6 +1788,9 @@ type AnalysisDeviceServer interface { // pointer dereference when methods are called. type UnimplementedAnalysisDeviceServer struct{} +func (UnimplementedAnalysisDeviceServer) FaceLogin(context.Context, *FaceLoginReq) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method FaceLogin not implemented") +} func (UnimplementedAnalysisDeviceServer) Policy(context.Context, *DevicePolicyReq) (*Response, error) { return nil, status.Error(codes.Unimplemented, "method Policy not implemented") } @@ -1808,6 +1824,24 @@ func RegisterAnalysisDeviceServer(s grpc.ServiceRegistrar, srv AnalysisDeviceSer s.RegisterService(&AnalysisDevice_ServiceDesc, srv) } +func _AnalysisDevice_FaceLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FaceLoginReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalysisDeviceServer).FaceLogin(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AnalysisDevice_FaceLogin_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalysisDeviceServer).FaceLogin(ctx, req.(*FaceLoginReq)) + } + return interceptor(ctx, in, info, handler) +} + func _AnalysisDevice_Policy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DevicePolicyReq) if err := dec(in); err != nil { @@ -1887,6 +1921,10 @@ var AnalysisDevice_ServiceDesc = grpc.ServiceDesc{ ServiceName: "analysis.AnalysisDevice", HandlerType: (*AnalysisDeviceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "FaceLogin", + Handler: _AnalysisDevice_FaceLogin_Handler, + }, { MethodName: "Policy", Handler: _AnalysisDevice_Policy_Handler, @@ -1907,3 +1945,181 @@ var AnalysisDevice_ServiceDesc = grpc.ServiceDesc{ Streams: []grpc.StreamDesc{}, Metadata: "analysis/analysis.proto", } + +const ( + AnalysisAdmin_UserList_FullMethodName = "/analysis.AnalysisAdmin/UserList" + AnalysisAdmin_UserArchive_FullMethodName = "/analysis.AnalysisAdmin/UserArchive" + AnalysisAdmin_UserDetail_FullMethodName = "/analysis.AnalysisAdmin/UserDetail" +) + +// AnalysisAdminClient is the client API for AnalysisAdmin service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AnalysisAdminClient interface { + UserList(ctx context.Context, in *AdminUserListReq, opts ...grpc.CallOption) (*Response, error) + UserArchive(ctx context.Context, in *AdminUserArchiveReq, opts ...grpc.CallOption) (*Response, error) + UserDetail(ctx context.Context, in *AdminUserDetailReq, opts ...grpc.CallOption) (*Response, error) +} + +type analysisAdminClient struct { + cc grpc.ClientConnInterface +} + +func NewAnalysisAdminClient(cc grpc.ClientConnInterface) AnalysisAdminClient { + return &analysisAdminClient{cc} +} + +func (c *analysisAdminClient) UserList(ctx context.Context, in *AdminUserListReq, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, AnalysisAdmin_UserList_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analysisAdminClient) UserArchive(ctx context.Context, in *AdminUserArchiveReq, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, AnalysisAdmin_UserArchive_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *analysisAdminClient) UserDetail(ctx context.Context, in *AdminUserDetailReq, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, AnalysisAdmin_UserDetail_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AnalysisAdminServer is the server API for AnalysisAdmin service. +// All implementations must embed UnimplementedAnalysisAdminServer +// for forward compatibility. +type AnalysisAdminServer interface { + UserList(context.Context, *AdminUserListReq) (*Response, error) + UserArchive(context.Context, *AdminUserArchiveReq) (*Response, error) + UserDetail(context.Context, *AdminUserDetailReq) (*Response, error) + mustEmbedUnimplementedAnalysisAdminServer() +} + +// UnimplementedAnalysisAdminServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAnalysisAdminServer struct{} + +func (UnimplementedAnalysisAdminServer) UserList(context.Context, *AdminUserListReq) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method UserList not implemented") +} +func (UnimplementedAnalysisAdminServer) UserArchive(context.Context, *AdminUserArchiveReq) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method UserArchive not implemented") +} +func (UnimplementedAnalysisAdminServer) UserDetail(context.Context, *AdminUserDetailReq) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method UserDetail not implemented") +} +func (UnimplementedAnalysisAdminServer) mustEmbedUnimplementedAnalysisAdminServer() {} +func (UnimplementedAnalysisAdminServer) testEmbeddedByValue() {} + +// UnsafeAnalysisAdminServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AnalysisAdminServer will +// result in compilation errors. +type UnsafeAnalysisAdminServer interface { + mustEmbedUnimplementedAnalysisAdminServer() +} + +func RegisterAnalysisAdminServer(s grpc.ServiceRegistrar, srv AnalysisAdminServer) { + // If the following call panics, it indicates UnimplementedAnalysisAdminServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&AnalysisAdmin_ServiceDesc, srv) +} + +func _AnalysisAdmin_UserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AdminUserListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalysisAdminServer).UserList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AnalysisAdmin_UserList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalysisAdminServer).UserList(ctx, req.(*AdminUserListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalysisAdmin_UserArchive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AdminUserArchiveReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalysisAdminServer).UserArchive(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AnalysisAdmin_UserArchive_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalysisAdminServer).UserArchive(ctx, req.(*AdminUserArchiveReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _AnalysisAdmin_UserDetail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AdminUserDetailReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AnalysisAdminServer).UserDetail(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AnalysisAdmin_UserDetail_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AnalysisAdminServer).UserDetail(ctx, req.(*AdminUserDetailReq)) + } + return interceptor(ctx, in, info, handler) +} + +// AnalysisAdmin_ServiceDesc is the grpc.ServiceDesc for AnalysisAdmin service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var AnalysisAdmin_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "analysis.AnalysisAdmin", + HandlerType: (*AnalysisAdminServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UserList", + Handler: _AnalysisAdmin_UserList_Handler, + }, + { + MethodName: "UserArchive", + Handler: _AnalysisAdmin_UserArchive_Handler, + }, + { + MethodName: "UserDetail", + Handler: _AnalysisAdmin_UserDetail_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "analysis/analysis.proto", +} diff --git a/rpc/user/pb/user.pb.go b/rpc/user/pb/user.pb.go index bef724c..a4971ca 100644 --- a/rpc/user/pb/user.pb.go +++ b/rpc/user/pb/user.pb.go @@ -1726,6 +1726,118 @@ func (x *InternalUsersByBizData) GetItems() []*BizUserItem { return nil } +type InternalLoginByUserIdReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + ClientCode string `protobuf:"bytes,2,opt,name=client_code,json=clientCode,proto3" json:"client_code,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InternalLoginByUserIdReq) Reset() { + *x = InternalLoginByUserIdReq{} + mi := &file_user_user_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InternalLoginByUserIdReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalLoginByUserIdReq) ProtoMessage() {} + +func (x *InternalLoginByUserIdReq) ProtoReflect() protoreflect.Message { + mi := &file_user_user_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalLoginByUserIdReq.ProtoReflect.Descriptor instead. +func (*InternalLoginByUserIdReq) Descriptor() ([]byte, []int) { + return file_user_user_proto_rawDescGZIP(), []int{26} +} + +func (x *InternalLoginByUserIdReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *InternalLoginByUserIdReq) GetClientCode() string { + if x != nil { + return x.ClientCode + } + return "" +} + +type InternalLoginByUserIdData struct { + state protoimpl.MessageState `protogen:"open.v1"` + AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` + Info string `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InternalLoginByUserIdData) Reset() { + *x = InternalLoginByUserIdData{} + mi := &file_user_user_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InternalLoginByUserIdData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InternalLoginByUserIdData) ProtoMessage() {} + +func (x *InternalLoginByUserIdData) ProtoReflect() protoreflect.Message { + mi := &file_user_user_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InternalLoginByUserIdData.ProtoReflect.Descriptor instead. +func (*InternalLoginByUserIdData) Descriptor() ([]byte, []int) { + return file_user_user_proto_rawDescGZIP(), []int{27} +} + +func (x *InternalLoginByUserIdData) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + +func (x *InternalLoginByUserIdData) GetRefreshToken() string { + if x != nil { + return x.RefreshToken + } + return "" +} + +func (x *InternalLoginByUserIdData) GetInfo() string { + if x != nil { + return x.Info + } + return "" +} + type GetOpenidReq struct { state protoimpl.MessageState `protogen:"open.v1"` Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` @@ -1735,7 +1847,7 @@ type GetOpenidReq struct { func (x *GetOpenidReq) Reset() { *x = GetOpenidReq{} - mi := &file_user_user_proto_msgTypes[26] + mi := &file_user_user_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1747,7 +1859,7 @@ func (x *GetOpenidReq) String() string { func (*GetOpenidReq) ProtoMessage() {} func (x *GetOpenidReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[26] + mi := &file_user_user_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1760,7 +1872,7 @@ func (x *GetOpenidReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetOpenidReq.ProtoReflect.Descriptor instead. func (*GetOpenidReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{26} + return file_user_user_proto_rawDescGZIP(), []int{28} } func (x *GetOpenidReq) GetCode() string { @@ -1779,7 +1891,7 @@ type BindMobileReq struct { func (x *BindMobileReq) Reset() { *x = BindMobileReq{} - mi := &file_user_user_proto_msgTypes[27] + mi := &file_user_user_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1791,7 +1903,7 @@ func (x *BindMobileReq) String() string { func (*BindMobileReq) ProtoMessage() {} func (x *BindMobileReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[27] + mi := &file_user_user_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1804,7 +1916,7 @@ func (x *BindMobileReq) ProtoReflect() protoreflect.Message { // Deprecated: Use BindMobileReq.ProtoReflect.Descriptor instead. func (*BindMobileReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{27} + return file_user_user_proto_rawDescGZIP(), []int{29} } func (x *BindMobileReq) GetCode() string { @@ -1825,7 +1937,7 @@ type RebindMobileReq struct { func (x *RebindMobileReq) Reset() { *x = RebindMobileReq{} - mi := &file_user_user_proto_msgTypes[28] + mi := &file_user_user_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1837,7 +1949,7 @@ func (x *RebindMobileReq) String() string { func (*RebindMobileReq) ProtoMessage() {} func (x *RebindMobileReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[28] + mi := &file_user_user_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1850,7 +1962,7 @@ func (x *RebindMobileReq) ProtoReflect() protoreflect.Message { // Deprecated: Use RebindMobileReq.ProtoReflect.Descriptor instead. func (*RebindMobileReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{28} + return file_user_user_proto_rawDescGZIP(), []int{30} } func (x *RebindMobileReq) GetOldMobile() string { @@ -1882,7 +1994,7 @@ type InfoReq struct { func (x *InfoReq) Reset() { *x = InfoReq{} - mi := &file_user_user_proto_msgTypes[29] + mi := &file_user_user_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1894,7 +2006,7 @@ func (x *InfoReq) String() string { func (*InfoReq) ProtoMessage() {} func (x *InfoReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[29] + mi := &file_user_user_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1907,7 +2019,7 @@ func (x *InfoReq) ProtoReflect() protoreflect.Message { // Deprecated: Use InfoReq.ProtoReflect.Descriptor instead. func (*InfoReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{29} + return file_user_user_proto_rawDescGZIP(), []int{31} } type UpdateReq struct { @@ -1924,7 +2036,7 @@ type UpdateReq struct { func (x *UpdateReq) Reset() { *x = UpdateReq{} - mi := &file_user_user_proto_msgTypes[30] + mi := &file_user_user_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1936,7 +2048,7 @@ func (x *UpdateReq) String() string { func (*UpdateReq) ProtoMessage() {} func (x *UpdateReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[30] + mi := &file_user_user_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1949,7 +2061,7 @@ func (x *UpdateReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateReq.ProtoReflect.Descriptor instead. func (*UpdateReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{30} + return file_user_user_proto_rawDescGZIP(), []int{32} } func (x *UpdateReq) GetName() string { @@ -2004,7 +2116,7 @@ type PasswordReq struct { func (x *PasswordReq) Reset() { *x = PasswordReq{} - mi := &file_user_user_proto_msgTypes[31] + mi := &file_user_user_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2016,7 +2128,7 @@ func (x *PasswordReq) String() string { func (*PasswordReq) ProtoMessage() {} func (x *PasswordReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[31] + mi := &file_user_user_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2029,7 +2141,7 @@ func (x *PasswordReq) ProtoReflect() protoreflect.Message { // Deprecated: Use PasswordReq.ProtoReflect.Descriptor instead. func (*PasswordReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{31} + return file_user_user_proto_rawDescGZIP(), []int{33} } func (x *PasswordReq) GetPassword() string { @@ -2057,7 +2169,7 @@ type ClientReq struct { func (x *ClientReq) Reset() { *x = ClientReq{} - mi := &file_user_user_proto_msgTypes[32] + mi := &file_user_user_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2069,7 +2181,7 @@ func (x *ClientReq) String() string { func (*ClientReq) ProtoMessage() {} func (x *ClientReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[32] + mi := &file_user_user_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2082,7 +2194,7 @@ func (x *ClientReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientReq.ProtoReflect.Descriptor instead. func (*ClientReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{32} + return file_user_user_proto_rawDescGZIP(), []int{34} } func (x *ClientReq) GetName() string { @@ -2115,7 +2227,7 @@ type GenerateQrcodeReq struct { func (x *GenerateQrcodeReq) Reset() { *x = GenerateQrcodeReq{} - mi := &file_user_user_proto_msgTypes[33] + mi := &file_user_user_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2127,7 +2239,7 @@ func (x *GenerateQrcodeReq) String() string { func (*GenerateQrcodeReq) ProtoMessage() {} func (x *GenerateQrcodeReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[33] + mi := &file_user_user_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2140,7 +2252,7 @@ func (x *GenerateQrcodeReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GenerateQrcodeReq.ProtoReflect.Descriptor instead. func (*GenerateQrcodeReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{33} + return file_user_user_proto_rawDescGZIP(), []int{35} } func (x *GenerateQrcodeReq) GetClientCode() string { @@ -2159,7 +2271,7 @@ type QrcodeScanReq struct { func (x *QrcodeScanReq) Reset() { *x = QrcodeScanReq{} - mi := &file_user_user_proto_msgTypes[34] + mi := &file_user_user_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2171,7 +2283,7 @@ func (x *QrcodeScanReq) String() string { func (*QrcodeScanReq) ProtoMessage() {} func (x *QrcodeScanReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[34] + mi := &file_user_user_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2184,7 +2296,7 @@ func (x *QrcodeScanReq) ProtoReflect() protoreflect.Message { // Deprecated: Use QrcodeScanReq.ProtoReflect.Descriptor instead. func (*QrcodeScanReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{34} + return file_user_user_proto_rawDescGZIP(), []int{36} } func (x *QrcodeScanReq) GetSessionId() string { @@ -2204,7 +2316,7 @@ type QrcodeLoginReq struct { func (x *QrcodeLoginReq) Reset() { *x = QrcodeLoginReq{} - mi := &file_user_user_proto_msgTypes[35] + mi := &file_user_user_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2216,7 +2328,7 @@ func (x *QrcodeLoginReq) String() string { func (*QrcodeLoginReq) ProtoMessage() {} func (x *QrcodeLoginReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[35] + mi := &file_user_user_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2229,7 +2341,7 @@ func (x *QrcodeLoginReq) ProtoReflect() protoreflect.Message { // Deprecated: Use QrcodeLoginReq.ProtoReflect.Descriptor instead. func (*QrcodeLoginReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{35} + return file_user_user_proto_rawDescGZIP(), []int{37} } func (x *QrcodeLoginReq) GetSessionId() string { @@ -2387,7 +2499,15 @@ const file_user_user_proto_rawDesc = "" + "\bbirthday\x18\a \x01(\tR\bbirthday\x12\x16\n" + "\x06status\x18\b \x01(\rR\x06status\"A\n" + "\x16InternalUsersByBizData\x12'\n" + - "\x05items\x18\x01 \x03(\v2\x11.user.BizUserItemR\x05items\"\"\n" + + "\x05items\x18\x01 \x03(\v2\x11.user.BizUserItemR\x05items\"T\n" + + "\x18InternalLoginByUserIdReq\x12\x17\n" + + "\auser_id\x18\x01 \x01(\x03R\x06userId\x12\x1f\n" + + "\vclient_code\x18\x02 \x01(\tR\n" + + "clientCode\"w\n" + + "\x19InternalLoginByUserIdData\x12!\n" + + "\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" + + "\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\x12\x12\n" + + "\x04info\x18\x03 \x01(\tR\x04info\"\"\n" + "\fGetOpenidReq\x12\x12\n" + "\x04code\x18\x01 \x01(\tR\x04code\"#\n" + "\rBindMobileReq\x12\x12\n" + @@ -2422,7 +2542,7 @@ const file_user_user_proto_rawDesc = "" + "\x0eQrcodeLoginReq\x12\x1d\n" + "\n" + "session_id\x18\x01 \x01(\tR\tsessionId\x12\x12\n" + - "\x04type\x18\x02 \x01(\x05R\x04type2\xf5\x0e\n" + + "\x04type\x18\x02 \x01(\x05R\x04type2\xcf\x0f\n" + "\x04User\x12F\n" + "\x05Login\x12\x0e.user.LoginReq\x1a\x0e.user.Response\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v3/user/login\x12b\n" + "\x0eGenerateQrcode\x12\x17.user.GenerateQrcodeReq\x1a\x0e.user.Response\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/v3/user/qrcode/generate\x12V\n" + @@ -2449,7 +2569,8 @@ const file_user_user_proto_rawDesc = "" + "\x17InternalRevokeBizClient\x12 .user.InternalRevokeBizClientReq\x1a!.user.InternalRevokeBizClientData\x12R\n" + "\x13InternalGetUserInfo\x12\x1c.user.InternalGetUserInfoReq\x1a\x1d.user.InternalGetUserInfoData\x12[\n" + "\x16InternalVerifyPassword\x12\x1f.user.InternalVerifyPasswordReq\x1a .user.InternalVerifyPasswordData\x12O\n" + - "\x12InternalUsersByBiz\x12\x1b.user.InternalUsersByBizReq\x1a\x1c.user.InternalUsersByBizDataB\x18Z\x16lone-services/rpc/userb\x06proto3" + "\x12InternalUsersByBiz\x12\x1b.user.InternalUsersByBizReq\x1a\x1c.user.InternalUsersByBizData\x12X\n" + + "\x15InternalLoginByUserId\x12\x1e.user.InternalLoginByUserIdReq\x1a\x1f.user.InternalLoginByUserIdDataB\x18Z\x16lone-services/rpc/userb\x06proto3" var ( file_user_user_proto_rawDescOnce sync.Once @@ -2463,7 +2584,7 @@ func file_user_user_proto_rawDescGZIP() []byte { return file_user_user_proto_rawDescData } -var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_user_user_proto_goTypes = []any{ (*Response)(nil), // 0: user.Response (*LoginReq)(nil), // 1: user.LoginReq @@ -2491,31 +2612,33 @@ var file_user_user_proto_goTypes = []any{ (*InternalUsersByBizReq)(nil), // 23: user.InternalUsersByBizReq (*BizUserItem)(nil), // 24: user.BizUserItem (*InternalUsersByBizData)(nil), // 25: user.InternalUsersByBizData - (*GetOpenidReq)(nil), // 26: user.GetOpenidReq - (*BindMobileReq)(nil), // 27: user.BindMobileReq - (*RebindMobileReq)(nil), // 28: user.RebindMobileReq - (*InfoReq)(nil), // 29: user.InfoReq - (*UpdateReq)(nil), // 30: user.UpdateReq - (*PasswordReq)(nil), // 31: user.PasswordReq - (*ClientReq)(nil), // 32: user.ClientReq - (*GenerateQrcodeReq)(nil), // 33: user.GenerateQrcodeReq - (*QrcodeScanReq)(nil), // 34: user.QrcodeScanReq - (*QrcodeLoginReq)(nil), // 35: user.QrcodeLoginReq + (*InternalLoginByUserIdReq)(nil), // 26: user.InternalLoginByUserIdReq + (*InternalLoginByUserIdData)(nil), // 27: user.InternalLoginByUserIdData + (*GetOpenidReq)(nil), // 28: user.GetOpenidReq + (*BindMobileReq)(nil), // 29: user.BindMobileReq + (*RebindMobileReq)(nil), // 30: user.RebindMobileReq + (*InfoReq)(nil), // 31: user.InfoReq + (*UpdateReq)(nil), // 32: user.UpdateReq + (*PasswordReq)(nil), // 33: user.PasswordReq + (*ClientReq)(nil), // 34: user.ClientReq + (*GenerateQrcodeReq)(nil), // 35: user.GenerateQrcodeReq + (*QrcodeScanReq)(nil), // 36: user.QrcodeScanReq + (*QrcodeLoginReq)(nil), // 37: user.QrcodeLoginReq } var file_user_user_proto_depIdxs = []int32{ 7, // 0: user.InternalUsersByIdsData.items:type_name -> user.UserBriefItem 24, // 1: user.InternalUsersByBizData.items:type_name -> user.BizUserItem 1, // 2: user.User.Login:input_type -> user.LoginReq - 33, // 3: user.User.GenerateQrcode:input_type -> user.GenerateQrcodeReq - 34, // 4: user.User.QrcodeScan:input_type -> user.QrcodeScanReq - 35, // 5: user.User.QrcodeLogin:input_type -> user.QrcodeLoginReq - 29, // 6: user.User.Info:input_type -> user.InfoReq - 30, // 7: user.User.Update:input_type -> user.UpdateReq - 31, // 8: user.User.Password:input_type -> user.PasswordReq - 26, // 9: user.User.GetOpenid:input_type -> user.GetOpenidReq - 27, // 10: user.User.BindMobile:input_type -> user.BindMobileReq - 28, // 11: user.User.RebindMobile:input_type -> user.RebindMobileReq - 32, // 12: user.User.Client:input_type -> user.ClientReq + 35, // 3: user.User.GenerateQrcode:input_type -> user.GenerateQrcodeReq + 36, // 4: user.User.QrcodeScan:input_type -> user.QrcodeScanReq + 37, // 5: user.User.QrcodeLogin:input_type -> user.QrcodeLoginReq + 31, // 6: user.User.Info:input_type -> user.InfoReq + 32, // 7: user.User.Update:input_type -> user.UpdateReq + 33, // 8: user.User.Password:input_type -> user.PasswordReq + 28, // 9: user.User.GetOpenid:input_type -> user.GetOpenidReq + 29, // 10: user.User.BindMobile:input_type -> user.BindMobileReq + 30, // 11: user.User.RebindMobile:input_type -> user.RebindMobileReq + 34, // 12: user.User.Client:input_type -> user.ClientReq 2, // 13: user.User.UserItems:input_type -> user.UserItemsReq 3, // 14: user.User.UserStatus:input_type -> user.UserStatusReq 4, // 15: user.User.InternalCreate:input_type -> user.InternalCreateReq @@ -2528,31 +2651,33 @@ var file_user_user_proto_depIdxs = []int32{ 19, // 22: user.User.InternalGetUserInfo:input_type -> user.InternalGetUserInfoReq 21, // 23: user.User.InternalVerifyPassword:input_type -> user.InternalVerifyPasswordReq 23, // 24: user.User.InternalUsersByBiz:input_type -> user.InternalUsersByBizReq - 0, // 25: user.User.Login:output_type -> user.Response - 0, // 26: user.User.GenerateQrcode:output_type -> user.Response - 0, // 27: user.User.QrcodeScan:output_type -> user.Response - 0, // 28: user.User.QrcodeLogin:output_type -> user.Response - 0, // 29: user.User.Info:output_type -> user.Response - 0, // 30: user.User.Update:output_type -> user.Response - 0, // 31: user.User.Password:output_type -> user.Response - 0, // 32: user.User.GetOpenid:output_type -> user.Response - 0, // 33: user.User.BindMobile:output_type -> user.Response - 0, // 34: user.User.RebindMobile:output_type -> user.Response - 0, // 35: user.User.Client:output_type -> user.Response - 0, // 36: user.User.UserItems:output_type -> user.Response - 0, // 37: user.User.UserStatus:output_type -> user.Response - 5, // 38: user.User.InternalCreate:output_type -> user.InternalCreateData - 14, // 39: user.User.InternalCheckCreate:output_type -> user.InternalCheckCreateData - 16, // 40: user.User.InternalCheckUpdate:output_type -> user.InternalCheckUpdateData - 18, // 41: user.User.InternalUpdate:output_type -> user.InternalUpdateData - 8, // 42: user.User.InternalUsersByIds:output_type -> user.InternalUsersByIdsData - 10, // 43: user.User.InternalUpdateMobile:output_type -> user.InternalUpdateMobileData - 12, // 44: user.User.InternalRevokeBizClient:output_type -> user.InternalRevokeBizClientData - 20, // 45: user.User.InternalGetUserInfo:output_type -> user.InternalGetUserInfoData - 22, // 46: user.User.InternalVerifyPassword:output_type -> user.InternalVerifyPasswordData - 25, // 47: user.User.InternalUsersByBiz:output_type -> user.InternalUsersByBizData - 25, // [25:48] is the sub-list for method output_type - 2, // [2:25] is the sub-list for method input_type + 26, // 25: user.User.InternalLoginByUserId:input_type -> user.InternalLoginByUserIdReq + 0, // 26: user.User.Login:output_type -> user.Response + 0, // 27: user.User.GenerateQrcode:output_type -> user.Response + 0, // 28: user.User.QrcodeScan:output_type -> user.Response + 0, // 29: user.User.QrcodeLogin:output_type -> user.Response + 0, // 30: user.User.Info:output_type -> user.Response + 0, // 31: user.User.Update:output_type -> user.Response + 0, // 32: user.User.Password:output_type -> user.Response + 0, // 33: user.User.GetOpenid:output_type -> user.Response + 0, // 34: user.User.BindMobile:output_type -> user.Response + 0, // 35: user.User.RebindMobile:output_type -> user.Response + 0, // 36: user.User.Client:output_type -> user.Response + 0, // 37: user.User.UserItems:output_type -> user.Response + 0, // 38: user.User.UserStatus:output_type -> user.Response + 5, // 39: user.User.InternalCreate:output_type -> user.InternalCreateData + 14, // 40: user.User.InternalCheckCreate:output_type -> user.InternalCheckCreateData + 16, // 41: user.User.InternalCheckUpdate:output_type -> user.InternalCheckUpdateData + 18, // 42: user.User.InternalUpdate:output_type -> user.InternalUpdateData + 8, // 43: user.User.InternalUsersByIds:output_type -> user.InternalUsersByIdsData + 10, // 44: user.User.InternalUpdateMobile:output_type -> user.InternalUpdateMobileData + 12, // 45: user.User.InternalRevokeBizClient:output_type -> user.InternalRevokeBizClientData + 20, // 46: user.User.InternalGetUserInfo:output_type -> user.InternalGetUserInfoData + 22, // 47: user.User.InternalVerifyPassword:output_type -> user.InternalVerifyPasswordData + 25, // 48: user.User.InternalUsersByBiz:output_type -> user.InternalUsersByBizData + 27, // 49: user.User.InternalLoginByUserId:output_type -> user.InternalLoginByUserIdData + 26, // [26:50] is the sub-list for method output_type + 2, // [2:26] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -2569,7 +2694,7 @@ func file_user_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_user_user_proto_rawDesc), len(file_user_user_proto_rawDesc)), NumEnums: 0, - NumMessages: 36, + NumMessages: 38, NumExtensions: 0, NumServices: 1, }, diff --git a/rpc/user/pb/user_grpc.pb.go b/rpc/user/pb/user_grpc.pb.go index 2cf5a3b..9dd65ff 100644 --- a/rpc/user/pb/user_grpc.pb.go +++ b/rpc/user/pb/user_grpc.pb.go @@ -42,6 +42,7 @@ const ( User_InternalGetUserInfo_FullMethodName = "/user.User/InternalGetUserInfo" User_InternalVerifyPassword_FullMethodName = "/user.User/InternalVerifyPassword" User_InternalUsersByBiz_FullMethodName = "/user.User/InternalUsersByBiz" + User_InternalLoginByUserId_FullMethodName = "/user.User/InternalLoginByUserId" ) // UserClient is the client API for User service. @@ -71,6 +72,7 @@ type UserClient interface { InternalGetUserInfo(ctx context.Context, in *InternalGetUserInfoReq, opts ...grpc.CallOption) (*InternalGetUserInfoData, error) InternalVerifyPassword(ctx context.Context, in *InternalVerifyPasswordReq, opts ...grpc.CallOption) (*InternalVerifyPasswordData, error) InternalUsersByBiz(ctx context.Context, in *InternalUsersByBizReq, opts ...grpc.CallOption) (*InternalUsersByBizData, error) + InternalLoginByUserId(ctx context.Context, in *InternalLoginByUserIdReq, opts ...grpc.CallOption) (*InternalLoginByUserIdData, error) } type userClient struct { @@ -311,6 +313,16 @@ func (c *userClient) InternalUsersByBiz(ctx context.Context, in *InternalUsersBy return out, nil } +func (c *userClient) InternalLoginByUserId(ctx context.Context, in *InternalLoginByUserIdReq, opts ...grpc.CallOption) (*InternalLoginByUserIdData, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(InternalLoginByUserIdData) + err := c.cc.Invoke(ctx, User_InternalLoginByUserId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // UserServer is the server API for User service. // All implementations must embed UnimplementedUserServer // for forward compatibility. @@ -338,6 +350,7 @@ type UserServer interface { InternalGetUserInfo(context.Context, *InternalGetUserInfoReq) (*InternalGetUserInfoData, error) InternalVerifyPassword(context.Context, *InternalVerifyPasswordReq) (*InternalVerifyPasswordData, error) InternalUsersByBiz(context.Context, *InternalUsersByBizReq) (*InternalUsersByBizData, error) + InternalLoginByUserId(context.Context, *InternalLoginByUserIdReq) (*InternalLoginByUserIdData, error) mustEmbedUnimplementedUserServer() } @@ -417,6 +430,9 @@ func (UnimplementedUserServer) InternalVerifyPassword(context.Context, *Internal func (UnimplementedUserServer) InternalUsersByBiz(context.Context, *InternalUsersByBizReq) (*InternalUsersByBizData, error) { return nil, status.Error(codes.Unimplemented, "method InternalUsersByBiz not implemented") } +func (UnimplementedUserServer) InternalLoginByUserId(context.Context, *InternalLoginByUserIdReq) (*InternalLoginByUserIdData, error) { + return nil, status.Error(codes.Unimplemented, "method InternalLoginByUserId not implemented") +} func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {} func (UnimplementedUserServer) testEmbeddedByValue() {} @@ -852,6 +868,24 @@ func _User_InternalUsersByBiz_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _User_InternalLoginByUserId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InternalLoginByUserIdReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).InternalLoginByUserId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: User_InternalLoginByUserId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).InternalLoginByUserId(ctx, req.(*InternalLoginByUserIdReq)) + } + return interceptor(ctx, in, info, handler) +} + // User_ServiceDesc is the grpc.ServiceDesc for User service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -951,6 +985,10 @@ var User_ServiceDesc = grpc.ServiceDesc{ MethodName: "InternalUsersByBiz", Handler: _User_InternalUsersByBiz_Handler, }, + { + MethodName: "InternalLoginByUserId", + Handler: _User_InternalLoginByUserId_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user.proto", diff --git a/rpc/user/user.pb b/rpc/user/user.pb index 83da1f0..0e3a97d 100644 Binary files a/rpc/user/user.pb and b/rpc/user/user.pb differ diff --git a/rpc/user/user.proto b/rpc/user/user.proto index 400f553..2619138 100644 --- a/rpc/user/user.proto +++ b/rpc/user/user.proto @@ -95,6 +95,7 @@ service User { rpc InternalGetUserInfo(InternalGetUserInfoReq) returns (InternalGetUserInfoData); rpc InternalVerifyPassword(InternalVerifyPasswordReq) returns (InternalVerifyPasswordData); rpc InternalUsersByBiz(InternalUsersByBizReq) returns (InternalUsersByBizData); + rpc InternalLoginByUserId(InternalLoginByUserIdReq) returns (InternalLoginByUserIdData); } message Response { @@ -271,6 +272,17 @@ message InternalUsersByBizData { repeated BizUserItem items = 1; } +message InternalLoginByUserIdReq { + int64 user_id = 1; + string client_code = 2; +} + +message InternalLoginByUserIdData { + string access_token = 1; + string refresh_token = 2; + string info = 3; +} + message GetOpenidReq { string code = 1; } diff --git a/services/analysis/analysis.go b/services/analysis/analysis.go index 91b3532..942821b 100644 --- a/services/analysis/analysis.go +++ b/services/analysis/analysis.go @@ -14,7 +14,9 @@ import ( "lone-services/pkg/validate" analysis "lone-services/rpc/analysis/pb" "lone-services/services/analysis/internal/config" + "lone-services/services/analysis/internal/face" analysisserver "lone-services/services/analysis/internal/server/analysis" + analysisadminserver "lone-services/services/analysis/internal/server/analysisadmin" analysisdeviceserver "lone-services/services/analysis/internal/server/analysisdevice" analysisstoreserver "lone-services/services/analysis/internal/server/analysisstore" analysisuserserver "lone-services/services/analysis/internal/server/analysisuser" @@ -125,6 +127,11 @@ func main() { debug := utils.GetConfigBool("mysql.debug") modelbase.Init(db, modelbase.Config{Prefix: utils.GetConfigString("mysql.prefix"), Debug: debug}) + if err := face.InitMilvus(); err != nil { + logx.Errorf("milvus init: %v", err) + } + defer face.CloseMilvus() + rpcConf := zrpc.RpcServerConf{ ListenOn: listenOn, } @@ -137,6 +144,7 @@ func main() { analysis.RegisterAnalysisUserServer(grpcServer, analysisuserserver.NewAnalysisUserServer(ctx)) analysis.RegisterAnalysisStoreServer(grpcServer, analysisstoreserver.NewAnalysisStoreServer(ctx)) analysis.RegisterAnalysisDeviceServer(grpcServer, analysisdeviceserver.NewAnalysisDeviceServer(ctx)) + analysis.RegisterAnalysisAdminServer(grpcServer, analysisadminserver.NewAnalysisAdminServer(ctx)) if mode == service.DevMode || mode == service.TestMode { reflection.Register(grpcServer) } diff --git a/services/analysis/client/analysisadmin/analysisAdmin.go b/services/analysis/client/analysisadmin/analysisAdmin.go new file mode 100644 index 0000000..e59b706 --- /dev/null +++ b/services/analysis/client/analysisadmin/analysisAdmin.go @@ -0,0 +1,52 @@ +// Code generated by goctl. DO NOT EDIT. +// goctl 1.10.1 +// Source: analysis.proto + +package analysisadmin + +import ( + "context" + + "lone-services/rpc/analysis/pb" + + "github.com/zeromicro/go-zero/zrpc" + "google.golang.org/grpc" +) + +type ( + AdminUserArchiveReq = analysis.AdminUserArchiveReq + AdminUserDetailReq = analysis.AdminUserDetailReq + AdminUserListReq = analysis.AdminUserListReq + Response = analysis.Response + + AnalysisAdmin interface { + UserList(ctx context.Context, in *AdminUserListReq, opts ...grpc.CallOption) (*Response, error) + UserArchive(ctx context.Context, in *AdminUserArchiveReq, opts ...grpc.CallOption) (*Response, error) + UserDetail(ctx context.Context, in *AdminUserDetailReq, opts ...grpc.CallOption) (*Response, error) + } + + defaultAnalysisAdmin struct { + cli zrpc.Client + } +) + +func NewAnalysisAdmin(cli zrpc.Client) AnalysisAdmin { + return &defaultAnalysisAdmin{ + cli: cli, + } +} + +func (m *defaultAnalysisAdmin) UserList(ctx context.Context, in *AdminUserListReq, opts ...grpc.CallOption) (*Response, error) { + client := analysis.NewAnalysisAdminClient(m.cli.Conn()) + return client.UserList(ctx, in, opts...) +} + +func (m *defaultAnalysisAdmin) UserArchive(ctx context.Context, in *AdminUserArchiveReq, opts ...grpc.CallOption) (*Response, error) { + client := analysis.NewAnalysisAdminClient(m.cli.Conn()) + return client.UserArchive(ctx, in, opts...) +} + +func (m *defaultAnalysisAdmin) UserDetail(ctx context.Context, in *AdminUserDetailReq, opts ...grpc.CallOption) (*Response, error) { + client := analysis.NewAnalysisAdminClient(m.cli.Conn()) + return client.UserDetail(ctx, in, opts...) +} diff --git a/services/analysis/client/analysisdevice/analysisDevice.go b/services/analysis/client/analysisdevice/analysisDevice.go index 65b57a8..1389182 100644 --- a/services/analysis/client/analysisdevice/analysisDevice.go +++ b/services/analysis/client/analysisdevice/analysisDevice.go @@ -16,12 +16,14 @@ import ( type ( DeviceDisplayReq = analysis.DeviceDisplayReq DevicePolicyReq = analysis.DevicePolicyReq + FaceLoginReq = analysis.FaceLoginReq OssCallbackReq = analysis.OssCallbackReq OssCallbackResp = analysis.OssCallbackResp PyCallbackReq = analysis.PyCallbackReq Response = analysis.Response AnalysisDevice interface { + FaceLogin(ctx context.Context, in *FaceLoginReq, opts ...grpc.CallOption) (*Response, error) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) Display(ctx context.Context, in *DeviceDisplayReq, opts ...grpc.CallOption) (*Response, error) OssCallback(ctx context.Context, in *OssCallbackReq, opts ...grpc.CallOption) (*OssCallbackResp, error) @@ -39,6 +41,11 @@ func NewAnalysisDevice(cli zrpc.Client) AnalysisDevice { } } +func (m *defaultAnalysisDevice) FaceLogin(ctx context.Context, in *FaceLoginReq, opts ...grpc.CallOption) (*Response, error) { + client := analysis.NewAnalysisDeviceClient(m.cli.Conn()) + return client.FaceLogin(ctx, in, opts...) +} + func (m *defaultAnalysisDevice) Policy(ctx context.Context, in *DevicePolicyReq, opts ...grpc.CallOption) (*Response, error) { client := analysis.NewAnalysisDeviceClient(m.cli.Conn()) return client.Policy(ctx, in, opts...) diff --git a/services/analysis/internal/dao/user.go b/services/analysis/internal/dao/user.go index cd146a9..ad4b5c1 100644 --- a/services/analysis/internal/dao/user.go +++ b/services/analysis/internal/dao/user.go @@ -19,3 +19,17 @@ type UserCreate struct { IsFaceVerified uint8 `gorm:"column:is_face_verified" json:"is_face_verified"` IsProfileCompleted uint8 `gorm:"column:is_profile_completed" json:"is_profile_completed"` } + +type AdminUserListItem struct { + Id int64 `json:"id"` + Name string `json:"name"` + Avatar string `json:"avatar"` + Mobile string `json:"mobile"` + Gender uint32 `json:"gender"` + GenderText string `json:"gender_text"` + Birthday string `json:"birthday"` + Age string `json:"age"` + Status int `json:"status"` + DetectionNumber int `json:"detection_number"` + CreatedAt utils.CustomTime `json:"created_at"` +} diff --git a/services/analysis/internal/face/image.go b/services/analysis/internal/face/image.go new file mode 100644 index 0000000..a7d03d7 --- /dev/null +++ b/services/analysis/internal/face/image.go @@ -0,0 +1,82 @@ +package face + +import ( + "fmt" + "io" + "net/http" + "os" + "path/filepath" + "strings" + "time" + + "lone-services/pkg/utils" + + "github.com/google/uuid" +) + +// PrepareImagePath 将上传字节或已有路径解析为 insightface 可读的本地路径。 +// 返回 cleanup 用于删除临时文件(共享路径不删)。 +func PrepareImagePath(file []byte, filePath string) (string, func(), error) { + noop := func() {} + if len(file) > utils.NumberZero { + dir := utils.GetConfigString("file.upload_path") + if dir == utils.StringEmpty { + dir = os.TempDir() + } + if err := os.MkdirAll(dir, 0o755); err != nil { + return "", noop, err + } + path := filepath.Join(dir, "face-login-"+uuid.NewString()+".jpg") + if err := os.WriteFile(path, file, 0o644); err != nil { + return "", noop, err + } + return path, func() { _ = os.Remove(path) }, nil + } + + path := strings.TrimSpace(filePath) + if path == utils.StringEmpty { + return "", noop, fmt.Errorf("file or file_path required") + } + if strings.HasPrefix(path, "http://") || strings.HasPrefix(path, "https://") { + local, err := downloadToTemp(path) + if err != nil { + return "", noop, err + } + return local, func() { _ = os.Remove(local) }, nil + } + if filepath.IsAbs(path) { + return path, noop, nil + } + base := utils.GetConfigString("file.upload_path") + return filepath.Join(base, strings.TrimPrefix(path, "/")), noop, nil +} + +func downloadToTemp(url string) (string, error) { + client := &http.Client{Timeout: 15 * time.Second} + resp, err := client.Get(url) + if err != nil { + return "", err + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return "", fmt.Errorf("download face image status %d", resp.StatusCode) + } + dir := utils.GetConfigString("file.upload_path") + if dir == utils.StringEmpty { + dir = os.TempDir() + } + if err = os.MkdirAll(dir, 0o755); err != nil { + return "", err + } + path := filepath.Join(dir, "face-dl-"+uuid.NewString()+".jpg") + f, err := os.Create(path) + if err != nil { + return "", err + } + defer f.Close() + if _, err = io.Copy(f, resp.Body); err != nil { + _ = os.Remove(path) + return "", err + } + return path, nil +} diff --git a/services/analysis/internal/face/insightface.go b/services/analysis/internal/face/insightface.go new file mode 100644 index 0000000..0debcbf --- /dev/null +++ b/services/analysis/internal/face/insightface.go @@ -0,0 +1,65 @@ +package face + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "strings" + "time" + + "lone-services/pkg/utils" +) + +const faceEmbeddingDim = 512 + +type insightFaceResp struct { + Embedding []float32 `json:"embedding"` + Error string `json:"error"` +} + +func GetFaceVector(imagePath string) ([]float32, error) { + host := utils.GetConfigString("services.skin_py_face_host") + apiPath := utils.GetConfigString("services.skin_py_face_path") + if host == utils.StringEmpty || apiPath == utils.StringEmpty { + return nil, fmt.Errorf("insightface config empty") + } + url := strings.TrimRight(host, "/") + apiPath + + body, err := json.Marshal(map[string]string{"path": imagePath}) + if err != nil { + return nil, fmt.Errorf("marshal request: %w", err) + } + req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(body)) + if err != nil { + return nil, fmt.Errorf("create request: %w", err) + } + req.Header.Set("Content-Type", "application/json") + + client := &http.Client{Timeout: 10 * time.Second} + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf("request failed: %w", err) + } + defer resp.Body.Close() + + respBody, err := io.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("read response: %w", err) + } + if resp.StatusCode != http.StatusOK { + var errResp insightFaceResp + _ = json.Unmarshal(respBody, &errResp) + return nil, fmt.Errorf("face extraction failed (status %d): %s", resp.StatusCode, errResp.Error) + } + + var result insightFaceResp + if err = json.Unmarshal(respBody, &result); err != nil { + return nil, fmt.Errorf("parse response: %w", err) + } + if len(result.Embedding) != faceEmbeddingDim { + return nil, fmt.Errorf("invalid embedding dimension: %d", len(result.Embedding)) + } + return result.Embedding, nil +} diff --git a/services/analysis/internal/face/milvus.go b/services/analysis/internal/face/milvus.go new file mode 100644 index 0000000..0334f47 --- /dev/null +++ b/services/analysis/internal/face/milvus.go @@ -0,0 +1,191 @@ +package face + +import ( + "context" + "errors" + "fmt" + "strings" + "sync" + + "lone-services/pkg/utils" + + "github.com/milvus-io/milvus-sdk-go/v2/client" + "github.com/milvus-io/milvus-sdk-go/v2/entity" + "github.com/zeromicro/go-zero/core/logx" +) + +const ( + collectionName = "face_vectors" + faceVectorField = "face_vector" + faceUserIDField = "user_id" + searchTopK = 1 + similarityMin = float32(0.55) + hnswM = 16 + hnswEfConstruct = 200 + hnswEf = 64 + collectionShards = 2 +) + +var ( + milvusMu sync.RWMutex + milvusClient client.Client +) + +func InitMilvus() error { + ctx := context.Background() + host := utils.GetConfigString("milvus.milvus_host") + port := utils.GetConfigString("milvus.milvus_grpc_port") + if host == utils.StringEmpty || port == utils.StringEmpty { + return fmt.Errorf("milvus config empty") + } + address := fmt.Sprintf("%s:%s", host, port) + c, err := client.NewGrpcClient(ctx, address) + if err != nil { + return fmt.Errorf("connect milvus %s: %w", address, err) + } + if err = ensureCollection(ctx, c); err != nil { + _ = c.Close() + return err + } + if err = ensureIndex(ctx, c); err != nil { + _ = c.Close() + return err + } + if err = c.LoadCollection(ctx, collectionName, false); err != nil { + _ = c.Close() + return err + } + + milvusMu.Lock() + if milvusClient != nil { + _ = milvusClient.Close() + } + milvusClient = c + milvusMu.Unlock() + logx.Infof("milvus connected: %s", address) + return nil +} + +func CloseMilvus() { + milvusMu.Lock() + defer milvusMu.Unlock() + if milvusClient != nil { + _ = milvusClient.Close() + milvusClient = nil + } +} + +func getMilvus() client.Client { + milvusMu.RLock() + defer milvusMu.RUnlock() + return milvusClient +} + +func ensureCollection(ctx context.Context, c client.Client) error { + has, err := c.HasCollection(ctx, collectionName) + if err != nil { + return err + } + if has { + return nil + } + schema := &entity.Schema{ + CollectionName: collectionName, + Description: "user face vectors (ArcFace 512d)", + AutoID: false, + Fields: []*entity.Field{ + { + Name: faceUserIDField, + DataType: entity.FieldTypeInt64, + PrimaryKey: true, + }, + { + Name: faceVectorField, + DataType: entity.FieldTypeFloatVector, + TypeParams: map[string]string{ + "dim": fmt.Sprintf("%d", faceEmbeddingDim), + }, + }, + }, + } + return c.CreateCollection(ctx, schema, int32(collectionShards)) +} + +func ensureIndex(ctx context.Context, c client.Client) error { + indexes, err := c.DescribeIndex(ctx, collectionName, faceVectorField) + if err != nil { + if !strings.Contains(err.Error(), "index not found") { + return err + } + } else if len(indexes) > utils.NumberZero { + return nil + } + idx, err := entity.NewIndexHNSW(entity.IP, hnswM, hnswEfConstruct) + if err != nil { + return err + } + return c.CreateIndex(ctx, collectionName, faceVectorField, idx, false) +} + +func UpsertFace(userID int64, vector []float32) error { + c := getMilvus() + if c == nil { + return errors.New("milvus client is nil") + } + if userID < utils.NumberOne || len(vector) != faceEmbeddingDim { + return errors.New("invalid face upsert args") + } + ctx := context.Background() + _ = c.Delete(ctx, collectionName, "", fmt.Sprintf("%s == %d", faceUserIDField, userID)) + _, err := c.Insert(ctx, collectionName, "", + entity.NewColumnInt64(faceUserIDField, []int64{userID}), + entity.NewColumnFloatVector(faceVectorField, faceEmbeddingDim, [][]float32{vector}), + ) + return err +} + +func SearchUser(vector []float32) (int64, float32, error) { + c := getMilvus() + if c == nil { + return 0, 0, errors.New("milvus client is nil") + } + if len(vector) != faceEmbeddingDim { + return 0, 0, errors.New("invalid face vector") + } + ctx := context.Background() + searchParam, err := entity.NewIndexHNSWSearchParam(hnswEf) + if err != nil { + return 0, 0, err + } + result, err := c.Search( + ctx, + collectionName, + nil, + "", + []string{faceUserIDField}, + []entity.Vector{entity.FloatVector(vector)}, + faceVectorField, + entity.IP, + searchTopK, + searchParam, + ) + if err != nil { + return 0, 0, err + } + if len(result) == utils.NumberZero || result[0].IDs.Len() == utils.NumberZero { + return 0, 0, errors.New("face not found") + } + ids, ok := result[0].IDs.(*entity.ColumnInt64) + if !ok { + return 0, 0, errors.New("invalid milvus id column") + } + userID, err := ids.ValueByIdx(0) + if err != nil { + return 0, 0, err + } + score := result[0].Scores[0] + if score < similarityMin { + return 0, score, errors.New("face similarity too low") + } + return userID, score, nil +} diff --git a/services/analysis/internal/logic/analysisadmin/helpers.go b/services/analysis/internal/logic/analysisadmin/helpers.go new file mode 100644 index 0000000..c4a9a10 --- /dev/null +++ b/services/analysis/internal/logic/analysisadmin/helpers.go @@ -0,0 +1,160 @@ +package analysisadminlogic + +import ( + "strconv" + "strings" + + "lone-services/pkg/modelbase" + "lone-services/pkg/utils" + analysis "lone-services/rpc/analysis/pb" + "lone-services/services/analysis/internal/dao" + "lone-services/services/analysis/internal/logic/common" + "lone-services/services/analysis/internal/model" + + jsoniter "github.com/json-iterator/go" +) + +const adminImageTimeLayout = "2006-01-02 15:04" + +func outParams(msg string) *analysis.Response { + return common.OutResponse(utils.ErrorParams, msg) +} + +func formatGender(gender uint32) string { + switch gender { + case 1: + return "男" + case 2: + return "女" + default: + return "" + } +} + +func userStatus(row dao.User) int { + status := utils.NumberOne + if row.IsRegistered == uint8(utils.StatusOk) { + status = utils.NumberTwo + } + if row.IsFaceVerified == uint8(utils.StatusOk) { + status = utils.NumberThree + } + if row.IsProfileCompleted == uint8(utils.StatusOk) { + status = utils.NumberFour + } + return status +} + +func idStrings(ids []int64) []string { + out := make([]string, 0, len(ids)) + for _, id := range ids { + if id < utils.NumberOne { + continue + } + out = append(out, strconv.FormatInt(id, utils.NumberTen)) + } + return out +} + +func loadImageLogs(userIds []int64) (map[int64]dao.UserImageLog, error) { + out := make(map[int64]dao.UserImageLog, len(userIds)) + if len(userIds) == utils.NumberZero { + return out, nil + } + var rows []dao.UserImageLog + err := model.UserImageLogModel{}.Init().Items(modelbase.Params{ + In: map[string][]string{"user_id": idStrings(userIds)}, + Order: "detection_time desc", + }, &rows) + if err != nil { + return nil, err + } + for _, row := range rows { + if _, ok := out[row.UserId]; ok { + continue + } + out[row.UserId] = row + } + return out, nil +} + +func formatImageContents(data map[string]string) map[string]string { + result := make(map[string]string, len(data)) + for k, v := range data { + switch k { + case "health_score": + parts := strings.Split(v, "/") + result[k] = strings.TrimSpace(parts[0]) + default: + result[k] = strings.TrimSuffix(v, "%") + } + } + return result +} + +func buildImageDetail(detail *dao.Image) dao.ImageDetailResource { + var images map[string]interface{} + if detail.Images != utils.StringEmpty { + _ = jsoniter.UnmarshalFromString(detail.Images, &images) + } + + var contents map[string]string + if detail.Contents != utils.StringEmpty { + var raw map[string]string + if err := jsoniter.UnmarshalFromString(detail.Contents, &raw); err == nil { + contents = formatImageContents(raw) + } else { + contents = map[string]string{} + } + } + + return dao.ImageDetailResource{ + Id: detail.Id, + UserId: detail.UserId, + TaskId: detail.TaskId, + Images: images, + Contents: contents, + Cover: detail.Cover, + CreateTime: detail.CreateTime.Format(adminImageTimeLayout), + } +} + +func queryAdminImageLogs(userId int64, page, size int32) ([]dao.ImageLogResource, error) { + var rows []dao.Image + _, err := model.ImageModel{}.Init().Page(modelbase.Params{ + Eq: map[string]string{ + "user_id": strconv.FormatInt(userId, utils.NumberTen), + "status": strconv.Itoa(utils.StatusOk), + }, + Order: "id desc", + Page: int(page), + Size: int(size), + }, &rows) + if err != nil { + return nil, err + } + if len(rows) == utils.NumberZero { + return nil, nil + } + list := make([]dao.ImageLogResource, 0, len(rows)) + for _, row := range rows { + contents := map[string]string{} + if row.Contents != utils.StringEmpty { + var raw map[string]string + if err = jsoniter.UnmarshalFromString(row.Contents, &raw); err == nil { + if formatted := formatImageContents(raw); formatted != nil { + contents = formatted + } + } + } + list = append(list, dao.ImageLogResource{ + Id: row.Id, + UserId: row.UserId, + Cover: row.Cover, + Contents: contents, + TaskId: row.TaskId, + CreateTime: row.CreateTime.Format(adminImageTimeLayout), + }) + } + return list, nil +} diff --git a/services/analysis/internal/logic/analysisadmin/userArchiveLogic.go b/services/analysis/internal/logic/analysisadmin/userArchiveLogic.go new file mode 100644 index 0000000..4e14dd7 --- /dev/null +++ b/services/analysis/internal/logic/analysisadmin/userArchiveLogic.go @@ -0,0 +1,48 @@ +package analysisadminlogic + +import ( + "context" + + "lone-services/pkg/utils" + "lone-services/pkg/validate" + analysis "lone-services/rpc/analysis/pb" + "lone-services/services/analysis/internal/logic/common" + "lone-services/services/analysis/internal/svc" + "lone-services/services/analysis/validator" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserArchiveLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserArchiveLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserArchiveLogic { + return &UserArchiveLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UserArchiveLogic) UserArchive(in *analysis.AdminUserArchiveReq) (*analysis.Response, error) { + var req validator.AdminUserArchiveValidator + if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { + return outParams(msg), nil + } + if _, fail := common.RequireAdmin(l.ctx); fail != nil { + return fail, nil + } + + list, err := queryAdminImageLogs(req.UserId, req.Page, req.Size) + if err != nil { + l.Errorf("admin user archive: %v", err) + return common.FailResponse(utils.Fail), nil + } + if len(list) == utils.NumberZero { + return common.OkResponse(nil), nil + } + return common.OkResponse(list), nil +} diff --git a/services/analysis/internal/logic/analysisadmin/userDetailLogic.go b/services/analysis/internal/logic/analysisadmin/userDetailLogic.go new file mode 100644 index 0000000..9fd1000 --- /dev/null +++ b/services/analysis/internal/logic/analysisadmin/userDetailLogic.go @@ -0,0 +1,55 @@ +package analysisadminlogic + +import ( + "context" + "strconv" + + "lone-services/pkg/modelbase" + "lone-services/pkg/utils" + "lone-services/pkg/validate" + analysis "lone-services/rpc/analysis/pb" + "lone-services/services/analysis/internal/dao" + "lone-services/services/analysis/internal/logic/common" + "lone-services/services/analysis/internal/model" + "lone-services/services/analysis/internal/svc" + "lone-services/services/analysis/validator" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UserDetailLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserDetailLogic { + return &UserDetailLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UserDetailLogic) UserDetail(in *analysis.AdminUserDetailReq) (*analysis.Response, error) { + var req validator.AdminUserDetailValidator + if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { + return outParams(msg), nil + } + if _, fail := common.RequireAdmin(l.ctx); fail != nil { + return fail, nil + } + + var detail dao.Image + err := model.ImageModel{}.Init().GetOne(modelbase.Params{ + Eq: map[string]string{"id": strconv.FormatInt(req.Id, utils.NumberTen)}, + }, &detail) + if err != nil { + l.Errorf("admin user detail: %v", err) + return common.FailResponse(utils.Fail), nil + } + if detail.Id <= utils.NumberZero { + return common.OkResponse(nil), nil + } + return common.OkResponse(buildImageDetail(&detail)), nil +} diff --git a/services/analysis/internal/logic/analysisadmin/userListLogic.go b/services/analysis/internal/logic/analysisadmin/userListLogic.go new file mode 100644 index 0000000..8290961 --- /dev/null +++ b/services/analysis/internal/logic/analysisadmin/userListLogic.go @@ -0,0 +1,166 @@ +package analysisadminlogic + +import ( + "context" + + "lone-services/pkg/modelbase" + "lone-services/pkg/utils" + "lone-services/pkg/validate" + analysis "lone-services/rpc/analysis/pb" + userpb "lone-services/rpc/user/pb" + "lone-services/services/analysis/internal/dao" + "lone-services/services/analysis/internal/logic/common" + "lone-services/services/analysis/internal/model" + "lone-services/services/analysis/internal/svc" + "lone-services/services/analysis/validator" + + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type UserListLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewUserListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserListLogic { + return &UserListLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UserListLogic) UserList(in *analysis.AdminUserListReq) (*analysis.Response, error) { + var req validator.AdminUserListValidator + if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { + return outParams(msg), nil + } + if _, fail := common.RequireAdmin(l.ctx); fail != nil { + return fail, nil + } + + params := modelbase.Params{ + Order: "id desc", + Page: int(req.Page), + Size: int(req.Size), + } + + if req.Keyword != utils.StringEmpty { + bizIds, err := l.filterBizIds(req.Keyword) + if err != nil { + l.Errorf("admin user list filter: %v", err) + return common.FailResponse(utils.Fail), nil + } + if len(bizIds) == utils.NumberZero { + return common.OkResponse(modelbase.PageResult{Items: []dao.AdminUserListItem{}}), nil + } + params.In = map[string][]string{"id": idStrings(bizIds)} + } + + var users []dao.User + page, err := model.UserModel{}.Init().Page(params, &users) + if err != nil { + l.Errorf("admin user list page: %v", err) + return common.FailResponse(utils.Fail), nil + } + if len(users) == utils.NumberZero { + page.Items = []dao.AdminUserListItem{} + return common.OkResponse(page), nil + } + + pageIds := make([]int64, 0, len(users)) + for _, row := range users { + pageIds = append(pageIds, row.Id) + } + + profiles, err := l.loadProfiles(pageIds) + if err != nil { + l.Errorf("admin user list profiles: %v", err) + return common.FailResponse(utils.Fail), nil + } + logs, err := loadImageLogs(pageIds) + if err != nil { + l.Errorf("admin user list logs: %v", err) + return common.FailResponse(utils.Fail), nil + } + + items := make([]dao.AdminUserListItem, 0, len(users)) + for _, row := range users { + item := dao.AdminUserListItem{ + Id: row.Id, + Status: userStatus(row), + CreatedAt: row.CreatedAt, + } + if profile, ok := profiles[row.Id]; ok { + item.Name = profile.GetName() + item.Avatar = profile.GetAvatar() + mobile, _ := utils.DecryptPhone(profile.GetMobile()) + item.Mobile = mobile + item.Gender = profile.GetGender() + item.GenderText = formatGender(item.Gender) + item.Birthday = profile.GetBirthday() + item.Age = utils.CalcAgeStr(item.Birthday) + } else { + item.GenderText = formatGender(utils.NumberZero) + } + if logRow, ok := logs[row.Id]; ok { + item.DetectionNumber = logRow.DetectionNumber + } + items = append(items, item) + } + + page.Items = items + return common.OkResponse(page), nil +} + +func (l *UserListLogic) filterBizIds(keyword string) ([]int64, error) { + if l.svcCtx.UserSvcName == utils.StringEmpty { + return nil, status.Error(codes.FailedPrecondition, "user service empty") + } + cli, err := svc.GetRpcClient(l.svcCtx.UserSvcName) + if err != nil { + return nil, err + } + res, err := userpb.NewUserClient(cli.Conn()).InternalUsersByBiz(l.ctx, &userpb.InternalUsersByBizReq{ + ClientCode: dao.ClientCodeUserSkin, + Keyword: keyword, + }) + if err != nil { + return nil, err + } + ids := make([]int64, 0, len(res.GetItems())) + for _, item := range res.GetItems() { + if item.GetBizId() > utils.NumberZero { + ids = append(ids, item.GetBizId()) + } + } + return ids, nil +} + +func (l *UserListLogic) loadProfiles(bizIds []int64) (map[int64]*userpb.BizUserItem, error) { + out := make(map[int64]*userpb.BizUserItem, len(bizIds)) + if len(bizIds) == utils.NumberZero { + return out, nil + } + if l.svcCtx.UserSvcName == utils.StringEmpty { + return nil, status.Error(codes.FailedPrecondition, "user service empty") + } + cli, err := svc.GetRpcClient(l.svcCtx.UserSvcName) + if err != nil { + return nil, err + } + res, err := userpb.NewUserClient(cli.Conn()).InternalUsersByBiz(l.ctx, &userpb.InternalUsersByBizReq{ + ClientCode: dao.ClientCodeUserSkin, + BizIds: bizIds, + }) + if err != nil { + return nil, err + } + for _, item := range res.GetItems() { + out[item.GetBizId()] = item + } + return out, nil +} diff --git a/services/analysis/internal/logic/analysisdevice/faceLoginLogic.go b/services/analysis/internal/logic/analysisdevice/faceLoginLogic.go new file mode 100644 index 0000000..d31f3c1 --- /dev/null +++ b/services/analysis/internal/logic/analysisdevice/faceLoginLogic.go @@ -0,0 +1,137 @@ +package analysisdevicelogic + +import ( + "context" + + "lone-services/pkg/utils" + "lone-services/pkg/validate" + analysis "lone-services/rpc/analysis/pb" + userpb "lone-services/rpc/user/pb" + "lone-services/services/analysis/internal/dao" + "lone-services/services/analysis/internal/face" + "lone-services/services/analysis/internal/logic/common" + "lone-services/services/analysis/internal/svc" + "lone-services/services/analysis/validator" + + jsoniter "github.com/json-iterator/go" + "github.com/zeromicro/go-zero/core/logx" +) + +type FaceLoginLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewFaceLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *FaceLoginLogic { + return &FaceLoginLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +type faceLoginResult struct { + AccessToken string `json:"access_token"` + RefreshToken string `json:"refresh_token"` + Info jsoniter.RawMessage `json:"info"` + Status int `json:"status"` +} + +func (l *FaceLoginLogic) FaceLogin(in *analysis.FaceLoginReq) (*analysis.Response, error) { + var req validator.FaceLoginValidator + if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { + return common.OutResponse(utils.ErrorParams, msg), nil + } + if len(req.File) == utils.NumberZero && req.FilePath == utils.StringEmpty { + return common.FailResponse(utils.ErrorFileUpFailed), nil + } + + imgPath, cleanup, err := face.PrepareImagePath(req.File, req.FilePath) + if err != nil { + l.Errorf("face login prepare image: %v", err) + return common.FailResponse(utils.ErrorFileUpFailed), nil + } + defer cleanup() + + vector, err := face.GetFaceVector(imgPath) + if err != nil { + l.Errorf("face login vector: %v", err) + return common.FailResponse(utils.ErrorNotFace), nil + } + + userID, score, err := face.SearchUser(vector) + l.Infof("face login user_id=%d score=%v err=%v", userID, score, err) + if err != nil { + return common.FailResponse(utils.ErrorFaceNotMatch), nil + } + + clientCode := req.ClientCode + if clientCode == utils.StringEmpty { + clientCode = dao.ClientCodeUserSkin + } + if l.svcCtx.UserSvcName == utils.StringEmpty { + return common.FailResponse(utils.Fail), nil + } + cli, err := svc.GetRpcClient(l.svcCtx.UserSvcName) + if err != nil { + l.Errorf("face login user rpc: %v", err) + return common.FailResponse(utils.Fail), nil + } + token, err := userpb.NewUserClient(cli.Conn()).InternalLoginByUserId(l.ctx, &userpb.InternalLoginByUserIdReq{ + UserId: userID, + ClientCode: clientCode, + }) + if err != nil { + l.Errorf("face login issue token: %v", err) + return common.FailResponse(utils.ErrorFaceNotMatch), nil + } + + status := utils.NumberOne + bizId := parseSessionBizId(token.GetInfo()) + if bizId > utils.NumberZero { + if row, loadErr := common.LoadAnalysisUser(bizId); loadErr == nil && row != nil { + status = analysisUserStatus(*row) + } + } + + var info jsoniter.RawMessage + if token.GetInfo() != utils.StringEmpty { + info = jsoniter.RawMessage(token.GetInfo()) + } else { + info = jsoniter.RawMessage("{}") + } + return common.OkResponse(faceLoginResult{ + AccessToken: token.GetAccessToken(), + RefreshToken: token.GetRefreshToken(), + Info: info, + Status: status, + }), nil +} + +func parseSessionBizId(info string) int64 { + if info == utils.StringEmpty { + return utils.NumberZero + } + var sess struct { + BizId int64 `json:"biz_id"` + } + if err := jsoniter.UnmarshalFromString(info, &sess); err != nil { + return utils.NumberZero + } + return sess.BizId +} + +func analysisUserStatus(row dao.User) int { + status := utils.NumberOne + if row.IsRegistered == uint8(utils.StatusOk) { + status = utils.NumberTwo + } + if row.IsFaceVerified == uint8(utils.StatusOk) { + status = utils.NumberThree + } + if row.IsProfileCompleted == uint8(utils.StatusOk) { + status = utils.NumberFour + } + return status +} diff --git a/services/analysis/internal/logic/analysisuser/faceBindLogic.go b/services/analysis/internal/logic/analysisuser/faceBindLogic.go index dda80b0..2609e9d 100644 --- a/services/analysis/internal/logic/analysisuser/faceBindLogic.go +++ b/services/analysis/internal/logic/analysisuser/faceBindLogic.go @@ -8,6 +8,7 @@ import ( "lone-services/pkg/utils" "lone-services/pkg/validate" analysis "lone-services/rpc/analysis/pb" + "lone-services/services/analysis/internal/face" "lone-services/services/analysis/internal/logic/common" "lone-services/services/analysis/internal/model" "lone-services/services/analysis/internal/svc" @@ -36,10 +37,13 @@ func (l *FaceBindLogic) FaceBind(in *analysis.FaceBindReq) (*analysis.Response, return common.OutResponse(utils.ErrorParams, msg), nil } - bizId, _, fail := common.RequireBizUserId(l.ctx) + bizId, loginUser, fail := common.RequireBizUserId(l.ctx) if fail != nil { return fail, nil } + if loginUser.ID < utils.NumberOne { + return common.FailResponse(utils.ErrorNoLoginInfo), nil + } row, err := common.LoadAnalysisUser(bizId) if err != nil { @@ -50,6 +54,23 @@ func (l *FaceBindLogic) FaceBind(in *analysis.FaceBindReq) (*analysis.Response, return common.FailResponse(utils.ErrorNotFund), nil } + imgPath, cleanup, err := face.PrepareImagePath(nil, req.FacePath) + if err != nil { + l.Errorf("face bind prepare image: %v", err) + return common.FailResponse(utils.ErrorFileUpFailed), nil + } + defer cleanup() + + vector, err := face.GetFaceVector(imgPath) + if err != nil { + l.Errorf("face bind vector: %v", err) + return common.FailResponse(utils.ErrorNotFace), nil + } + if err = face.UpsertFace(loginUser.ID, vector); err != nil { + l.Errorf("face bind milvus: %v", err) + return common.FailResponse(utils.Fail), nil + } + _, err = model.UserModel{}.Init().Edit(modelbase.Params{ Eq: map[string]string{"id": strconv.FormatInt(bizId, utils.NumberTen)}, }, map[string]interface{}{ diff --git a/services/analysis/internal/logic/common/helper.go b/services/analysis/internal/logic/common/helper.go index 32cef8e..32e70e4 100644 --- a/services/analysis/internal/logic/common/helper.go +++ b/services/analysis/internal/logic/common/helper.go @@ -11,6 +11,14 @@ import ( "lone-services/services/analysis/internal/model" ) +func RequireAdmin(ctx context.Context) (utils.UserInfo, *analysis.Response) { + user := utils.GetUserFromCtx(ctx) + if user.ID < utils.NumberOne { + return user, FailResponse(utils.ErrorNoLoginInfo) + } + return user, nil +} + func RequireBizUserId(ctx context.Context) (int64, utils.UserInfo, *analysis.Response) { user := utils.GetUserFromCtx(ctx) if user.BizId < utils.NumberOne { diff --git a/services/analysis/internal/server/analysisadmin/analysisAdminServer.go b/services/analysis/internal/server/analysisadmin/analysisAdminServer.go new file mode 100644 index 0000000..57663df --- /dev/null +++ b/services/analysis/internal/server/analysisadmin/analysisAdminServer.go @@ -0,0 +1,39 @@ +// Code generated by goctl. DO NOT EDIT. +// goctl 1.10.1 +// Source: analysis.proto + +package server + +import ( + "context" + + "lone-services/rpc/analysis/pb" + "lone-services/services/analysis/internal/logic/analysisadmin" + "lone-services/services/analysis/internal/svc" +) + +type AnalysisAdminServer struct { + svcCtx *svc.ServiceContext + analysis.UnimplementedAnalysisAdminServer +} + +func NewAnalysisAdminServer(svcCtx *svc.ServiceContext) *AnalysisAdminServer { + return &AnalysisAdminServer{ + svcCtx: svcCtx, + } +} + +func (s *AnalysisAdminServer) UserList(ctx context.Context, in *analysis.AdminUserListReq) (*analysis.Response, error) { + l := analysisadminlogic.NewUserListLogic(ctx, s.svcCtx) + return l.UserList(in) +} + +func (s *AnalysisAdminServer) UserArchive(ctx context.Context, in *analysis.AdminUserArchiveReq) (*analysis.Response, error) { + l := analysisadminlogic.NewUserArchiveLogic(ctx, s.svcCtx) + return l.UserArchive(in) +} + +func (s *AnalysisAdminServer) UserDetail(ctx context.Context, in *analysis.AdminUserDetailReq) (*analysis.Response, error) { + l := analysisadminlogic.NewUserDetailLogic(ctx, s.svcCtx) + return l.UserDetail(in) +} diff --git a/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go b/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go index 573fae1..a47b90e 100644 --- a/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go +++ b/services/analysis/internal/server/analysisdevice/analysisDeviceServer.go @@ -23,6 +23,11 @@ func NewAnalysisDeviceServer(svcCtx *svc.ServiceContext) *AnalysisDeviceServer { } } +func (s *AnalysisDeviceServer) FaceLogin(ctx context.Context, in *analysis.FaceLoginReq) (*analysis.Response, error) { + l := analysisdevicelogic.NewFaceLoginLogic(ctx, s.svcCtx) + return l.FaceLogin(in) +} + func (s *AnalysisDeviceServer) Policy(ctx context.Context, in *analysis.DevicePolicyReq) (*analysis.Response, error) { l := analysisdevicelogic.NewPolicyLogic(ctx, s.svcCtx) return l.Policy(in) diff --git a/services/analysis/validator/user.go b/services/analysis/validator/user.go index c1e0964..64fd6fa 100644 --- a/services/analysis/validator/user.go +++ b/services/analysis/validator/user.go @@ -28,6 +28,19 @@ func (p FaceBindValidator) GetMessage() validate.ValidatorMessages { } } +type FaceLoginValidator struct { + File []byte + FilePath string `validate:"omitempty,max=512"` + ClientCode string `validate:"omitempty,max=32"` +} + +func (p FaceLoginValidator) GetMessage() validate.ValidatorMessages { + return validate.ValidatorMessages{ + "FilePath.max": "file_path 过长", + "ClientCode.max": "client_code 过长", + } +} + type AgreementInfoValidator struct { Type int32 `validate:"required,gt=0"` } diff --git a/services/analysis/validator/view.go b/services/analysis/validator/view.go index b59e13c..7ff6ecf 100644 --- a/services/analysis/validator/view.go +++ b/services/analysis/validator/view.go @@ -150,3 +150,39 @@ func (p DeviceUpdateValidator) GetMessage() validate.ValidatorMessages { "DeviceName.required": "device_name 必传", } } + +type AdminUserListValidator struct { + Keyword string `validate:"omitempty,max=64"` + Page int32 `validate:"omitempty,gte=0"` + Size int32 `validate:"omitempty,gte=0"` +} + +func (p AdminUserListValidator) GetMessage() validate.ValidatorMessages { + return validate.ValidatorMessages{ + "Keyword.max": "keyword 过长", + } +} + +type AdminUserArchiveValidator struct { + UserId int64 `validate:"required,gt=0"` + Page int32 `validate:"omitempty,gte=0"` + Size int32 `validate:"omitempty,gte=0"` +} + +func (p AdminUserArchiveValidator) GetMessage() validate.ValidatorMessages { + return validate.ValidatorMessages{ + "UserId.required": "user id必传", + "UserId.gt": "user id必传", + } +} + +type AdminUserDetailValidator struct { + Id int64 `validate:"required,gt=0"` +} + +func (p AdminUserDetailValidator) GetMessage() validate.ValidatorMessages { + return validate.ValidatorMessages{ + "Id.required": "id必传", + "Id.gt": "id必传", + } +} diff --git a/services/user/internal/logic/internalLoginByUserIdLogic.go b/services/user/internal/logic/internalLoginByUserIdLogic.go new file mode 100644 index 0000000..bf8b64f --- /dev/null +++ b/services/user/internal/logic/internalLoginByUserIdLogic.go @@ -0,0 +1,71 @@ +package logic + +import ( + "context" + + "lone-services/pkg/utils" + "lone-services/pkg/validate" + user "lone-services/rpc/user/pb" + "lone-services/services/user/internal/svc" + "lone-services/services/user/validator" + + jsoniter "github.com/json-iterator/go" + "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type InternalLoginByUserIdLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger +} + +func NewInternalLoginByUserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InternalLoginByUserIdLogic { + return &InternalLoginByUserIdLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *InternalLoginByUserIdLogic) InternalLoginByUserId(in *user.InternalLoginByUserIdReq) (*user.InternalLoginByUserIdData, error) { + var req validator.InternalLoginByUserIdValidator + if msg := validate.ValidateFromProto(in, &req); msg != utils.StringEmpty { + return nil, status.Error(codes.InvalidArgument, msg) + } + + client, err := loadEnabledClient(req.ClientCode) + if err != nil { + l.Errorf("internal login load client: %v", err) + return nil, status.Error(codes.InvalidArgument, "端配置不存在或已禁用") + } + + hasClient, err := userHasEnabledClient(req.UserId, req.ClientCode) + if err != nil { + l.Errorf("internal login check client: %v", err) + return nil, status.Error(codes.Internal, utils.Fail.Msg) + } + if !hasClient { + return nil, status.Error(codes.NotFound, utils.ErrorNotFund.Msg) + } + + row, err := loadEnabledUser(req.UserId) + if err != nil { + l.Errorf("internal login load user: %v", err) + return nil, status.Error(codes.NotFound, utils.ErrorNotFund.Msg) + } + + token, err := issueLoginToken(l.ctx, l.svcCtx.JWT, row, client) + if err != nil { + l.Errorf("internal login issue token: %v", err) + return nil, status.Error(codes.Internal, utils.Fail.Msg) + } + + info, _ := jsoniter.MarshalToString(token.Info) + return &user.InternalLoginByUserIdData{ + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, + Info: info, + }, nil +} diff --git a/services/user/internal/server/userServer.go b/services/user/internal/server/userServer.go index 4748ad6..15ab26b 100644 --- a/services/user/internal/server/userServer.go +++ b/services/user/internal/server/userServer.go @@ -137,3 +137,8 @@ func (s *UserServer) InternalUsersByBiz(ctx context.Context, in *user.InternalUs l := logic.NewInternalUsersByBizLogic(ctx, s.svcCtx) return l.InternalUsersByBiz(in) } + +func (s *UserServer) InternalLoginByUserId(ctx context.Context, in *user.InternalLoginByUserIdReq) (*user.InternalLoginByUserIdData, error) { + l := logic.NewInternalLoginByUserIdLogic(ctx, s.svcCtx) + return l.InternalLoginByUserId(in) +} diff --git a/services/user/userClient/user.go b/services/user/userClient/user.go index 5688f8e..674e716 100644 --- a/services/user/userClient/user.go +++ b/services/user/userClient/user.go @@ -28,6 +28,8 @@ type ( InternalCreateReq = user.InternalCreateReq InternalGetUserInfoData = user.InternalGetUserInfoData InternalGetUserInfoReq = user.InternalGetUserInfoReq + InternalLoginByUserIdData = user.InternalLoginByUserIdData + InternalLoginByUserIdReq = user.InternalLoginByUserIdReq InternalRevokeBizClientData = user.InternalRevokeBizClientData InternalRevokeBizClientReq = user.InternalRevokeBizClientReq InternalUpdateData = user.InternalUpdateData @@ -75,6 +77,7 @@ type ( InternalGetUserInfo(ctx context.Context, in *InternalGetUserInfoReq, opts ...grpc.CallOption) (*InternalGetUserInfoData, error) InternalVerifyPassword(ctx context.Context, in *InternalVerifyPasswordReq, opts ...grpc.CallOption) (*InternalVerifyPasswordData, error) InternalUsersByBiz(ctx context.Context, in *InternalUsersByBizReq, opts ...grpc.CallOption) (*InternalUsersByBizData, error) + InternalLoginByUserId(ctx context.Context, in *InternalLoginByUserIdReq, opts ...grpc.CallOption) (*InternalLoginByUserIdData, error) } defaultUser struct { @@ -202,3 +205,8 @@ func (m *defaultUser) InternalUsersByBiz(ctx context.Context, in *InternalUsersB client := user.NewUserClient(m.cli.Conn()) return client.InternalUsersByBiz(ctx, in, opts...) } + +func (m *defaultUser) InternalLoginByUserId(ctx context.Context, in *InternalLoginByUserIdReq, opts ...grpc.CallOption) (*InternalLoginByUserIdData, error) { + client := user.NewUserClient(m.cli.Conn()) + return client.InternalLoginByUserId(ctx, in, opts...) +} diff --git a/services/user/validator/user.go b/services/user/validator/user.go index 891738d..1344dc4 100644 --- a/services/user/validator/user.go +++ b/services/user/validator/user.go @@ -228,6 +228,20 @@ func (p InternalUsersByIdsValidator) GetMessage() validate.ValidatorMessages { } } +type InternalLoginByUserIdValidator struct { + UserId int64 `validate:"required,gt=0"` + ClientCode string `validate:"required,max=32"` +} + +func (p InternalLoginByUserIdValidator) GetMessage() validate.ValidatorMessages { + return validate.ValidatorMessages{ + "UserId.required": "用户ID不能为空", + "UserId.gt": "用户ID必须大于0", + "ClientCode.required": "端编码不能为空", + "ClientCode.max": "端编码过长", + } +} + type InternalUpdateMobileValidator struct { UserId int64 `validate:"required,gt=0"` Mobile string `validate:"required,max=20"`