From 6b8a88a0f4f198f10479683e475b94fceaea8894 Mon Sep 17 00:00:00 2001
From: OpenIM-Gordon <46924906+FGadvancer@users.noreply.github.com>
Date: Mon, 22 Apr 2024 18:19:16 +0800
Subject: [PATCH 01/26] fix: create RPC zookeeper node to prevent interface
call blocking. (#496)
* fix: remove duplicate character.
* fix: create RPC zookeeper node to prevent interface call blocking.
---
go.mod | 4 +--
go.sum | 55 ++-----------------------------------
internal/api/admin/start.go | 5 ++++
internal/api/chat/start.go | 4 +++
pkg/common/cmd/admin_api.go | 4 +--
pkg/common/cmd/admin_rpc.go | 4 +--
pkg/common/cmd/chat_api.go | 4 +--
pkg/common/cmd/chat_rpc.go | 4 +--
pkg/common/config/config.go | 7 +++++
9 files changed, 28 insertions(+), 63 deletions(-)
diff --git a/go.mod b/go.mod
index f39631a93..87133d68e 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/openimsdk/chat
-go 1.21.2
+go 1.20
require (
github.com/gin-gonic/gin v1.9.1
@@ -27,7 +27,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/openimsdk/gomake v0.0.6
github.com/openimsdk/protocol v0.0.63
- github.com/openimsdk/tools v0.0.47-alpha.43
+ github.com/openimsdk/tools v0.0.48
github.com/redis/go-redis/v9 v9.5.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
diff --git a/go.sum b/go.sum
index cfffdf3e2..0346164c9 100644
--- a/go.sum
+++ b/go.sum
@@ -29,11 +29,8 @@ github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCE
github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY=
github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
-github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
-github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
-github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
@@ -49,23 +46,17 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
-github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k=
-github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0=
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
-github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
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/frostbyte73/core v0.0.10 h1:D4DQXdPb8ICayz0n75rs4UYTXrUSdxzUfeleuNJORsU=
-github.com/frostbyte73/core v0.0.10/go.mod h1:XsOGqrqe/VEV7+8vJ+3a8qnCIXNbKsoEiu/czs7nrcU=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0=
-github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
@@ -73,11 +64,9 @@ github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SU
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
-github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
-github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
@@ -98,7 +87,6 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
-github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
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=
@@ -115,13 +103,11 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
-github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
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/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw=
-github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc=
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
@@ -129,11 +115,9 @@ github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/4
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
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=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
@@ -143,15 +127,11 @@ github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECae
github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
github.com/lithammer/shortuuid/v4 v4.0.0 h1:QRbbVkfgNippHOS8PXDkti4NaWeyYfcBTHtw7k08o4c=
-github.com/lithammer/shortuuid/v4 v4.0.0/go.mod h1:Zs8puNcrvf2rV9rTH51ZLLcj7ZXqQI3lv67aw4KiB1Y=
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkDaKb5iXdynYrzB84ErPPO4LbRASk58=
-github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
github.com/livekit/protocol v1.10.1 h1:upe6pKRqH8wpsMuR2OLtgizEm94iia3pDYm3O4/2PRY=
github.com/livekit/protocol v1.10.1/go.mod h1:eWPz45pnxwpCwB84qqhHxG0bCRgasa2itN6GAHCDddc=
github.com/livekit/psrpc v0.5.3-0.20240227154351-b7f99eaaf7b3 h1:bvjzDR+Rvdf3JgzQMtLiGVHBQ8KoOWM7x7sHj79jevQ=
-github.com/livekit/psrpc v0.5.3-0.20240227154351-b7f99eaaf7b3/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0=
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
-github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
@@ -172,67 +152,42 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwd
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E=
-github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8=
github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY=
-github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
-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/openimsdk/gomake v0.0.6 h1:bJmQWDHBj8PQ7oGJ2SL3Gsx0k5CdI/BPfGzlGcV105s=
github.com/openimsdk/gomake v0.0.6/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
-github.com/openimsdk/tools v0.0.47-alpha.43 h1:4RfyX+aLBEGOEIfc0CrzETwQUDd3aTsFpA26S/TpgXw=
-github.com/openimsdk/tools v0.0.47-alpha.43/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
+github.com/openimsdk/tools v0.0.48 h1:GgRtYtMNlJ0PzCR9XQzMVDv7O+Sp8Hg9Grrlnh8HFGE=
+github.com/openimsdk/tools v0.0.48/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8=
-github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0=
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
-github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
github.com/pion/ice/v2 v2.3.13 h1:xOxP+4V9nSDlUaGFRf/LvAuGHDXRcjIdsbbXPK/w7c8=
-github.com/pion/ice/v2 v2.3.13/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw=
github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc=
-github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y=
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
-github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8=
-github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk=
github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
-github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
github.com/pion/rtcp v1.2.12 h1:bKWiX93XKgDZENEXCijvHRU/wRifm6JV5DGcH6twtSM=
-github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4=
github.com/pion/rtp v1.8.3 h1:VEHxqzSVQxCkKDSHro5/4IUUG1ea+MFdqR2R3xSpNU8=
-github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
github.com/pion/sctp v1.8.12 h1:2VX50pedElH+is6FI+OKyRTeN5oy4mrk2HjnGa3UCmY=
-github.com/pion/sctp v1.8.12/go.mod h1:cMLT45jqw3+jiJCrtHVwfQLnfR0MGZ4rgOJwUOIqLkI=
github.com/pion/sdp/v3 v3.0.6 h1:WuDLhtuFUUVpTfus9ILC4HRyHsW6TdugjEX/QY9OiUw=
-github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw=
github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo=
-github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA=
github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4=
-github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8=
github.com/pion/transport/v2 v2.2.3 h1:XcOE3/x41HOSKbl1BfyY1TF1dERx7lVvlMCbXU7kfvA=
-github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/turn/v2 v2.1.3 h1:pYxTVWG2gpC97opdRc5IGsQ1lJ9O/IlNhkzj7MMrGAA=
-github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY=
github.com/pion/webrtc/v3 v3.2.28 h1:ienStxZ6HcjtH2UlmnFpMM0loENiYjaX437uIUpQSKo=
-github.com/pion/webrtc/v3 v3.2.28/go.mod h1:PNRCEuQlibrmuBhOTnol9j6KkIbUG11aHLEfNpUYey0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
-github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
-github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
-github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
-github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
-github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY=
-github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg=
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
@@ -241,7 +196,6 @@ github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTK
github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM=
github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
-github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
@@ -277,7 +231,6 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
-github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM=
@@ -312,13 +265,10 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
-github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80=
go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
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/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
-go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
@@ -340,7 +290,6 @@ golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUF
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8=
golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
-golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
golang.org/x/mod v0.2.0/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=
diff --git a/internal/api/admin/start.go b/internal/api/admin/start.go
index 8dd06d636..08bcce51c 100644
--- a/internal/api/admin/start.go
+++ b/internal/api/admin/start.go
@@ -36,6 +36,11 @@ func Start(ctx context.Context, index int, config *Config) error {
if err != nil {
return err
}
+
+ if err = client.CreateRpcRootNodes(config.Share.RpcRegisterName.GetServiceNames()); err != nil {
+ return errs.WrapMsg(err, "failed to create RPC root nodes")
+ }
+
chatConn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Chat, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
if err != nil {
return err
diff --git a/internal/api/chat/start.go b/internal/api/chat/start.go
index 2b003e10e..6b30d235e 100644
--- a/internal/api/chat/start.go
+++ b/internal/api/chat/start.go
@@ -36,6 +36,10 @@ func Start(ctx context.Context, index int, config *Config) error {
if err != nil {
return err
}
+
+ if err = client.CreateRpcRootNodes(config.Share.RpcRegisterName.GetServiceNames()); err != nil {
+ return errs.WrapMsg(err, "failed to create RPC root nodes")
+ }
chatConn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Chat, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
if err != nil {
return err
diff --git a/pkg/common/cmd/admin_api.go b/pkg/common/cmd/admin_api.go
index 92061096e..56a1fbf14 100644
--- a/pkg/common/cmd/admin_api.go
+++ b/pkg/common/cmd/admin_api.go
@@ -25,7 +25,7 @@ func NewAdminApiCmd() *AdminApiCmd {
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version)
ret.Command.RunE = func(cmd *cobra.Command, args []string) error {
- return ret.preRunE()
+ return ret.runE()
}
return &ret
}
@@ -34,6 +34,6 @@ func (a *AdminApiCmd) Exec() error {
return a.Execute()
}
-func (a *AdminApiCmd) preRunE() error {
+func (a *AdminApiCmd) runE() error {
return admin.Start(a.ctx, a.Index(), &a.apiConfig)
}
diff --git a/pkg/common/cmd/admin_rpc.go b/pkg/common/cmd/admin_rpc.go
index fdaea8df1..384c0be51 100644
--- a/pkg/common/cmd/admin_rpc.go
+++ b/pkg/common/cmd/admin_rpc.go
@@ -42,7 +42,7 @@ func NewAdminRpcCmd() *AdminRpcCmd {
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version)
ret.Command.RunE = func(cmd *cobra.Command, args []string) error {
- return ret.preRunE()
+ return ret.runE()
}
return &ret
}
@@ -51,7 +51,7 @@ func (a *AdminRpcCmd) Exec() error {
return a.Execute()
}
-func (a *AdminRpcCmd) preRunE() error {
+func (a *AdminRpcCmd) runE() error {
return startrpc.Start(a.ctx, &a.adminConfig.ZookeeperConfig, a.adminConfig.RpcConfig.RPC.ListenIP,
a.adminConfig.RpcConfig.RPC.RegisterIP, a.adminConfig.RpcConfig.RPC.Ports,
a.Index(), a.adminConfig.Share.RpcRegisterName.Admin, &a.adminConfig.Share, &a.adminConfig, admin.Start)
diff --git a/pkg/common/cmd/chat_api.go b/pkg/common/cmd/chat_api.go
index 7e500d70d..11e3de7b8 100644
--- a/pkg/common/cmd/chat_api.go
+++ b/pkg/common/cmd/chat_api.go
@@ -25,7 +25,7 @@ func NewChatApiCmd() *ChatApiCmd {
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version)
ret.Command.RunE = func(cmd *cobra.Command, args []string) error {
- return ret.preRunE()
+ return ret.runE()
}
return &ret
}
@@ -34,6 +34,6 @@ func (a *ChatApiCmd) Exec() error {
return a.Execute()
}
-func (a *ChatApiCmd) preRunE() error {
+func (a *ChatApiCmd) runE() error {
return chat.Start(a.ctx, a.Index(), &a.apiConfig)
}
diff --git a/pkg/common/cmd/chat_rpc.go b/pkg/common/cmd/chat_rpc.go
index 7acf8dbff..cb025c820 100644
--- a/pkg/common/cmd/chat_rpc.go
+++ b/pkg/common/cmd/chat_rpc.go
@@ -42,7 +42,7 @@ func NewChatRpcCmd() *ChatRpcCmd {
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version)
ret.Command.RunE = func(cmd *cobra.Command, args []string) error {
- return ret.preRunE()
+ return ret.runE()
}
return &ret
}
@@ -51,7 +51,7 @@ func (a *ChatRpcCmd) Exec() error {
return a.Execute()
}
-func (a *ChatRpcCmd) preRunE() error {
+func (a *ChatRpcCmd) runE() error {
return startrpc.Start(a.ctx, &a.chatConfig.ZookeeperConfig, a.chatConfig.RpcConfig.RPC.ListenIP,
a.chatConfig.RpcConfig.RPC.RegisterIP, a.chatConfig.RpcConfig.RPC.Ports,
a.Index(), a.chatConfig.Share.RpcRegisterName.Chat, &a.chatConfig.Share, &a.chatConfig, chat.Start)
diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index e543f166e..f08734c34 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -36,6 +36,13 @@ type RpcRegisterName struct {
Admin string `mapstructure:"admin"`
}
+func (r *RpcRegisterName) GetServiceNames() []string {
+ return []string{
+ r.Chat,
+ r.Admin,
+ }
+}
+
type API struct {
Api struct {
ListenIP string `mapstructure:"listenIP"`
From e21e14d671d1b222af454cdb9c7f947d96b08bee Mon Sep 17 00:00:00 2001
From: skiffer-git <44203734@qq.com>
Date: Mon, 22 Apr 2024 18:36:23 +0800
Subject: [PATCH 02/26] update go mod
---
go.mod | 2 +-
go.sum | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/go.mod b/go.mod
index 87133d68e..1357fd854 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/openimsdk/chat
-go 1.20
+go 1.21.2
require (
github.com/gin-gonic/gin v1.9.1
diff --git a/go.sum b/go.sum
index 0346164c9..d4c9121bb 100644
--- a/go.sum
+++ b/go.sum
@@ -29,8 +29,11 @@ github.com/alibabacloud-go/tea-xml v1.1.2/go.mod h1:Rq08vgCcCAjHyRi/M7xlHKUykZCE
github.com/aliyun/credentials-go v1.1.2 h1:qU1vwGIBb3UJ8BwunHDRFtAhS6jnQLnde/yk0+Ih2GY=
github.com/aliyun/credentials-go v1.1.2/go.mod h1:ozcZaMR5kLM7pwtCMEpVmQ242suV6qTJya2bDq4X1Tw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
+github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
+github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
@@ -46,17 +49,23 @@ github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/eapache/channels v1.1.0 h1:F1taHcn7/F0i8DYqKXJnyhJcVpp2kgFcNePxXtnyu4k=
+github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0=
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
+github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
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/frostbyte73/core v0.0.10 h1:D4DQXdPb8ICayz0n75rs4UYTXrUSdxzUfeleuNJORsU=
+github.com/frostbyte73/core v0.0.10/go.mod h1:XsOGqrqe/VEV7+8vJ+3a8qnCIXNbKsoEiu/czs7nrcU=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0=
+github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
@@ -64,9 +73,11 @@ github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SU
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
+github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
@@ -87,6 +98,7 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
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=
@@ -103,11 +115,13 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
+github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
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/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw=
+github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc=
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
@@ -115,9 +129,11 @@ github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/4
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
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=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
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/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
@@ -127,11 +143,15 @@ github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECae
github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
github.com/lithammer/shortuuid/v4 v4.0.0 h1:QRbbVkfgNippHOS8PXDkti4NaWeyYfcBTHtw7k08o4c=
+github.com/lithammer/shortuuid/v4 v4.0.0/go.mod h1:Zs8puNcrvf2rV9rTH51ZLLcj7ZXqQI3lv67aw4KiB1Y=
github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 h1:jm09419p0lqTkDaKb5iXdynYrzB84ErPPO4LbRASk58=
+github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
github.com/livekit/protocol v1.10.1 h1:upe6pKRqH8wpsMuR2OLtgizEm94iia3pDYm3O4/2PRY=
github.com/livekit/protocol v1.10.1/go.mod h1:eWPz45pnxwpCwB84qqhHxG0bCRgasa2itN6GAHCDddc=
github.com/livekit/psrpc v0.5.3-0.20240227154351-b7f99eaaf7b3 h1:bvjzDR+Rvdf3JgzQMtLiGVHBQ8KoOWM7x7sHj79jevQ=
+github.com/livekit/psrpc v0.5.3-0.20240227154351-b7f99eaaf7b3/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0=
github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs=
+github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ=
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
@@ -152,8 +172,11 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwd
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/nats-io/nats.go v1.31.0 h1:/WFBHEc/dOKBF6qf1TZhrdEfTmOZ5JzdJ+Y3m6Y/p7E=
+github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8=
github.com/nats-io/nkeys v0.4.6 h1:IzVe95ru2CT6ta874rt9saQRkWfe2nFj1NtvYSLqMzY=
+github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
+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/openimsdk/gomake v0.0.6 h1:bJmQWDHBj8PQ7oGJ2SL3Gsx0k5CdI/BPfGzlGcV105s=
github.com/openimsdk/gomake v0.0.6/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
@@ -164,30 +187,52 @@ github.com/openimsdk/tools v0.0.48/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx6
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8=
+github.com/pion/datachannel v1.5.5/go.mod h1:iMz+lECmfdCMqFRhXhcA/219B0SQlbpoR2V118yimL0=
github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8=
+github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s=
github.com/pion/ice/v2 v2.3.13 h1:xOxP+4V9nSDlUaGFRf/LvAuGHDXRcjIdsbbXPK/w7c8=
+github.com/pion/ice/v2 v2.3.13/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw=
github.com/pion/interceptor v0.1.25 h1:pwY9r7P6ToQ3+IF0bajN0xmk/fNw/suTgaTdlwTDmhc=
+github.com/pion/interceptor v0.1.25/go.mod h1:wkbPYAak5zKsfpVDYMtEfWEy8D4zL+rpxCxPImLOg3Y=
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
+github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8=
+github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk=
github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
+github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
github.com/pion/rtcp v1.2.12 h1:bKWiX93XKgDZENEXCijvHRU/wRifm6JV5DGcH6twtSM=
+github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4=
github.com/pion/rtp v1.8.3 h1:VEHxqzSVQxCkKDSHro5/4IUUG1ea+MFdqR2R3xSpNU8=
+github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU=
github.com/pion/sctp v1.8.12 h1:2VX50pedElH+is6FI+OKyRTeN5oy4mrk2HjnGa3UCmY=
+github.com/pion/sctp v1.8.12/go.mod h1:cMLT45jqw3+jiJCrtHVwfQLnfR0MGZ4rgOJwUOIqLkI=
github.com/pion/sdp/v3 v3.0.6 h1:WuDLhtuFUUVpTfus9ILC4HRyHsW6TdugjEX/QY9OiUw=
+github.com/pion/sdp/v3 v3.0.6/go.mod h1:iiFWFpQO8Fy3S5ldclBkpXqmWy02ns78NOKoLLL0YQw=
github.com/pion/srtp/v2 v2.0.18 h1:vKpAXfawO9RtTRKZJbG4y0v1b11NZxQnxRl85kGuUlo=
+github.com/pion/srtp/v2 v2.0.18/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA=
github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4=
+github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8=
github.com/pion/transport/v2 v2.2.3 h1:XcOE3/x41HOSKbl1BfyY1TF1dERx7lVvlMCbXU7kfvA=
+github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0=
github.com/pion/turn/v2 v2.1.3 h1:pYxTVWG2gpC97opdRc5IGsQ1lJ9O/IlNhkzj7MMrGAA=
+github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY=
github.com/pion/webrtc/v3 v3.2.28 h1:ienStxZ6HcjtH2UlmnFpMM0loENiYjaX437uIUpQSKo=
+github.com/pion/webrtc/v3 v3.2.28/go.mod h1:PNRCEuQlibrmuBhOTnol9j6KkIbUG11aHLEfNpUYey0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
+github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
+github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
+github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
+github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/puzpuzpuz/xsync v1.5.2 h1:yRAP4wqSOZG+/4pxJ08fPTwrfL0IzE/LKQ/cw509qGY=
+github.com/puzpuzpuz/xsync v1.5.2/go.mod h1:K98BYhX3k1dQ2M63t1YNVDanbwUPmBCAhNmVrrxfiGg=
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/richardlehane/mscfb v1.0.4 h1:WULscsljNPConisD5hR0+OyZjwK46Pfyr6mPu5ZawpM=
@@ -196,6 +241,7 @@ github.com/richardlehane/msoleps v1.0.1/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTK
github.com/richardlehane/msoleps v1.0.3 h1:aznSZzrwYRl3rLKRT3gUk9am7T/mLNSnJINvN0AQoVM=
github.com/richardlehane/msoleps v1.0.3/go.mod h1:BWev5JBpU9Ko2WAgmZEuiz4/u3ZYTKbjLycmwiWUfWg=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
+github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ=
github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4=
@@ -231,6 +277,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
+github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM=
@@ -265,10 +312,13 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
+github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80=
go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
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/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
+go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
@@ -290,6 +340,7 @@ golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUF
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8=
golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
+golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
golang.org/x/mod v0.2.0/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=
From 947c1f0abed7a92626c8eb5d86a91a20fdad9e8f Mon Sep 17 00:00:00 2001
From: chao <48119764+withchao@users.noreply.github.com>
Date: Tue, 23 Apr 2024 19:35:41 +0800
Subject: [PATCH 03/26] fix: gin log and rpc mw (#499)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: ptr
* feat: go 1.19
* fix: config get env
* test log
* fix; login
* fix: update grpc version.
* fix: update grpc version.
* fix: bug
---------
Co-authored-by: Xinwei Xiong <3293172751NSS@gmail.com>
Co-authored-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
---
go.mod | 2 +-
go.sum | 4 ++--
internal/api/admin/start.go | 4 ++--
internal/api/chat/start.go | 4 ++--
internal/rpc/admin/start.go | 3 ++-
internal/rpc/chat/start.go | 3 ++-
6 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/go.mod b/go.mod
index 1357fd854..b11884c0e 100644
--- a/go.mod
+++ b/go.mod
@@ -27,7 +27,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/openimsdk/gomake v0.0.6
github.com/openimsdk/protocol v0.0.63
- github.com/openimsdk/tools v0.0.48
+ github.com/openimsdk/tools v0.0.49-alpha.1
github.com/redis/go-redis/v9 v9.5.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
diff --git a/go.sum b/go.sum
index d4c9121bb..b0867c341 100644
--- a/go.sum
+++ b/go.sum
@@ -182,8 +182,8 @@ github.com/openimsdk/gomake v0.0.6 h1:bJmQWDHBj8PQ7oGJ2SL3Gsx0k5CdI/BPfGzlGcV105
github.com/openimsdk/gomake v0.0.6/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
-github.com/openimsdk/tools v0.0.48 h1:GgRtYtMNlJ0PzCR9XQzMVDv7O+Sp8Hg9Grrlnh8HFGE=
-github.com/openimsdk/tools v0.0.48/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
+github.com/openimsdk/tools v0.0.49-alpha.1 h1:LtlKh5t/1b1tNikR9LWwV9PIJclUNsVqpEzEke4CMtk=
+github.com/openimsdk/tools v0.0.49-alpha.1/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8=
diff --git a/internal/api/admin/start.go b/internal/api/admin/start.go
index 08bcce51c..ce30a64b8 100644
--- a/internal/api/admin/start.go
+++ b/internal/api/admin/start.go
@@ -60,8 +60,8 @@ func Start(ctx context.Context, index int, config *Config) error {
adminApi := New(chatClient, adminClient, im, &base)
mwApi := chatmw.New(adminClient)
gin.SetMode(gin.ReleaseMode)
- engine := gin.Default()
- engine.Use(mw.CorsHandler(), mw.GinParseOperationID())
+ engine := gin.New()
+ engine.Use(gin.Recovery(), mw.CorsHandler(), mw.GinParseOperationID())
SetAdminRoute(engine, adminApi, mwApi)
return engine.Run(fmt.Sprintf(":%d", apiPort))
}
diff --git a/internal/api/chat/start.go b/internal/api/chat/start.go
index 6b30d235e..d5291c6ad 100644
--- a/internal/api/chat/start.go
+++ b/internal/api/chat/start.go
@@ -59,8 +59,8 @@ func Start(ctx context.Context, index int, config *Config) error {
adminApi := New(chatClient, adminClient, im, &base)
mwApi := chatmw.New(adminClient)
gin.SetMode(gin.ReleaseMode)
- engine := gin.Default()
- engine.Use(mw.CorsHandler(), mw.GinParseOperationID())
+ engine := gin.New()
+ engine.Use(gin.Recovery(), mw.CorsHandler(), mw.GinParseOperationID())
SetChatRoute(engine, adminApi, mwApi)
return engine.Run(fmt.Sprintf(":%d", apiPort))
}
diff --git a/internal/rpc/admin/start.go b/internal/rpc/admin/start.go
index c8ed81ea6..36ac9801a 100644
--- a/internal/rpc/admin/start.go
+++ b/internal/rpc/admin/start.go
@@ -17,6 +17,7 @@ import (
"github.com/openimsdk/tools/db/redisutil"
"github.com/openimsdk/tools/discovery"
"github.com/openimsdk/tools/errs"
+ "github.com/openimsdk/tools/mw"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"math/rand"
@@ -49,7 +50,7 @@ func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryReg
if err != nil {
return err
}
- conn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Chat, grpc.WithTransportCredentials(insecure.NewCredentials()))
+ conn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Chat, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
if err != nil {
return err
}
diff --git a/internal/rpc/chat/start.go b/internal/rpc/chat/start.go
index 7a4a3e7dc..ed62eaeaa 100644
--- a/internal/rpc/chat/start.go
+++ b/internal/rpc/chat/start.go
@@ -9,6 +9,7 @@ import (
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/discovery"
"github.com/openimsdk/tools/errs"
+ "github.com/openimsdk/tools/mw"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"time"
@@ -52,7 +53,7 @@ func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryReg
if err != nil {
return err
}
- conn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Admin, grpc.WithTransportCredentials(insecure.NewCredentials()))
+ conn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Admin, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
if err != nil {
return err
}
From 74f8d1afebfc8890024c653430933d36aaf10960 Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Tue, 23 Apr 2024 19:41:40 +0800
Subject: [PATCH 04/26] Optimize the Dockerfile. (#502)
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
* refactor dockerFile
---
.dockerignore | 4 +--
.gitignore | 1 -
Dockerfile | 83 ++++++++++++++++++++++++------------------------
go.mod | 2 +-
go.sum | 4 +--
start-config.yml | 8 +++++
6 files changed, 54 insertions(+), 48 deletions(-)
create mode 100644 start-config.yml
diff --git a/.dockerignore b/.dockerignore
index a118b899f..b52db5740 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -4,8 +4,8 @@
.dockerignore
# Ignore build artifacts
-_output/
logs/
+_output/
# Ignore non-essential documentation
README.md
@@ -17,8 +17,6 @@ CHANGELOG/
# Ignore testing and linting configuration
.golangci.yml
-# Ignore deployment-related files
-docker-compose.yaml
# Ignore assets
assets/
diff --git a/.gitignore b/.gitignore
index ea171e8a3..811715820 100644
--- a/.gitignore
+++ b/.gitignore
@@ -374,4 +374,3 @@ dist
# config files, may contain sensitive informatio
config/config.yaml
-start-config.yml
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 2ecf60a70..52e184104 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,48 +1,49 @@
-# Copyright © 2023 OpenIM open source community. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-ARG GOARCH
-ARG GOOS
-
-# Use golang as the builder stage
-FROM golang:1.21 AS builder
-
-ARG GO111MODULE=on
-ARG GOPROXY=https://goproxy.io,direct
-
-WORKDIR /openim/openim-chat
-
-ENV GO111MODULE=$GO111MODULE
-ENV GOPROXY=$GOPROXY
-
-COPY go.mod go.sum ./
+# Use Go 1.21 Alpine as the base image for building the application
+FROM golang:1.21-alpine as builder
+
+# Define the base directory for the application as an environment variable
+ENV SERVER_DIR=/openim-chat
+
+# Set the working directory inside the container based on the environment variable
+WORKDIR $SERVER_DIR
+
+# Set the Go proxy to improve dependency resolution speed
+ENV GOPROXY=https://goproxy.io,direct
+
+# Copy all files from the current directory into the container
+COPY . .
+
RUN go mod download
-# Copy all files to the container
-ADD . .
+# Install Mage to use for building the application
+RUN go install github.com/magefile/mage@v1.15.0
+
+# Optionally build your application if needed
+RUN mage build
+
+# Using Alpine Linux with Go environment for the final image
+FROM golang:1.21-alpine
+
+# Install necessary packages, such as bash
+RUN apk add --no-cache bash
-RUN make clean
-RUN make build
+# Set the environment and work directory
+ENV SERVER_DIR=/openim-chat
+WORKDIR $SERVER_DIR
-# Build the runtime stage
-FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
-WORKDIR ${CHAT_WORKDIR}
+# Copy the compiled binaries and mage from the builder image to the final image
+COPY --from=builder $SERVER_DIR/_output $SERVER_DIR/_output
+COPY --from=builder $SERVER_DIR/config $SERVER_DIR/config
+COPY --from=builder /go/bin/mage /usr/local/bin/mage
+COPY --from=builder $SERVER_DIR/magefile_windows.go $SERVER_DIR/
+COPY --from=builder $SERVER_DIR/magefile_unix.go $SERVER_DIR/
+COPY --from=builder $SERVER_DIR/magefile.go $SERVER_DIR/
+COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/
+COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/
+COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
-COPY --from=builder ${OPENIM_CHAT_BINDIR} /openim/openim-chat/_output/bin
-COPY --from=builder ${CHAT_WORKDIR}/config /openim/openim-chat/config
-COPY --from=builder ${CHAT_WORKDIR}/scripts /openim/openim-chat/scripts
-COPY --from=builder ${CHAT_WORKDIR}/deployments /openim/openim-chat/deployments
+RUN go get github.com/openimsdk/gomake@v0.0.9-alpha.3
-CMD ["/openim/openim-chat/scripts/docker-start-all.sh"]
+# Set the command to run when the container starts
+ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"]
diff --git a/go.mod b/go.mod
index b11884c0e..f85546e2b 100644
--- a/go.mod
+++ b/go.mod
@@ -25,7 +25,7 @@ require (
require (
github.com/livekit/protocol v1.10.1
github.com/mitchellh/mapstructure v1.5.0
- github.com/openimsdk/gomake v0.0.6
+ github.com/openimsdk/gomake v0.0.9-alpha.3
github.com/openimsdk/protocol v0.0.63
github.com/openimsdk/tools v0.0.49-alpha.1
github.com/redis/go-redis/v9 v9.5.1
diff --git a/go.sum b/go.sum
index b0867c341..ffb87ecec 100644
--- a/go.sum
+++ b/go.sum
@@ -178,8 +178,8 @@ github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADym
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
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/openimsdk/gomake v0.0.6 h1:bJmQWDHBj8PQ7oGJ2SL3Gsx0k5CdI/BPfGzlGcV105s=
-github.com/openimsdk/gomake v0.0.6/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
+github.com/openimsdk/gomake v0.0.9-alpha.3 h1:KO3stbmiTksnnx2o2Lh8/FkKXc7qiF4rwPnr01WO7aM=
+github.com/openimsdk/gomake v0.0.9-alpha.3/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
github.com/openimsdk/tools v0.0.49-alpha.1 h1:LtlKh5t/1b1tNikR9LWwV9PIJclUNsVqpEzEke4CMtk=
diff --git a/start-config.yml b/start-config.yml
new file mode 100644
index 000000000..b5b8ddc55
--- /dev/null
+++ b/start-config.yml
@@ -0,0 +1,8 @@
+serviceBinaries:
+ chat-api: 1
+ chat-rpc: 1
+ admin-api: 1
+ admin-rpc: 1
+toolBinaries:
+ - check-component
+maxFileDescriptors: 10000
From 7f78020911924228712b91b9f2e6ee7faf0ab427 Mon Sep 17 00:00:00 2001
From: skiffer-git <44203734@qq.com>
Date: Tue, 23 Apr 2024 19:45:05 +0800
Subject: [PATCH 05/26] update go mod
---
go.mod | 2 +-
go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/go.mod b/go.mod
index f85546e2b..c27621cd4 100644
--- a/go.mod
+++ b/go.mod
@@ -27,7 +27,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/openimsdk/gomake v0.0.9-alpha.3
github.com/openimsdk/protocol v0.0.63
- github.com/openimsdk/tools v0.0.49-alpha.1
+ github.com/openimsdk/tools v0.0.49-alpha.3
github.com/redis/go-redis/v9 v9.5.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
diff --git a/go.sum b/go.sum
index ffb87ecec..322597b3f 100644
--- a/go.sum
+++ b/go.sum
@@ -182,8 +182,8 @@ github.com/openimsdk/gomake v0.0.9-alpha.3 h1:KO3stbmiTksnnx2o2Lh8/FkKXc7qiF4rwP
github.com/openimsdk/gomake v0.0.9-alpha.3/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
-github.com/openimsdk/tools v0.0.49-alpha.1 h1:LtlKh5t/1b1tNikR9LWwV9PIJclUNsVqpEzEke4CMtk=
-github.com/openimsdk/tools v0.0.49-alpha.1/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
+github.com/openimsdk/tools v0.0.49-alpha.3 h1:mXKU09asKTLjj0yCsfqqMizs3ibl1vLimW7ZYzAMw44=
+github.com/openimsdk/tools v0.0.49-alpha.3/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8=
From bf781afcebd4840b3bef6e3e51f23d9ca7bc1161 Mon Sep 17 00:00:00 2001
From: chao <48119764+withchao@users.noreply.github.com>
Date: Wed, 24 Apr 2024 16:46:27 +0800
Subject: [PATCH 06/26] feat: chat admin config (#508)
---
config/share.yml | 4 +---
internal/api/admin/start.go | 2 +-
internal/api/chat/start.go | 2 +-
internal/rpc/admin/start.go | 14 +++++++-------
pkg/common/config/config.go | 10 ++--------
5 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/config/share.yml b/config/share.yml
index 76e1b4427..2eed7bd71 100644
--- a/config/share.yml
+++ b/config/share.yml
@@ -9,8 +9,6 @@ openIM:
adminUserID: imAdmin
chatAdmin:
- - adminID: chatAdmin
- imUserID: imAdmin
- nickname: chatAdmin
+ - "chatAdmin"
#proxyHeader: "X-Forwarded-For"
\ No newline at end of file
diff --git a/internal/api/admin/start.go b/internal/api/admin/start.go
index ce30a64b8..aef4602c3 100644
--- a/internal/api/admin/start.go
+++ b/internal/api/admin/start.go
@@ -55,7 +55,7 @@ func Start(ctx context.Context, index int, config *Config) error {
base := util.Api{
ImUserID: config.Share.OpenIM.AdminUserID,
ProxyHeader: config.Share.ProxyHeader,
- ChatAdminUserID: config.Share.ChatAdmin[0].AdminID,
+ ChatAdminUserID: config.Share.ChatAdmin[0],
}
adminApi := New(chatClient, adminClient, im, &base)
mwApi := chatmw.New(adminClient)
diff --git a/internal/api/chat/start.go b/internal/api/chat/start.go
index d5291c6ad..30ea80ffd 100644
--- a/internal/api/chat/start.go
+++ b/internal/api/chat/start.go
@@ -54,7 +54,7 @@ func Start(ctx context.Context, index int, config *Config) error {
base := util.Api{
ImUserID: config.Share.OpenIM.AdminUserID,
ProxyHeader: config.Share.ProxyHeader,
- ChatAdminUserID: config.Share.ChatAdmin[0].AdminID,
+ ChatAdminUserID: config.Share.ChatAdmin[0],
}
adminApi := New(chatClient, adminClient, im, &base)
mwApi := chatmw.New(adminClient)
diff --git a/internal/rpc/admin/start.go b/internal/rpc/admin/start.go
index 36ac9801a..8d46bf6f1 100644
--- a/internal/rpc/admin/start.go
+++ b/internal/rpc/admin/start.go
@@ -59,7 +59,7 @@ func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryReg
Expires: time.Duration(config.RpcConfig.TokenPolicy.Expire) * time.Hour * 24,
Secret: config.RpcConfig.Secret,
}
- if err := srv.initAdmin(ctx, config.Share.ChatAdmin); err != nil {
+ if err := srv.initAdmin(ctx, config.Share.ChatAdmin, config.Share.OpenIM.AdminUserID); err != nil {
return err
}
pbadmin.RegisterAdminServer(server, &srv)
@@ -72,17 +72,17 @@ type adminServer struct {
Token *tokenverify.Token
}
-func (o *adminServer) initAdmin(ctx context.Context, users []config.AdminUser) error {
- for _, user := range users {
- if _, err := o.Database.GetAdmin(ctx, user.AdminID); err == nil {
+func (o *adminServer) initAdmin(ctx context.Context, admins []string, imUserID string) error {
+ for _, account := range admins {
+ if _, err := o.Database.GetAdmin(ctx, account); err == nil {
continue
} else if !dbutil.IsDBNotFound(err) {
return err
}
- sum := md5.Sum([]byte(user.AdminID))
+ sum := md5.Sum([]byte(account))
a := admin.Admin{
- Account: user.AdminID,
- UserID: user.IMUserID,
+ Account: account,
+ UserID: imUserID,
Password: hex.EncodeToString(sum[:]),
Level: constant.DefaultAdminLevel,
CreateTime: time.Now(),
diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index f08734c34..1412f0e4e 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -21,14 +21,8 @@ type Share struct {
Secret string `mapstructure:"secret"`
AdminUserID string `mapstructure:"adminUserID"`
} `mapstructure:"openIM"`
- ChatAdmin []AdminUser `mapstructure:"chatAdmin"`
- ProxyHeader string `mapstructure:"proxyHeader"`
-}
-
-type AdminUser struct {
- AdminID string `mapstructure:"adminID"`
- IMUserID string `mapstructure:"imUserID"`
- Nickname string `mapstructure:"nickname"`
+ ChatAdmin []string `mapstructure:"chatAdmin"`
+ ProxyHeader string `mapstructure:"proxyHeader"`
}
type RpcRegisterName struct {
From f321a14130cb953534ec46175e4a44d29bd138e7 Mon Sep 17 00:00:00 2001
From: xuan <146319162+wxuanF@users.noreply.github.com>
Date: Wed, 24 Apr 2024 17:56:56 +0800
Subject: [PATCH 07/26] Update action (#514)
* Update chatci.yml
* Rename docker-buildx.yml to docker-buildx.bak
* Update scripts-test.yml
---
.github/workflows/chatci.yml | 31 ++++++-----------
.../{docker-buildx.yml => docker-buildx.bak} | 0
.github/workflows/scripts-test.yml | 34 ++++---------------
3 files changed, 17 insertions(+), 48 deletions(-)
rename .github/workflows/{docker-buildx.yml => docker-buildx.bak} (100%)
diff --git a/.github/workflows/chatci.yml b/.github/workflows/chatci.yml
index 2a612cb5c..e7210eaa1 100644
--- a/.github/workflows/chatci.yml
+++ b/.github/workflows/chatci.yml
@@ -60,29 +60,18 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- - name: Code Typecheck Detector
- uses: kubecub/typecheck@main
-
- - name: Run go modules tidy
- run: |
- sudo make tidy
-
- - name: Run go format
- run: |
- sudo make format
- echo "Run go format successfully"
- continue-on-error: true
-
- - name: Generate all necessary files, such as error code files
+ - name: init
run: |
- make generate
+ sudo bash bootstrap.sh
+ echo "init successfully"
- - name: Run unit test and get test coverage
+ - name: build and start
run: |
- make cover
- continue-on-error: true
+ mage start
+ mage check
- - name: Build source code for host platform
+ - name: restart
run: |
- sudo make build
- echo "Build source code for host platform successfully"
+ mage stop
+ mage start
+ mage check
diff --git a/.github/workflows/docker-buildx.yml b/.github/workflows/docker-buildx.bak
similarity index 100%
rename from .github/workflows/docker-buildx.yml
rename to .github/workflows/docker-buildx.bak
diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml
index 5f9d4263b..34be2029e 100644
--- a/.github/workflows/scripts-test.yml
+++ b/.github/workflows/scripts-test.yml
@@ -71,21 +71,22 @@ jobs:
- name: Build Chat
run: |
- make build
- chmod +x ./scripts/build-all-service.sh
- ./scripts/build-all-service.sh
+ sudo bash bootstrap.sh
+ sudo mage
+ sudo mage start
shell: bash
- name: deploy all services
run: |
git clone https://github.com/openimsdk/open-im-server.git
cd open-im-server
- sudo make init
sudo docker compose up -d
sudo sleep 30
- sudo make start
- sudo make check
+ sudo bash bootstrap.sh
+ sudo mage
+ sudo mage start
+ sudo mage check
sudo cat _output/logs/chat_$(date '+%Y%m%d').log 2>/dev/null
echo "pwd = $(pwd)"
@@ -94,27 +95,6 @@ jobs:
shell: bash
continue-on-error: true
- - name: start all services
- run: |
- sudo make init && \
- sudo make start || \
- (echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
- shell: bash
-
- - name: Check all services
- run: |
- sudo make check || \
- (echo "An error occurred, printing logs:" && sudo cat ./_output/logs/* 2>/dev/null)
- shell: bash
-
- - name: Stop chat
- run: |
- sudo make stop
-
- - name: Reinstall chat
- run: |
- sudo make install
-
- name: Print chat_$(date '+%Y%m%d').log
run: |
ls -al && echo "pwd = $(pwd)"
From 0df840f77c3d9f5d8b20b5d038f2f94ec56a668a Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Wed, 24 Apr 2024 18:03:16 +0800
Subject: [PATCH 08/26] Add comments (#515)
* refactor dockerFile
* Add comments to the configuration file
* feat: chat admin config (#509)
* Add comments to the configuration file
* Remove comments
---------
Co-authored-by: chao <48119764+withchao@users.noreply.github.com>
---
Dockerfile | 2 +-
config/chat-api-admin.yml | 2 ++
config/chat-api-chat.yml | 2 ++
config/chat-rpc-admin.yml | 3 ++
config/chat-rpc-chat.yml | 3 ++
config/log.yml | 7 ++++-
config/mongodb.yml | 9 +++++-
config/redis.yml | 9 +++++-
config/share.yml | 5 +++-
config/zookeeper.yml | 5 +++-
go.mod | 2 +-
go.sum | 4 +--
pkg/common/db/model/admin/ip_forbidden.go | 1 -
pkg/common/db/table/admin/admin.go | 2 +-
pkg/common/db/table/admin/client_config.go | 2 +-
.../db/table/admin/forbidden_account.go | 2 +-
.../db/table/admin/invitation_register.go | 1 -
pkg/common/db/table/admin/ip_forbidden.go | 1 -
.../db/table/admin/limit_user_login_ip.go | 1 -
.../db/table/admin/register_add_friend.go | 1 -
.../db/table/admin/register_add_group.go | 1 -
pkg/common/db/table/chat/account.go | 1 -
pkg/common/db/table/chat/attribute.go | 1 -
pkg/common/db/table/chat/register.go | 1 -
pkg/common/db/table/chat/user_login_record.go | 1 -
pkg/common/xlsx/main.go | 8 +++---
pkg/common/xlsx/utils.go | 13 ++++-----
pkg/eerrs/predefine.go | 28 +++++++++----------
pkg/email/mail.go | 2 +-
29 files changed, 72 insertions(+), 48 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 52e184104..ed17db92e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -43,7 +43,7 @@ COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/
COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
-RUN go get github.com/openimsdk/gomake@v0.0.9-alpha.3
+RUN go get github.com/openimsdk/gomake@v0.0.9
# Set the command to run when the container starts
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"]
diff --git a/config/chat-api-admin.yml b/config/chat-api-admin.yml
index dfc773c9f..e03ee18cf 100644
--- a/config/chat-api-admin.yml
+++ b/config/chat-api-admin.yml
@@ -1,4 +1,6 @@
api:
+ # Listening IP; 0.0.0.0 means both internal and external IPs are listened to, default is recommended
listenIP: 0.0.0.0
+ # Listening ports; if multiple are configured, multiple instances will be launched
ports: [ 10009 ]
diff --git a/config/chat-api-chat.yml b/config/chat-api-chat.yml
index 4c86fed55..c563647de 100644
--- a/config/chat-api-chat.yml
+++ b/config/chat-api-chat.yml
@@ -1,4 +1,6 @@
api:
+ # Listening IP; 0.0.0.0 means both internal and external IPs are listened to, default is recommended
listenIP: 0.0.0.0
+ # Listening ports; if multiple are configured, multiple instances will be launched
ports: [ 10008 ]
diff --git a/config/chat-rpc-admin.yml b/config/chat-rpc-admin.yml
index fb25d131a..7494356fa 100644
--- a/config/chat-rpc-admin.yml
+++ b/config/chat-rpc-admin.yml
@@ -1,6 +1,9 @@
rpc:
+ # The IP address where this RPC service registers itself; if left blank, it defaults to the internal network IP
registerIP: ''
+ # IP address that the RPC service listens on; setting to 0.0.0.0 listens on both internal and external IPs. If left blank, it automatically uses the internal network IP
listenIP: 0.0.0.0
+ # List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances.
ports: [ 30200 ]
tokenPolicy:
diff --git a/config/chat-rpc-chat.yml b/config/chat-rpc-chat.yml
index 264759c61..d015ad63f 100644
--- a/config/chat-rpc-chat.yml
+++ b/config/chat-rpc-chat.yml
@@ -1,6 +1,9 @@
rpc:
+ # The IP address where this RPC service registers itself; if left blank, it defaults to the internal network IP
registerIP: ''
+ # IP address that the RPC service listens on; setting to 0.0.0.0 listens on both internal and external IPs. If left blank, it automatically uses the internal network IP
listenIP: 0.0.0.0
+ # List of ports that the RPC service listens on; configuring multiple ports will launch multiple instances.
ports: [ 30300 ]
verifyCode:
diff --git a/config/log.yml b/config/log.yml
index 081393902..44ff3ee71 100644
--- a/config/log.yml
+++ b/config/log.yml
@@ -1,7 +1,12 @@
+# Log storage path, default is acceptable, change to a full path if modification is needed
storageLocation: ../../../../logs/
+# Log rotation period (in hours), default is acceptable
rotationTime: 24
+# Number of log files to retain, default is acceptable
remainRotationCount: 2
+# Log level settings: 3 for production environment; 6 for more verbose logging in debugging environments
remainLogLevel: 6
+# Whether to output to standard output, default is acceptable
isStdout: false
+# Whether to log in JSON format, default is acceptable
isJson: false
-withStack: false
diff --git a/config/mongodb.yml b/config/mongodb.yml
index 12f1f66a5..98f5694e4 100644
--- a/config/mongodb.yml
+++ b/config/mongodb.yml
@@ -1,7 +1,14 @@
+# URI for database connection, leave empty if using address and credential settings directly
uri: ''
+# List of MongoDB server addresses
address: [ localhost:37017 ]
+# Name of the database
database: openim_v3
+# Username for database authentication
username: openIM
+# Password for database authentication
password: openIM123
+# Maximum number of connections in the connection pool
maxPoolSize: 100
-maxRetry: 10
\ No newline at end of file
+# Maximum number of retry attempts for a failed database connection
+maxRetry: 10
diff --git a/config/redis.yml b/config/redis.yml
index 26becd887..27361ba92 100644
--- a/config/redis.yml
+++ b/config/redis.yml
@@ -1,7 +1,14 @@
+# List of Redis server addresses
address: [ localhost:16379 ]
+# Username for Redis authentication (leave blank if not used)
username: ''
+# Password for Redis authentication
password: openIM123
+# Enable or disable pipeline processing
enablePipeline: false
+# Enable or disable cluster mode
clusterMode: false
+# Database index to be used
db: 0
-maxRetry: 10
\ No newline at end of file
+# Maximum number of retry attempts for a failed connection
+maxRetry: 10
diff --git a/config/share.yml b/config/share.yml
index 2eed7bd71..6b1bab178 100644
--- a/config/share.yml
+++ b/config/share.yml
@@ -4,11 +4,14 @@ rpcRegisterName:
admin: admin
openIM:
+ # OpenIM API address
apiURL: http://127.0.0.1:10002
+ # OpenIM secret key, must be consistent with OpenIM
secret: openIM123
+ # OpenIM administrator userID, must be consistent with OpenIM
adminUserID: imAdmin
chatAdmin:
+ # Default username and password for the admin
- "chatAdmin"
-#proxyHeader: "X-Forwarded-For"
\ No newline at end of file
diff --git a/config/zookeeper.yml b/config/zookeeper.yml
index 73c76e79c..7b7557c93 100644
--- a/config/zookeeper.yml
+++ b/config/zookeeper.yml
@@ -1,5 +1,8 @@
+# Database schema name
schema: openim
+# List of server addresses
address: [ localhost:12181 ]
+# Username for authentication (leave blank if not used)
username: ''
+# Password for authentication (leave blank if not used)
password: ''
-
diff --git a/go.mod b/go.mod
index c27621cd4..f8caab7db 100644
--- a/go.mod
+++ b/go.mod
@@ -25,7 +25,7 @@ require (
require (
github.com/livekit/protocol v1.10.1
github.com/mitchellh/mapstructure v1.5.0
- github.com/openimsdk/gomake v0.0.9-alpha.3
+ github.com/openimsdk/gomake v0.0.9
github.com/openimsdk/protocol v0.0.63
github.com/openimsdk/tools v0.0.49-alpha.3
github.com/redis/go-redis/v9 v9.5.1
diff --git a/go.sum b/go.sum
index 322597b3f..9052f235d 100644
--- a/go.sum
+++ b/go.sum
@@ -178,8 +178,8 @@ github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADym
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
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/openimsdk/gomake v0.0.9-alpha.3 h1:KO3stbmiTksnnx2o2Lh8/FkKXc7qiF4rwPnr01WO7aM=
-github.com/openimsdk/gomake v0.0.9-alpha.3/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
+github.com/openimsdk/gomake v0.0.9 h1:ouf25ygN2PMQ68Gfgns/EQRPiLPnp+77SIr68GfE+n4=
+github.com/openimsdk/gomake v0.0.9/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
github.com/openimsdk/tools v0.0.49-alpha.3 h1:mXKU09asKTLjj0yCsfqqMizs3ibl1vLimW7ZYzAMw44=
diff --git a/pkg/common/db/model/admin/ip_forbidden.go b/pkg/common/db/model/admin/ip_forbidden.go
index 97431e9c3..09fd33c2f 100644
--- a/pkg/common/db/model/admin/ip_forbidden.go
+++ b/pkg/common/db/model/admin/ip_forbidden.go
@@ -62,7 +62,6 @@ func (o *IPForbidden) Search(ctx context.Context, keyword string, state int32, p
switch state {
case constant.LimitNil:
- // 不添加额外的过滤条件
case constant.LimitEmpty:
filter = bson.M{"limit_register": 0, "limit_login": 0}
case constant.LimitOnlyRegisterIP:
diff --git a/pkg/common/db/table/admin/admin.go b/pkg/common/db/table/admin/admin.go
index 059976b5f..4773e2761 100644
--- a/pkg/common/db/table/admin/admin.go
+++ b/pkg/common/db/table/admin/admin.go
@@ -20,7 +20,7 @@ import (
"time"
)
-// Admin 后台管理员.
+// Admin user
type Admin struct {
Account string `bson:"account"`
Password string `bson:"password"`
diff --git a/pkg/common/db/table/admin/client_config.go b/pkg/common/db/table/admin/client_config.go
index 930066839..4b941001c 100644
--- a/pkg/common/db/table/admin/client_config.go
+++ b/pkg/common/db/table/admin/client_config.go
@@ -16,7 +16,7 @@ package admin
import "context"
-// ClientConfig 客户端相关配置项.
+// ClientConfig config
type ClientConfig struct {
Key string `bson:"key"`
Value string `bson:"value"`
diff --git a/pkg/common/db/table/admin/forbidden_account.go b/pkg/common/db/table/admin/forbidden_account.go
index 2e0e5abfd..fb3247618 100644
--- a/pkg/common/db/table/admin/forbidden_account.go
+++ b/pkg/common/db/table/admin/forbidden_account.go
@@ -20,7 +20,7 @@ import (
"time"
)
-// ForbiddenAccount 封号表.
+// ForbiddenAccount table
type ForbiddenAccount struct {
UserID string `bson:"user_id"`
Reason string `bson:"reason"`
diff --git a/pkg/common/db/table/admin/invitation_register.go b/pkg/common/db/table/admin/invitation_register.go
index 40155f453..4970b4adf 100644
--- a/pkg/common/db/table/admin/invitation_register.go
+++ b/pkg/common/db/table/admin/invitation_register.go
@@ -20,7 +20,6 @@ import (
"time"
)
-// 邀请码被注册使用.
type InvitationRegister struct {
InvitationCode string `bson:"invitation_code"`
UsedByUserID string `bson:"used_by_user_id"`
diff --git a/pkg/common/db/table/admin/ip_forbidden.go b/pkg/common/db/table/admin/ip_forbidden.go
index 39577a9a6..15e299d15 100644
--- a/pkg/common/db/table/admin/ip_forbidden.go
+++ b/pkg/common/db/table/admin/ip_forbidden.go
@@ -20,7 +20,6 @@ import (
"time"
)
-// 禁止ip登录 注册.
type IPForbidden struct {
IP string `bson:"ip"`
LimitRegister bool `bson:"limit_register"`
diff --git a/pkg/common/db/table/admin/limit_user_login_ip.go b/pkg/common/db/table/admin/limit_user_login_ip.go
index e167f6334..b3413f272 100644
--- a/pkg/common/db/table/admin/limit_user_login_ip.go
+++ b/pkg/common/db/table/admin/limit_user_login_ip.go
@@ -20,7 +20,6 @@ import (
"time"
)
-// 限制userID只能在某些ip登录.
type LimitUserLoginIP struct {
UserID string `bson:"user_id"`
IP string `bson:"ip"`
diff --git a/pkg/common/db/table/admin/register_add_friend.go b/pkg/common/db/table/admin/register_add_friend.go
index bd864805b..b0888e74c 100644
--- a/pkg/common/db/table/admin/register_add_friend.go
+++ b/pkg/common/db/table/admin/register_add_friend.go
@@ -20,7 +20,6 @@ import (
"time"
)
-// RegisterAddFriend 注册时默认好友.
type RegisterAddFriend struct {
UserID string `bson:"user_id"`
CreateTime time.Time `bson:"create_time"`
diff --git a/pkg/common/db/table/admin/register_add_group.go b/pkg/common/db/table/admin/register_add_group.go
index 1b7f4d12b..ebfd4a011 100644
--- a/pkg/common/db/table/admin/register_add_group.go
+++ b/pkg/common/db/table/admin/register_add_group.go
@@ -20,7 +20,6 @@ import (
"time"
)
-// RegisterAddGroup 注册时默认群组.
type RegisterAddGroup struct {
GroupID string `bson:"group_id"`
CreateTime time.Time `bson:"create_time"`
diff --git a/pkg/common/db/table/chat/account.go b/pkg/common/db/table/chat/account.go
index 414a03266..dba6d68d1 100644
--- a/pkg/common/db/table/chat/account.go
+++ b/pkg/common/db/table/chat/account.go
@@ -19,7 +19,6 @@ import (
"time"
)
-// Account 账号密码表.
type Account struct {
UserID string `bson:"user_id"`
Password string `bson:"password"`
diff --git a/pkg/common/db/table/chat/attribute.go b/pkg/common/db/table/chat/attribute.go
index 1b7ba29b4..57f62f7ef 100644
--- a/pkg/common/db/table/chat/attribute.go
+++ b/pkg/common/db/table/chat/attribute.go
@@ -20,7 +20,6 @@ import (
"time"
)
-// Attribute 用户属性表.
type Attribute struct {
UserID string `bson:"user_id"`
Account string `bson:"account"`
diff --git a/pkg/common/db/table/chat/register.go b/pkg/common/db/table/chat/register.go
index 72d514360..647037ef4 100644
--- a/pkg/common/db/table/chat/register.go
+++ b/pkg/common/db/table/chat/register.go
@@ -19,7 +19,6 @@ import (
"time"
)
-// Register 注册信息表.
type Register struct {
UserID string `bson:"user_id"`
DeviceID string `bson:"device_id"`
diff --git a/pkg/common/db/table/chat/user_login_record.go b/pkg/common/db/table/chat/user_login_record.go
index 6c3a8eda9..0b2b65aa2 100644
--- a/pkg/common/db/table/chat/user_login_record.go
+++ b/pkg/common/db/table/chat/user_login_record.go
@@ -19,7 +19,6 @@ import (
"time"
)
-// 用户登录信息表.
type UserLoginRecord struct {
UserID string `bson:"user_id"`
LoginTime time.Time `bson:"login_time"`
diff --git a/pkg/common/xlsx/main.go b/pkg/common/xlsx/main.go
index c170bd195..3606d8bc1 100644
--- a/pkg/common/xlsx/main.go
+++ b/pkg/common/xlsx/main.go
@@ -38,7 +38,7 @@ func ParseSheet(file *excelize.File, v interface{}) error {
} else if sheetIndex < 0 {
return nil
}
- fieldIndex := make(map[string]int) // 结构体对应的下标
+ fieldIndex := make(map[string]int)
for i := 0; i < itemType.NumField(); i++ {
field := itemType.Field(i)
alias := field.Tag.Get("column")
@@ -54,8 +54,8 @@ func ParseSheet(file *excelize.File, v interface{}) error {
if len(fieldIndex) == 0 {
return errors.New("empty column struct")
}
- sheetIndex := make(map[string]int) // sheet 对应的下标
- for i := 1; ; i++ { // 第一行
+ sheetIndex := make(map[string]int)
+ for i := 1; ; i++ {
name, err := file.GetCellValue(sheetName, GetAxis(i, 1))
if err != nil {
return err
@@ -88,7 +88,7 @@ func ParseSheet(file *excelize.File, v interface{}) error {
return err
}
}
- if notEmpty > 0 { // 空行表示结束
+ if notEmpty > 0 {
putItem(item)
} else {
break
diff --git a/pkg/common/xlsx/utils.go b/pkg/common/xlsx/utils.go
index 885bb9625..fea67dced 100644
--- a/pkg/common/xlsx/utils.go
+++ b/pkg/common/xlsx/utils.go
@@ -22,22 +22,21 @@ func Num2AZ(num int) string {
var (
str string
k int
- temp []int //保存转化后每一位数据的值,然后通过索引的方式匹配A-Z
+ temp []int
)
- //用来匹配的字符A-Z
slices := []string{"", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
- if num > 26 { //数据大于26需要进行拆分
+ if num > 26 {
for {
- k = num % 26 //从个位开始拆分,如果求余为0,说明末尾为26,也就是Z,如果是转化为26进制数,则末尾是可以为0的,这里必须为A-Z中的一个
+ k = num % 26
if k == 0 {
temp = append(temp, 26)
k = 26
} else {
temp = append(temp, k)
}
- num = (num - k) / 26 //减去num最后一位数的值,因为已经记录在temp中
- if num <= 26 { //小于等于26直接进行匹配,不需要进行数据拆分
+ num = (num - k) / 26
+ if num <= 26 {
temp = append(temp, num)
break
}
@@ -46,7 +45,7 @@ func Num2AZ(num int) string {
return slices[num]
}
for _, value := range temp {
- str = slices[value] + str //因为数据切分后存储顺序是反的,所以str要放在后面
+ str = slices[value] + str
}
return str
}
diff --git a/pkg/eerrs/predefine.go b/pkg/eerrs/predefine.go
index 621cba723..6546d53ab 100644
--- a/pkg/eerrs/predefine.go
+++ b/pkg/eerrs/predefine.go
@@ -17,18 +17,18 @@ package eerrs
import "github.com/openimsdk/tools/errs"
var (
- ErrPassword = errs.NewCodeError(20001, "PasswordError") // 密码错误
- ErrAccountNotFound = errs.NewCodeError(20002, "AccountNotFound") // 账号不存在
- ErrPhoneAlreadyRegister = errs.NewCodeError(20003, "PhoneAlreadyRegister") // 手机号已经注册
- ErrAccountAlreadyRegister = errs.NewCodeError(20004, "AccountAlreadyRegister") // 账号已经注册
- ErrVerifyCodeSendFrequently = errs.NewCodeError(20005, "VerifyCodeSendFrequently") // 频繁获取验证码
- ErrVerifyCodeNotMatch = errs.NewCodeError(20006, "VerifyCodeNotMatch") // 验证码错误
- ErrVerifyCodeExpired = errs.NewCodeError(20007, "VerifyCodeExpired") // 验证码过期
- ErrVerifyCodeMaxCount = errs.NewCodeError(20008, "VerifyCodeMaxCount") // 验证码失败次数过多
- ErrVerifyCodeUsed = errs.NewCodeError(20009, "VerifyCodeUsed") // 已经使用
- ErrInvitationCodeUsed = errs.NewCodeError(20010, "InvitationCodeUsed") // 邀请码已经使用
- ErrInvitationNotFound = errs.NewCodeError(20011, "InvitationNotFound") // 邀请码不存在
- ErrForbidden = errs.NewCodeError(20012, "Forbidden") // 限制登录注册
- ErrRefuseFriend = errs.NewCodeError(20013, "RefuseFriend") // 拒绝添加好友
- ErrEmailAlreadyRegister = errs.NewCodeError(20014, "EmailAlreadyRegister") // 邮箱已经注册
+ ErrPassword = errs.NewCodeError(20001, "PasswordError")
+ ErrAccountNotFound = errs.NewCodeError(20002, "AccountNotFound")
+ ErrPhoneAlreadyRegister = errs.NewCodeError(20003, "PhoneAlreadyRegister")
+ ErrAccountAlreadyRegister = errs.NewCodeError(20004, "AccountAlreadyRegister")
+ ErrVerifyCodeSendFrequently = errs.NewCodeError(20005, "VerifyCodeSendFrequently")
+ ErrVerifyCodeNotMatch = errs.NewCodeError(20006, "VerifyCodeNotMatch")
+ ErrVerifyCodeExpired = errs.NewCodeError(20007, "VerifyCodeExpired")
+ ErrVerifyCodeMaxCount = errs.NewCodeError(20008, "VerifyCodeMaxCount")
+ ErrVerifyCodeUsed = errs.NewCodeError(20009, "VerifyCodeUsed")
+ ErrInvitationCodeUsed = errs.NewCodeError(20010, "InvitationCodeUsed")
+ ErrInvitationNotFound = errs.NewCodeError(20011, "InvitationNotFound")
+ ErrForbidden = errs.NewCodeError(20012, "Forbidden")
+ ErrRefuseFriend = errs.NewCodeError(20013, "RefuseFriend")
+ ErrEmailAlreadyRegister = errs.NewCodeError(20014, "EmailAlreadyRegister")
)
diff --git a/pkg/email/mail.go b/pkg/email/mail.go
index 42194b6c0..1c1d2d1d4 100644
--- a/pkg/email/mail.go
+++ b/pkg/email/mail.go
@@ -50,6 +50,6 @@ func (m *mail) SendMail(ctx context.Context, mail string, verifyCode string) err
msg.SetHeader(`From`, m.senderMail)
msg.SetHeader(`To`, []string{mail}...)
msg.SetHeader(`Subject`, m.title)
- msg.SetBody(`text/html`, fmt.Sprintf("您的验证码为:%s,该验证码5分钟内有效,请勿泄露于他人。", verifyCode))
+ msg.SetBody(`text/html`, fmt.Sprintf("Your verification code is: %s. This code is valid for 5 minutes and should not be shared with others", verifyCode))
return errs.Wrap(m.dail.DialAndSend(msg))
}
From b82381f2f7d68c86023245a43b28f33fa1de5413 Mon Sep 17 00:00:00 2001
From: xuan <146319162+wxuanF@users.noreply.github.com>
Date: Wed, 24 Apr 2024 18:23:54 +0800
Subject: [PATCH 09/26] Updata action (#518)
* Update scripts-test.yml
* Update chatci.yml
---
.github/workflows/chatci.yml | 11 -----------
.github/workflows/scripts-test.yml | 25 +++++++------------------
2 files changed, 7 insertions(+), 29 deletions(-)
diff --git a/.github/workflows/chatci.yml b/.github/workflows/chatci.yml
index e7210eaa1..c54e08219 100644
--- a/.github/workflows/chatci.yml
+++ b/.github/workflows/chatci.yml
@@ -64,14 +64,3 @@ jobs:
run: |
sudo bash bootstrap.sh
echo "init successfully"
-
- - name: build and start
- run: |
- mage start
- mage check
-
- - name: restart
- run: |
- mage stop
- mage start
- mage check
diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml
index 34be2029e..b66e8a9b1 100644
--- a/.github/workflows/scripts-test.yml
+++ b/.github/workflows/scripts-test.yml
@@ -43,17 +43,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- - name: Set up environment
- run: |
- if [ "$RUNNER_OS" == "Linux" ]; then
- sudo apt-get update
- # Add other Linux specific setup here
- elif [ "$RUNNER_OS" == "macOS" ]; then
- # Add macOS specific setup here
- brew update
- fi
- shell: bash
-
# - name: Install latest Bash (macOS only)
# if: runner.os == 'macOS'
# run: |
@@ -69,13 +58,6 @@ jobs:
# brew install --cask docker
# open /Applications/Docker.app
- - name: Build Chat
- run: |
- sudo bash bootstrap.sh
- sudo mage
- sudo mage start
- shell: bash
-
- name: deploy all services
run: |
git clone https://github.com/openimsdk/open-im-server.git
@@ -95,6 +77,13 @@ jobs:
shell: bash
continue-on-error: true
+ - name: Build Chat
+ run: |
+ sudo bash bootstrap.sh
+ sudo mage
+ sudo mage start
+ shell: bash
+
- name: Print chat_$(date '+%Y%m%d').log
run: |
ls -al && echo "pwd = $(pwd)"
From c12a3cae0ddb4bbc0ee77b017d43e4fc799f33ec Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Wed, 24 Apr 2024 18:48:06 +0800
Subject: [PATCH 10/26] Update CODEOWNERS
---
docs/CODEOWNERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS
index 0242ac0ea..f3a3a550d 100644
--- a/docs/CODEOWNERS
+++ b/docs/CODEOWNERS
@@ -1 +1 @@
-* @openimsdk/go-code-review @openimsdk/bot @cubxxw
+* @openimsdk/go-code-review @skiffer-git @withchao
From f60a82f29e7f23e0ef01a75e79295d33ecb0971d Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Wed, 24 Apr 2024 18:57:00 +0800
Subject: [PATCH 11/26] code reviewer (#522)
* refactor dockerFile
* Add comments to the configuration file
* feat: chat admin config (#509)
* Add comments to the configuration file
* Remove comments
* add withchao as code reviewer
* add withchao as code reviewer
---------
Co-authored-by: chao <48119764+withchao@users.noreply.github.com>
From 43cb62ee8a4028cf73ab9359f10d5747c67ddaca Mon Sep 17 00:00:00 2001
From: xuan <146319162+wxuanF@users.noreply.github.com>
Date: Wed, 24 Apr 2024 18:57:54 +0800
Subject: [PATCH 12/26] Update config.yaml (#519)
* Update config.yaml
* Update admin.pb.go
* Update config.yaml
* Update scripts-test.yml
---
.github/workflows/scripts-test.yml | 3 --
deployments/helm-charts/config.yaml | 50 ++++++++++++++---------------
pkg/protocol/admin/admin.pb.go | 8 ++---
3 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml
index b66e8a9b1..7da773adb 100644
--- a/.github/workflows/scripts-test.yml
+++ b/.github/workflows/scripts-test.yml
@@ -70,7 +70,6 @@ jobs:
sudo mage start
sudo mage check
- sudo cat _output/logs/chat_$(date '+%Y%m%d').log 2>/dev/null
echo "pwd = $(pwd)"
cd ..
ls -al && pwd
@@ -87,7 +86,5 @@ jobs:
- name: Print chat_$(date '+%Y%m%d').log
run: |
ls -al && echo "pwd = $(pwd)"
- sudo cat ./_output/logs/* 2>/dev/null
- sudo cat ./_output/logs/* 2>/dev/null >> "$GITHUB_OUTPUT"
shell: bash
continue-on-error: true
diff --git a/deployments/helm-charts/config.yaml b/deployments/helm-charts/config.yaml
index ee50fa60a..6be98c93f 100644
--- a/deployments/helm-charts/config.yaml
+++ b/deployments/helm-charts/config.yaml
@@ -51,8 +51,8 @@ config:
listenIP:
rpc:
- registerIP: #作为rpc启动时,注册到zookeeper的IP,api/gateway能访问到此ip和对应的rpcPort中的端口
- listenIP: #默认为0.0.0.0
+ registerIP:
+ listenIP:
rpcPort:
openImAdminPort: [ 80 ]
@@ -61,25 +61,25 @@ config:
openImAdminName: openimchat-admin-rpc:80
openImChatName: openimchat-chat-rpc:80
- # 没有配置表示和OpenIM一致
+
mysql:
- address: [ im-mysql:3306 ] #目前仅支持单机
- username: root #用户名
- password: openIM123 #密码
- #database: openIM_v2 #不建议修改
- maxOpenConn: 1000 #最大连接数
- maxIdleConn: 100 #最大空闲连接数
- maxLifeTime: 60 #连接可以重复使用的最长时间(秒)
- logLevel: 4 #日志级别 1=slient 2=error 3=warn 4=info
- slowThreshold: 500 #慢语句阈值 (毫秒)
+ address: [ im-mysql:3306 ]
+ username: root
+ password: openIM123
+ #database: openIM_v2
+ maxOpenConn: 1000
+ maxIdleConn: 100
+ maxLifeTime: 60
+ logLevel: 4
+ slowThreshold: 500
database: openim_enterprise
- # 没有配置表示和OpenIM一致
+
log:
- storageLocation: ../_output/logs/ #存放目录
- rotationTime: 24 #日志旋转时间
- remainRotationCount: 2 #日志数量
- remainLogLevel: 6 #日志级别 6表示全都打印,
+ storageLocation: ../_output/logs/
+ rotationTime: 24
+ remainRotationCount: 2
+ remainLogLevel: 6
isStdout: true
isJson: false
withStack: false
@@ -91,13 +91,13 @@ config:
expire: 86400
verifyCode:
- validTime: 300 # 验证码有效时间
- validCount: 5 # 验证码有效次数
- uintTime: 86400 # 单位时间间隔
- maxCount: 10 # 单位时间内最大获取次数
- superCode: "666666" # 超级验证码(只有use为空时使用)
- len: 6 # 验证码长度
- use: "" # 使用的验证码服务(use: "ali")
+ validTime: 300
+ validCount: 5
+ uintTime: 86400
+ maxCount: 10
+ superCode: "666666"
+ len: 6
+ use: ""
ali:
endpoint: "dysmsapi.aliyuncs.com"
accessKeyId: ""
@@ -105,7 +105,7 @@ config:
signName: ""
verificationCodeTemplateCode: ""
- # 获取ip的header,没有配置直接获取远程地址
+
#proxyHeader: "X-Forwarded-For"
adminList:
diff --git a/pkg/protocol/admin/admin.pb.go b/pkg/protocol/admin/admin.pb.go
index b2b7b48a2..30df0d2f6 100644
--- a/pkg/protocol/admin/admin.pb.go
+++ b/pkg/protocol/admin/admin.pb.go
@@ -41,7 +41,7 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
-// 登录
+// login
type LoginReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3288,7 +3288,7 @@ func (*DelIPForbiddenResp) Descriptor() ([]byte, []int) {
return file_admin_admin_proto_rawDescGZIP(), []int{62}
}
-// ################### 用户限制 ###################
+// ################### user limit ###################
type CheckRegisterForbiddenReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3467,7 +3467,7 @@ func (*CheckLoginForbiddenResp) Descriptor() ([]byte, []int) {
return file_admin_admin_proto_rawDescGZIP(), []int{66}
}
-// ################### 注销 ###################
+// ################### logout ###################
type CancellationUserReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3561,7 +3561,7 @@ func (*CancellationUserResp) Descriptor() ([]byte, []int) {
return file_admin_admin_proto_rawDescGZIP(), []int{68}
}
-// ################### 封号、解封 ###################
+
type BlockUserReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
From 028afccbea2f760682623d4e0f6691f77852783a Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Thu, 25 Apr 2024 19:51:01 +0800
Subject: [PATCH 13/26] Update slack invite link
---
README.md | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/README.md b/README.md
index ab0f301ae..9e466965c 100644
--- a/README.md
+++ b/README.md
@@ -24,11 +24,8 @@ You may use the OpenIM source code to create compiled versions not originally pr
## :busts_in_silhouette: Community
+ 💬 [Follow our Twitter account](https://twitter.com/founder_im63606)
-+ 👫 [Join our Reddit](https://www.reddit.com/r/OpenIMessaging)
-+ 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
++ 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-2hljfom5u-9ZuzP3NfEKW~BJKbpLm0Hw)
+ :eyes: [Join our WeChat group](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
-+ 📚 [OpenIM Community](https://github.com/openimsdk/community)
-+ 💕 [OpenIM Interest Groups](https://github.com/Openim-sigs)
## 🛫 Quick Start
From 997f23fd2f2ceab5f7ba7ba7429d5771c27cdb9e Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Thu, 25 Apr 2024 19:51:51 +0800
Subject: [PATCH 14/26] Update slack invite link
---
README_zh_CN.md | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/README_zh_CN.md b/README_zh_CN.md
index fb190a1f0..3b5694bec 100644
--- a/README_zh_CN.md
+++ b/README_zh_CN.md
@@ -24,11 +24,8 @@
## :busts_in_silhouette: 社区
+ 💬 [关注我们的 Twitter 账户](https://twitter.com/founder_im63606)
-+ 👫 [加入我们的 Reddit](https://www.reddit.com/r/OpenIMessaging)
-+ 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)
++ 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-2hljfom5u-9ZuzP3NfEKW~BJKbpLm0Hw)
+ :eyes: [加入我们的微信群](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
-+ 📚 [OpenIM 社区](https://github.com/openimsdk/community)
-+ 💕 [OpenIM 兴趣小组](https://github.com/Openim-sigs)
## 🛫 快速开始
From 6ce4881986ba15c56194d37157bfe3c3860715c7 Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Tue, 14 May 2024 18:21:56 +0800
Subject: [PATCH 15/26] Etcd naming and discovery (#540)
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
* etcd naming and discovery
---
config/discovery.yml | 13 +++++++++
config/zookeeper.yml | 8 -----
go.mod | 12 ++++++--
go.sum | 42 ++++++++++++++++++++++-----
internal/api/admin/start.go | 13 ++++-----
internal/api/chat/start.go | 11 +++----
internal/rpc/admin/start.go | 10 +++----
internal/rpc/chat/start.go | 10 +++----
pkg/common/cmd/admin_api.go | 2 +-
pkg/common/cmd/admin_rpc.go | 4 +--
pkg/common/cmd/chat_api.go | 2 +-
pkg/common/cmd/chat_rpc.go | 4 +--
pkg/common/cmd/constant.go | 4 +--
pkg/common/config/config.go | 13 +++++++++
pkg/common/kdisc/discoveryregister.go | 24 +++++++++------
pkg/common/startrpc/start.go | 4 +--
tools/check-component/main.go | 32 +++++++++++++++-----
17 files changed, 138 insertions(+), 70 deletions(-)
create mode 100644 config/discovery.yml
delete mode 100644 config/zookeeper.yml
diff --git a/config/discovery.yml b/config/discovery.yml
new file mode 100644
index 000000000..3d96ff9b6
--- /dev/null
+++ b/config/discovery.yml
@@ -0,0 +1,13 @@
+enable: "etcd"
+etcd:
+ rootDirectory: openim
+ address: [ localhost:12379 ]
+ username: ''
+ password: ''
+
+zookeeper:
+ schema: openim
+ address: [ localhost:12181 ]
+ username: ''
+ password: ''
+
diff --git a/config/zookeeper.yml b/config/zookeeper.yml
deleted file mode 100644
index 7b7557c93..000000000
--- a/config/zookeeper.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-# Database schema name
-schema: openim
-# List of server addresses
-address: [ localhost:12181 ]
-# Username for authentication (leave blank if not used)
-username: ''
-# Password for authentication (leave blank if not used)
-password: ''
diff --git a/go.mod b/go.mod
index f8caab7db..53142888e 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.21.2
require (
github.com/gin-gonic/gin v1.9.1
github.com/golang-jwt/jwt/v4 v4.5.0
- github.com/golang/protobuf v1.5.3 // indirect
+ github.com/golang/protobuf v1.5.4 // indirect
github.com/google/uuid v1.6.0
github.com/jinzhu/copier v0.4.0 // indirect
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect
@@ -27,7 +27,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/openimsdk/gomake v0.0.9
github.com/openimsdk/protocol v0.0.63
- github.com/openimsdk/tools v0.0.49-alpha.3
+ github.com/openimsdk/tools v0.0.49-alpha.18
github.com/redis/go-redis/v9 v9.5.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
@@ -48,6 +48,8 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/clbanning/mxj/v2 v2.5.6 // indirect
+ github.com/coreos/go-semver v0.3.0 // indirect
+ github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
@@ -59,6 +61,7 @@ require (
github.com/go-playground/validator/v10 v10.18.0 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
github.com/goccy/go-json v0.10.2 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -100,6 +103,9 @@ require (
github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
+ go.etcd.io/etcd/api/v3 v3.5.13 // indirect
+ go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect
+ go.etcd.io/etcd/client/v3 v3.5.13 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.3.0 // indirect
@@ -109,6 +115,8 @@ require (
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
+ google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
diff --git a/go.sum b/go.sum
index 9052f235d..97b72ffb3 100644
--- a/go.sum
+++ b/go.sum
@@ -45,6 +45,10 @@ github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583j
github.com/clbanning/mxj/v2 v2.5.5/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/clbanning/mxj/v2 v2.5.6 h1:Jm4VaCI/+Ug5Q57IzEoZbwx4iQFA6wkXv72juUSeK+g=
github.com/clbanning/mxj/v2 v2.5.6/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
+github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -88,14 +92,15 @@ github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg
github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
-github.com/golang/protobuf v1.5.3/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/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
@@ -122,6 +127,8 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/jxskiss/base62 v1.1.0 h1:A5zbF8v8WXx2xixnAKD2w+abC+sIzYJX+nxmhA6HWFw=
github.com/jxskiss/base62 v1.1.0/go.mod h1:HhWAlUXvxKThfOlZbcuFzsqwtF5TcqS9ru3y5GfjWAc=
+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.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
@@ -182,8 +189,8 @@ github.com/openimsdk/gomake v0.0.9 h1:ouf25ygN2PMQ68Gfgns/EQRPiLPnp+77SIr68GfE+n
github.com/openimsdk/gomake v0.0.9/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
-github.com/openimsdk/tools v0.0.49-alpha.3 h1:mXKU09asKTLjj0yCsfqqMizs3ibl1vLimW7ZYzAMw44=
-github.com/openimsdk/tools v0.0.49-alpha.3/go.mod h1:P4oGP1Pd+d4ctbLD5U/XQTgl8yu8Hd3skx640Fr69ko=
+github.com/openimsdk/tools v0.0.49-alpha.18 h1:ARQeCiRmExvtB6XYItegThuV63JGOTxddwhSLHYXd78=
+github.com/openimsdk/tools v0.0.49-alpha.18/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8=
@@ -308,11 +315,18 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
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.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
+go.etcd.io/etcd/api/v3 v3.5.13 h1:8WXU2/NBge6AUF1K1gOexB6e07NgsN1hXK0rSTtgSp4=
+go.etcd.io/etcd/api/v3 v3.5.13/go.mod h1:gBqlqkcMMZMVTMm4NDZloEVJzxQOQIls8splbqBDa0c=
+go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg=
+go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8=
+go.etcd.io/etcd/client/v3 v3.5.13 h1:o0fHTNJLeO0MyVbc7I3fsCf6nrOqn5d+diSarKnB2js=
+go.etcd.io/etcd/client/v3 v3.5.13/go.mod h1:cqiAeY8b5DEEcpxvgWKsbLIWNM/8Wy2xJSDMtioMcoI=
go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80=
go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
@@ -330,6 +344,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
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-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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
@@ -342,6 +357,7 @@ golang.org/x/image v0.11.0/go.mod h1:bglhjqbqVuEb9e9+eNR45Jfu7D+T4Qan+NhQk8Ck2P8
golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8=
golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
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.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/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
@@ -349,6 +365,7 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-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-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
@@ -360,6 +377,7 @@ golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
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-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.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
@@ -369,6 +387,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/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-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -403,17 +422,22 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
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.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ=
+google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro=
+google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU=
+google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk=
google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE=
-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.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
@@ -429,6 +453,8 @@ 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/yaml.v2 v2.2.2/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-20200313102051-9f266ea9e77c/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=
diff --git a/internal/api/admin/start.go b/internal/api/admin/start.go
index aef4602c3..05a1799b3 100644
--- a/internal/api/admin/start.go
+++ b/internal/api/admin/start.go
@@ -19,9 +19,10 @@ import (
)
type Config struct {
- ApiConfig config.API
- ZookeeperConfig config.ZooKeeper
- Share config.Share
+ ApiConfig config.API
+
+ Discovery config.Discovery
+ Share config.Share
}
func Start(ctx context.Context, index int, config *Config) error {
@@ -32,15 +33,11 @@ func Start(ctx context.Context, index int, config *Config) error {
if err != nil {
return err
}
- client, err := kdisc.NewDiscoveryRegister(&config.ZookeeperConfig, &config.Share)
+ client, err := kdisc.NewDiscoveryRegister(&config.Discovery)
if err != nil {
return err
}
- if err = client.CreateRpcRootNodes(config.Share.RpcRegisterName.GetServiceNames()); err != nil {
- return errs.WrapMsg(err, "failed to create RPC root nodes")
- }
-
chatConn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Chat, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
if err != nil {
return err
diff --git a/internal/api/chat/start.go b/internal/api/chat/start.go
index 30ea80ffd..71a3d4834 100644
--- a/internal/api/chat/start.go
+++ b/internal/api/chat/start.go
@@ -19,9 +19,9 @@ import (
)
type Config struct {
- ApiConfig config.API
- ZookeeperConfig config.ZooKeeper
- Share config.Share
+ ApiConfig config.API
+ Discovery config.Discovery
+ Share config.Share
}
func Start(ctx context.Context, index int, config *Config) error {
@@ -32,14 +32,11 @@ func Start(ctx context.Context, index int, config *Config) error {
if err != nil {
return err
}
- client, err := kdisc.NewDiscoveryRegister(&config.ZookeeperConfig, &config.Share)
+ client, err := kdisc.NewDiscoveryRegister(&config.Discovery)
if err != nil {
return err
}
- if err = client.CreateRpcRootNodes(config.Share.RpcRegisterName.GetServiceNames()); err != nil {
- return errs.WrapMsg(err, "failed to create RPC root nodes")
- }
chatConn, err := client.GetConn(ctx, config.Share.RpcRegisterName.Chat, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient())
if err != nil {
return err
diff --git a/internal/rpc/admin/start.go b/internal/rpc/admin/start.go
index 8d46bf6f1..bc597f58c 100644
--- a/internal/rpc/admin/start.go
+++ b/internal/rpc/admin/start.go
@@ -25,11 +25,11 @@ import (
)
type Config struct {
- RpcConfig config.Admin
- RedisConfig config.Redis
- MongodbConfig config.Mongo
- ZookeeperConfig config.ZooKeeper
- Share config.Share
+ RpcConfig config.Admin
+ RedisConfig config.Redis
+ MongodbConfig config.Mongo
+ Discovery config.Discovery
+ Share config.Share
}
func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error {
diff --git a/internal/rpc/chat/start.go b/internal/rpc/chat/start.go
index ed62eaeaa..fd14fe7cc 100644
--- a/internal/rpc/chat/start.go
+++ b/internal/rpc/chat/start.go
@@ -22,11 +22,11 @@ import (
)
type Config struct {
- RpcConfig config.Chat
- RedisConfig config.Redis
- MongodbConfig config.Mongo
- ZookeeperConfig config.ZooKeeper
- Share config.Share
+ RpcConfig config.Chat
+ RedisConfig config.Redis
+ MongodbConfig config.Mongo
+ Discovery config.Discovery
+ Share config.Share
}
func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error {
diff --git a/pkg/common/cmd/admin_api.go b/pkg/common/cmd/admin_api.go
index 56a1fbf14..47b2469f9 100644
--- a/pkg/common/cmd/admin_api.go
+++ b/pkg/common/cmd/admin_api.go
@@ -20,7 +20,7 @@ func NewAdminApiCmd() *AdminApiCmd {
ret.configMap = map[string]any{
ShareFileName: &ret.apiConfig.Share,
ChatAPIAdminCfgFileName: &ret.apiConfig.ApiConfig,
- ZookeeperConfigFileName: &ret.apiConfig.ZookeeperConfig,
+ DiscoveryConfigFileName: &ret.apiConfig.Discovery,
}
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version)
diff --git a/pkg/common/cmd/admin_rpc.go b/pkg/common/cmd/admin_rpc.go
index 384c0be51..92a9b3491 100644
--- a/pkg/common/cmd/admin_rpc.go
+++ b/pkg/common/cmd/admin_rpc.go
@@ -35,7 +35,7 @@ func NewAdminRpcCmd() *AdminRpcCmd {
ret.configMap = map[string]any{
ChatRPCAdminCfgFileName: &ret.adminConfig.RpcConfig,
RedisConfigFileName: &ret.adminConfig.RedisConfig,
- ZookeeperConfigFileName: &ret.adminConfig.ZookeeperConfig,
+ DiscoveryConfigFileName: &ret.adminConfig.Discovery,
MongodbConfigFileName: &ret.adminConfig.MongodbConfig,
ShareFileName: &ret.adminConfig.Share,
}
@@ -52,7 +52,7 @@ func (a *AdminRpcCmd) Exec() error {
}
func (a *AdminRpcCmd) runE() error {
- return startrpc.Start(a.ctx, &a.adminConfig.ZookeeperConfig, a.adminConfig.RpcConfig.RPC.ListenIP,
+ return startrpc.Start(a.ctx, &a.adminConfig.Discovery, a.adminConfig.RpcConfig.RPC.ListenIP,
a.adminConfig.RpcConfig.RPC.RegisterIP, a.adminConfig.RpcConfig.RPC.Ports,
a.Index(), a.adminConfig.Share.RpcRegisterName.Admin, &a.adminConfig.Share, &a.adminConfig, admin.Start)
}
diff --git a/pkg/common/cmd/chat_api.go b/pkg/common/cmd/chat_api.go
index 11e3de7b8..5e85f11c2 100644
--- a/pkg/common/cmd/chat_api.go
+++ b/pkg/common/cmd/chat_api.go
@@ -20,7 +20,7 @@ func NewChatApiCmd() *ChatApiCmd {
ret.configMap = map[string]any{
ShareFileName: &ret.apiConfig.Share,
ChatAPIChatCfgFileName: &ret.apiConfig.ApiConfig,
- ZookeeperConfigFileName: &ret.apiConfig.ZookeeperConfig,
+ DiscoveryConfigFileName: &ret.apiConfig.Discovery,
}
ret.RootCmd = NewRootCmd(program.GetProcessName(), WithConfigMap(ret.configMap))
ret.ctx = context.WithValue(context.Background(), "version", config.Version)
diff --git a/pkg/common/cmd/chat_rpc.go b/pkg/common/cmd/chat_rpc.go
index cb025c820..92520d928 100644
--- a/pkg/common/cmd/chat_rpc.go
+++ b/pkg/common/cmd/chat_rpc.go
@@ -35,7 +35,7 @@ func NewChatRpcCmd() *ChatRpcCmd {
ret.configMap = map[string]any{
ChatRPCChatCfgFileName: &ret.chatConfig.RpcConfig,
RedisConfigFileName: &ret.chatConfig.RedisConfig,
- ZookeeperConfigFileName: &ret.chatConfig.ZookeeperConfig,
+ DiscoveryConfigFileName: &ret.chatConfig.Discovery,
MongodbConfigFileName: &ret.chatConfig.MongodbConfig,
ShareFileName: &ret.chatConfig.Share,
}
@@ -52,7 +52,7 @@ func (a *ChatRpcCmd) Exec() error {
}
func (a *ChatRpcCmd) runE() error {
- return startrpc.Start(a.ctx, &a.chatConfig.ZookeeperConfig, a.chatConfig.RpcConfig.RPC.ListenIP,
+ return startrpc.Start(a.ctx, &a.chatConfig.Discovery, a.chatConfig.RpcConfig.RPC.ListenIP,
a.chatConfig.RpcConfig.RPC.RegisterIP, a.chatConfig.RpcConfig.RPC.Ports,
a.Index(), a.chatConfig.Share.RpcRegisterName.Chat, &a.chatConfig.Share, &a.chatConfig, chat.Start)
}
diff --git a/pkg/common/cmd/constant.go b/pkg/common/cmd/constant.go
index 75115d642..b07147d69 100644
--- a/pkg/common/cmd/constant.go
+++ b/pkg/common/cmd/constant.go
@@ -21,7 +21,7 @@ import (
var (
ShareFileName = "share.yml"
RedisConfigFileName = "redis.yml"
- ZookeeperConfigFileName = "zookeeper.yml"
+ DiscoveryConfigFileName = "discovery.yml"
MongodbConfigFileName = "mongodb.yml"
LogConfigFileName = "log.yml"
ChatAPIAdminCfgFileName = "chat-api-admin.yml"
@@ -37,7 +37,7 @@ func init() {
fileNames := []string{
ShareFileName,
RedisConfigFileName,
- ZookeeperConfigFileName,
+ DiscoveryConfigFileName,
MongodbConfigFileName,
LogConfigFileName,
ChatAPIAdminCfgFileName,
diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go
index 1412f0e4e..6f926660a 100644
--- a/pkg/common/config/config.go
+++ b/pkg/common/config/config.go
@@ -94,6 +94,19 @@ type ZooKeeper struct {
Password string `mapstructure:"password"`
}
+type Discovery struct {
+ Enable string `mapstructure:"enable"`
+ Etcd Etcd `mapstructure:"etcd"`
+ ZooKeeper ZooKeeper `mapstructure:"zooKeeper"`
+}
+
+type Etcd struct {
+ RootDirectory string `mapstructure:"rootDirectory"`
+ Address []string `mapstructure:"address"`
+ Username string `mapstructure:"username"`
+ Password string `mapstructure:"password"`
+}
+
type Chat struct {
RPC struct {
RegisterIP string `mapstructure:"registerIP"`
diff --git a/pkg/common/kdisc/discoveryregister.go b/pkg/common/kdisc/discoveryregister.go
index eb5bbdcc0..06e2148f1 100644
--- a/pkg/common/kdisc/discoveryregister.go
+++ b/pkg/common/kdisc/discoveryregister.go
@@ -17,6 +17,7 @@ package kdisc
import (
"github.com/openimsdk/chat/pkg/common/config"
"github.com/openimsdk/tools/discovery"
+ "github.com/openimsdk/tools/discovery/etcd"
"github.com/openimsdk/tools/discovery/zookeeper"
"github.com/openimsdk/tools/errs"
"time"
@@ -29,20 +30,25 @@ const (
)
// NewDiscoveryRegister creates a new service discovery and registry client based on the provided environment type.
-func NewDiscoveryRegister(zookeeperConfig *config.ZooKeeper, share *config.Share) (discovery.SvcDiscoveryRegistry, error) {
- switch share.Env {
- case zookeeperConst:
+func NewDiscoveryRegister(discovery *config.Discovery) (discovery.SvcDiscoveryRegistry, error) {
+ switch discovery.Enable {
+ case "zookeeper":
return zookeeper.NewZkClient(
- zookeeperConfig.Address,
- zookeeperConfig.Schema,
+ discovery.ZooKeeper.Address,
+ discovery.ZooKeeper.Schema,
zookeeper.WithFreq(time.Hour),
- zookeeper.WithUserNameAndPassword(zookeeperConfig.Username, zookeeperConfig.Password),
+ zookeeper.WithUserNameAndPassword(discovery.ZooKeeper.Username, discovery.ZooKeeper.Password),
zookeeper.WithRoundRobin(),
zookeeper.WithTimeout(10),
)
- //case directConst:
- // return direct.NewConnDirect(config)
+ case "etcd":
+ return etcd.NewSvcDiscoveryRegistry(
+ discovery.Etcd.RootDirectory,
+ discovery.Etcd.Address,
+ etcd.WithDialTimeout(10*time.Second),
+ etcd.WithMaxCallSendMsgSize(20*1024*1024),
+ etcd.WithUsernameAndPassword(discovery.Etcd.Username, discovery.Etcd.Password))
default:
- return nil, errs.New("unsupported discovery type", "type", share.Env).Wrap()
+ return nil, errs.New("unsupported discovery type", "type", discovery.Enable).Wrap()
}
}
diff --git a/pkg/common/startrpc/start.go b/pkg/common/startrpc/start.go
index 6556f89ce..ca394c694 100644
--- a/pkg/common/startrpc/start.go
+++ b/pkg/common/startrpc/start.go
@@ -39,7 +39,7 @@ import (
)
// Start rpc server.
-func Start[T any](ctx context.Context, zookeeperConfig *config.ZooKeeper, listenIP,
+func Start[T any](ctx context.Context, discovery *config.Discovery, listenIP,
registerIP string, rpcPorts []int, index int, rpcRegisterName string, share *config.Share, config T, rpcFn func(ctx context.Context,
config T, client discovery.SvcDiscoveryRegistry, server *grpc.Server) error, options ...grpc.ServerOption) error {
@@ -58,7 +58,7 @@ func Start[T any](ctx context.Context, zookeeperConfig *config.ZooKeeper, listen
}
defer listener.Close()
- client, err := kdisc.NewDiscoveryRegister(zookeeperConfig, share)
+ client, err := kdisc.NewDiscoveryRegister(discovery)
if err != nil {
return err
}
diff --git a/tools/check-component/main.go b/tools/check-component/main.go
index f0719943e..131da4c9b 100644
--- a/tools/check-component/main.go
+++ b/tools/check-component/main.go
@@ -24,6 +24,7 @@ import (
"github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/redisutil"
+ "github.com/openimsdk/tools/discovery/etcd"
"github.com/openimsdk/tools/discovery/zookeeper"
"github.com/openimsdk/tools/mcontext"
"github.com/openimsdk/tools/system/program"
@@ -38,6 +39,14 @@ func CheckZookeeper(ctx context.Context, config *config.ZooKeeper) error {
return zookeeper.Check(ctx, config.Address, config.Schema, zookeeper.WithUserNameAndPassword(config.Username, config.Password))
}
+func CheckEtcd(ctx context.Context, config *config.Etcd) error {
+ return etcd.Check(ctx, config.Address, "/check_chat_component",
+ true,
+ etcd.WithDialTimeout(10*time.Second),
+ etcd.WithMaxCallSendMsgSize(20*1024*1024),
+ etcd.WithUsernameAndPassword(config.Username, config.Password))
+}
+
func CheckMongo(ctx context.Context, config *config.Mongo) error {
return mongoutil.Check(ctx, config.Build())
}
@@ -52,11 +61,11 @@ func CheckOpenIM(ctx context.Context, apiURL, secret, adminUserID string) error
return err
}
-func initConfig(configDir string) (*config.Mongo, *config.Redis, *config.ZooKeeper, *config.Share, error) {
+func initConfig(configDir string) (*config.Mongo, *config.Redis, *config.Discovery, *config.Share, error) {
var (
mongoConfig = &config.Mongo{}
redisConfig = &config.Redis{}
- zookeeperConfig = &config.ZooKeeper{}
+ discoveryConfig = &config.Discovery{}
shareConfig = &config.Share{}
)
err := config.LoadConfig(filepath.Join(configDir, cmd.MongodbConfigFileName), cmd.ConfigEnvPrefixMap[cmd.MongodbConfigFileName], mongoConfig)
@@ -69,7 +78,7 @@ func initConfig(configDir string) (*config.Mongo, *config.Redis, *config.ZooKeep
return nil, nil, nil, nil, err
}
- err = config.LoadConfig(filepath.Join(configDir, cmd.ZookeeperConfigFileName), cmd.ConfigEnvPrefixMap[cmd.ZookeeperConfigFileName], zookeeperConfig)
+ err = config.LoadConfig(filepath.Join(configDir, cmd.DiscoveryConfigFileName), cmd.ConfigEnvPrefixMap[cmd.DiscoveryConfigFileName], discoveryConfig)
if err != nil {
return nil, nil, nil, nil, err
}
@@ -78,7 +87,7 @@ func initConfig(configDir string) (*config.Mongo, *config.Redis, *config.ZooKeep
return nil, nil, nil, nil, err
}
- return mongoConfig, redisConfig, zookeeperConfig, shareConfig, nil
+ return mongoConfig, redisConfig, discoveryConfig, shareConfig, nil
}
func main() {
@@ -105,13 +114,10 @@ func main() {
}
}
-func performChecks(ctx context.Context, mongoConfig *config.Mongo, redisConfig *config.Redis, zookeeperConfig *config.ZooKeeper, shareConfig *config.Share, maxRetry int) error {
+func performChecks(ctx context.Context, mongoConfig *config.Mongo, redisConfig *config.Redis, discovery *config.Discovery, shareConfig *config.Share, maxRetry int) error {
checksDone := make(map[string]bool)
checks := map[string]func(ctx context.Context) error{
- "Zookeeper": func(ctx context.Context) error {
- return CheckZookeeper(ctx, zookeeperConfig)
- },
"Mongo": func(ctx context.Context) error {
return CheckMongo(ctx, mongoConfig)
},
@@ -123,6 +129,16 @@ func performChecks(ctx context.Context, mongoConfig *config.Mongo, redisConfig *
},
}
+ if discovery.Enable == "etcd" {
+ checks["Etcd"] = func(ctx context.Context) error {
+ return CheckEtcd(ctx, &discovery.Etcd)
+ }
+ } else if discovery.Enable == "zookeeper" {
+ checks["Zookeeper"] = func(ctx context.Context) error {
+ return CheckZookeeper(ctx, &discovery.ZooKeeper)
+ }
+ }
+
for i := 0; i < maxRetry; i++ {
allSuccess := true
for name, check := range checks {
From 67b3aed1b55e621df6930dddbf07603b6108f37b Mon Sep 17 00:00:00 2001
From: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
Date: Wed, 15 May 2024 15:42:59 +0800
Subject: [PATCH 16/26] Delete .github/dependabot.yml
---
.github/dependabot.yml | 59 ------------------------------------------
1 file changed, 59 deletions(-)
delete mode 100644 .github/dependabot.yml
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index d05322f18..000000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright © 2023 OpenIM open source community. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# To get started with Dependabot version updates, you'll need to specify which
-# package ecosystems to update and where the package manifests are located.
-# Please see the documentation for all configuration options:
-# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
-
-version: 2
-updates:
- - package-ecosystem: "gomod"
- directory: "/"
- schedule:
- interval: "daily"
- time: "08:00"
- labels:
- - "dependencies"
- commit-message:
- prefix: "feat"
- include: "scope"
- groups:
- gomod-deps:
- patterns:
- - "*"
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "daily"
- time: "08:00"
- labels:
- - "dependencies"
- commit-message:
- prefix: "chore"
- include: "scope"
- groups:
- github-actions:
- patterns:
- - "*"
- - package-ecosystem: "docker"
- directory: "/"
- schedule:
- interval: "daily"
- time: "08:00"
- labels:
- - "dependencies"
- commit-message:
- prefix: "feat"
- include: "scope"
\ No newline at end of file
From 1a4af90da7c8b1b0dfc9cfdbe9a7b1257917f61f Mon Sep 17 00:00:00 2001
From: blooming <37789413+Bloomingg@users.noreply.github.com>
Date: Mon, 20 May 2024 10:49:55 +0800
Subject: [PATCH 17/26] docs: livekit quick start (#543)
* docs: livekit quick start
* Update CODEOWNERS
---
HOW_TO_SETUP_LIVEKIT_SERVER.md | 63 +++++++++++++++-------------------
docs/CODEOWNERS | 2 +-
livekit/livekit.yaml | 9 +++++
3 files changed, 37 insertions(+), 37 deletions(-)
create mode 100644 livekit/livekit.yaml
diff --git a/HOW_TO_SETUP_LIVEKIT_SERVER.md b/HOW_TO_SETUP_LIVEKIT_SERVER.md
index cf4c8c85a..c8c6dd23e 100644
--- a/HOW_TO_SETUP_LIVEKIT_SERVER.md
+++ b/HOW_TO_SETUP_LIVEKIT_SERVER.md
@@ -1,54 +1,45 @@
-# How to setup LiveKit server
+# Setting Up LiveKit Server for OpenIM Chat
-OpenIM Chat uses LiveKit server as the media server to support video call and video meeting services.
+OpenIM Chat uses the LiveKit server as the media server to support video calls and video meeting services.
+## About LiveKit
-## Something about LiveKit
+[LiveKit](https://github.com/livekit/livekit-server) is an open-source WebRTC SFU written in Go, built on top of the excellent [Pion](https://github.com/pion) project. For more information, visit the [LiveKit website](https://livekit.io/).
-[Livekit](https://github.com/livekit/livekit-server) is an open source WebRTC SFU written in go, built on top of the excellent [Pion](https://github.com/pion) project. You can get more information about it on its website [livekit.io](https://livekit.io/).
+## Quick Start
-
-## Setup LiveKit server on Linux
-
-Please follow the following instructions to setup a LiveKit server to work with OpenIM Chat and OpenIM server on Linux server.
-
-### Docker installation
-
-For self hosting user, we suggest you install LiveKit server by docker pull. You can get a server ready for use in a short time.
+To self-host LiveKit, start the server with the following Docker command:
```bash
-sudo docker pull livekit/livekit-server
+docker run -d \
+ -p 7880:7880 \
+ -p 7881:7881 \
+ -p 7882:7882/udp \
+ -v $PWD/livekit/livekit.yaml:/livekit.yaml \
+ livekit/livekit-server \
+ --config /livekit.yaml \
+ --bind 0.0.0.0
```
-For cloud deployment, you may follow the [Deploy to a VM](https://docs.livekit.io/realtime/self-hosting/vm/#Deploy-to-a-VM) on [livekit.io](https://docs.livekit.io/).
-
-### Generate configuration
+## Viewing Logs
-To generate configuration file for LiveKit server, please refer to [Generate configuration](https://docs.livekit.io/realtime/self-hosting/vm/#Generate-configuration).
+To check the server logs and ensure everything is running correctly, use the following command:
-The keys section of the generated .yaml file is the "apiKey: apiSecret" pair. This key pair should be set to the LiveKit section as the value of key and secret arguments.
-
-### Generate access token for video call participant
-
-Please refer to [Generating tokens](https://docs.livekit.io/realtime/server/generating-tokens/) on [livekit.io](https://docs.livekit.io/).
+```bash
+docker logs livekit/livekit-server
+```
-### Run it
+## Configuring the LiveKit Address in OpenIM Chat
-For self hosting user, you may start LiveKit with:
+Update the `config/chat-rpc-chat.yml` file to configure the LiveKit server address:
-```bash
-docker run --rm \
- -p 7880:7880 \
- -p 7881:7881 \
- -p 7882:7882/udp \
- -v $PWD/livekit.yaml:/livekit.yaml \
- livekit/livekit-server \
- --config /livekit.yaml \
- --bind 0.0.0.0
+```yaml
+liveKit:
+ url: "ws://127.0.0.1:7880" # LIVEKIT_URL, LiveKit server address and port
```
-For cloud deployment user, you may follow the [Deploy to a VM](https://docs.livekit.io/realtime/self-hosting/vm/#Deploy-to-a-VM) on [livekit.io](https://docs.livekit.io/).
+By following these steps, you can set up and configure the LiveKit server for use with OpenIM Chat.
-## More about Deploying LiveKit
+## More about Deploying LiveKi
-Please refer to the self hosting [Deploying LiveKit](https://docs.livekit.io/realtime/self-hosting/deployment/) documentation.
+For detailed instructions on deploying LiveKit, refer to the self-hosting [deployment documentation](https://docs.livekit.io/realtime/self-hosting/deployment/).
diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS
index f3a3a550d..015466d02 100644
--- a/docs/CODEOWNERS
+++ b/docs/CODEOWNERS
@@ -1 +1 @@
-* @openimsdk/go-code-review @skiffer-git @withchao
+* @Bloomingg @FGadvancer @skiffer-git @withchao
diff --git a/livekit/livekit.yaml b/livekit/livekit.yaml
new file mode 100644
index 000000000..5d1f955f4
--- /dev/null
+++ b/livekit/livekit.yaml
@@ -0,0 +1,9 @@
+port: 7880
+rtc:
+ tcp_port: 7881
+ port_range_start: 50000
+ port_range_end: 60000
+ use_external_ip: true
+ enable_loopback_candidate: false
+keys:
+ APIftrpEkL9x2pa: 23ztfSqsfQ8hKkHzHTl3Z4bvaxro0snjk5jwbp5p6Q3
\ No newline at end of file
From 4f4ece413826765018314bd98af764101af7e51e Mon Sep 17 00:00:00 2001
From: blooming <37789413+Bloomingg@users.noreply.github.com>
Date: Thu, 23 May 2024 12:09:02 +0800
Subject: [PATCH 18/26] ci: auto build test & not lock issue (#546)
---
.github/workflows/chatci.yml | 109 ++++++++++++++++++++++-------
.github/workflows/lock-issue.yml | 65 -----------------
.github/workflows/scripts-test.yml | 90 ------------------------
.github/workflows/stale.yml | 48 -------------
4 files changed, 82 insertions(+), 230 deletions(-)
delete mode 100644 .github/workflows/lock-issue.yml
delete mode 100644 .github/workflows/scripts-test.yml
delete mode 100644 .github/workflows/stale.yml
diff --git a/.github/workflows/chatci.yml b/.github/workflows/chatci.yml
index c54e08219..6f97293e4 100644
--- a/.github/workflows/chatci.yml
+++ b/.github/workflows/chatci.yml
@@ -11,56 +11,111 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
-name: OpenIM CI
+name: OpenIM CI Auto Build
on:
push:
branches:
- main
- - develop
+ - release-*
paths-ignore:
- "docs/**"
- "README.md"
- "README_zh-CN.md"
+ - "**.md"
+ - "docs/**"
- "CONTRIBUTING.md"
pull_request:
branches:
- main
- - develop
+ - release-*
paths-ignore:
- "README.md"
- "README_zh-CN.md"
- - "CONTRIBUTING.md"
+ - "CONTRIBUTING/**"
+ - "**.md"
- "docs/**"
-
-env:
- GO_VERSION: "1.19"
- GOLANGCI_VERSION: "v1.50.1"
+ workflow_dispatch:
jobs:
- openim:
- name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
- runs-on: ${{ matrix.os }}
+
+ build-linux:
+ name: Execute OpenIM Script On Linux
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ pull-requests: write
environment:
name: openim
-
strategy:
matrix:
- go_version: ["1.21"]
- os: [ubuntu-latest]
-
+ arch: [arm64, armv7, amd64]
+
steps:
- - name: Set up Go ${{ matrix.go_version }}
- uses: actions/setup-go@v4
- with:
- go-version: ${{ matrix.go_version }}
- id: go
+ - uses: actions/checkout@v3
+
+ - name: Set up Go
+ uses: actions/setup-go@v4
+ with:
+ go-version: '1.21'
+
+ - name: init
+ run: sudo bash bootstrap.sh
+ timeout-minutes: 20
+
+ - name: Checkout chat repository
+ uses: actions/checkout@v4
+ with:
+ repository: 'openimsdk/open-im-server'
+ path: 'server-repo'
+
+ - name: Set up Docker for Linux
+ run: |
+ cd ${{ github.workspace }}/server-repo
+ sudo docker compose up -d
+ sudo sleep 30 # Increased sleep time for better stability
+ timeout-minutes: 20 # Increased timeout for Docker setup
+
+ - name: Build and Start IM Serevr Services
+ run: |
+ cd ${{ github.workspace }}/server-repo
+ sudo mage
+ sudo mage start
+ sudo mage check
+
+ - name: Build, Start, Check Services and Print Logs for Linux
+ run: |
+ sudo mage
+ sudo mage start
+ sudo mage check
+
+
+ - name: Restart Services and Print Logs
+ run: |
+ sudo mage stop
+ sudo mage start
+ sudo mage check
- - name: Check out code into the Go module directory
- uses: actions/checkout@v4
+
+
+ # - name: Checkout e2e repository
+ # uses: actions/checkout@v4
+ # with:
+ # repository: "openimsdk/test-e2e"
+ # path: e2e-repo
- - name: init
- run: |
- sudo bash bootstrap.sh
- echo "init successfully"
+ # - name: Set up Python 3.9
+ # uses: actions/setup-python@v4
+ # with:
+ # python-version: '3.9'
+
+ # - name: Install dependencies
+ # run: |
+ # cd ${{ github.workspace }}/e2e-repo
+ # pip install PyYAML webdriver_manager selenium pytest
+
+ # - name: Run tests
+ # run: |
+ # cd ${{ github.workspace }}/e2e-repo
+ # pytest main.py
+
\ No newline at end of file
diff --git a/.github/workflows/lock-issue.yml b/.github/workflows/lock-issue.yml
deleted file mode 100644
index 6a9aed9ba..000000000
--- a/.github/workflows/lock-issue.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright © 2023 OpenIM open source community. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: 'Lock Threads'
-
-on:
- schedule:
- - cron: '0 * * * *'
- workflow_dispatch:
-
-permissions:
- issues: write
- pull-requests: write
-
-concurrency:
- group: lock
-
-jobs:
- action:
- runs-on: ubuntu-latest
- steps:
- - uses: dessant/lock-threads@v4
- with:
- github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
- issue-inactive-days: '365'
- exclude-issue-created-before: ''
- exclude-issue-created-after: ''
- exclude-issue-created-between: ''
- exclude-issue-closed-before: ''
- exclude-issue-closed-after: ''
- exclude-issue-closed-between: ''
- include-any-issue-labels: ''
- include-all-issue-labels: ''
- exclude-any-issue-labels: ''
- add-issue-labels: ''
- remove-issue-labels: ''
- issue-comment: ''
- issue-lock-reason: 'resolved'
- pr-inactive-days: '365'
- exclude-pr-created-before: ''
- exclude-pr-created-after: ''
- exclude-pr-created-between: ''
- exclude-pr-closed-before: ''
- exclude-pr-closed-after: ''
- exclude-pr-closed-between: ''
- include-any-pr-labels: ''
- include-all-pr-labels: ''
- exclude-any-pr-labels: ''
- add-pr-labels: ''
- remove-pr-labels: ''
- pr-comment: ''
- pr-lock-reason: 'resolved'
- process-only: ''
- log-output: false
\ No newline at end of file
diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml
deleted file mode 100644
index 7da773adb..000000000
--- a/.github/workflows/scripts-test.yml
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright © 2023 OpenIM. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: OpenIM Chat Start Execute Scripts
-
-on:
- push:
- branches:
- - main
- paths-ignore:
- - "docs/**"
- - "README.md"
- - "README_zh-CN.md"
- - "CONTRIBUTING.md"
- pull_request:
- branches:
- - main
- paths-ignore:
- - "README.md"
- - "README_zh-CN.md"
- - "CONTRIBUTING.md"
- - "docs/**"
-
-jobs:
- execute-scripts:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest]
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v3
-
- # - name: Install latest Bash (macOS only)
- # if: runner.os == 'macOS'
- # run: |
- # /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- # brew update
-
- # brew install bash
- # brew install gnu-sed
-
- # echo "/usr/local/bin" >> $GITHUB_PATH
- # echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
-
- # brew install --cask docker
- # open /Applications/Docker.app
-
- - name: deploy all services
- run: |
- git clone https://github.com/openimsdk/open-im-server.git
- cd open-im-server
- sudo docker compose up -d
- sudo sleep 30
-
- sudo bash bootstrap.sh
- sudo mage
- sudo mage start
- sudo mage check
-
- echo "pwd = $(pwd)"
- cd ..
- ls -al && pwd
- shell: bash
- continue-on-error: true
-
- - name: Build Chat
- run: |
- sudo bash bootstrap.sh
- sudo mage
- sudo mage start
- shell: bash
-
- - name: Print chat_$(date '+%Y%m%d').log
- run: |
- ls -al && echo "pwd = $(pwd)"
- shell: bash
- continue-on-error: true
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
deleted file mode 100644
index ca04d0e20..000000000
--- a/.github/workflows/stale.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright © 2023 OpenIM open source community. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
-#
-# You can adjust the behavior by modifying this file.
-# For more information, see:
-# https://github.com/actions/stale
-name: Mark stale issues and pull requests
-
-on:
- schedule:
- - cron: '0 8 * * *'
-
-jobs:
- stale:
-
- runs-on: ubuntu-latest
- permissions:
- issues: write
- pull-requests: write
-
- steps:
- - uses: actions/stale@v8
- with:
- repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
- days-before-stale: 60
- days-before-close: 7
- stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
- stale-pr-message: 'This issue is stale because it has been open 60 days with no activity.'
- close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
- close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity. You can reopen it if you want.'
- stale-pr-label: lifecycle/stale
- stale-issue-label: lifecycle/stale
- exempt-issue-labels: 'openim'
- exempt-pr-labels: 'openim'
- exempt-draft-pr: true
From 07f7853001bba467eb6d003b14ca435c3f148d7a Mon Sep 17 00:00:00 2001
From: Monet Lee
Date: Fri, 7 Jun 2024 18:09:20 +0800
Subject: [PATCH 19/26] refactor: renamed non-standard package aliases and
field names. (#549)
* fix: fix uncurrent err handle.
* refactor: renamed non-standard aliases and field names.
---
internal/api/chat/chat.go | 51 +++----
internal/api/chat/start.go | 1 +
internal/api/mw/mw.go | 6 +-
internal/rpc/admin/admin.go | 11 +-
internal/rpc/admin/applet.go | 11 +-
internal/rpc/admin/check.go | 1 +
internal/rpc/admin/invitation.go | 19 +--
internal/rpc/admin/ip_forbidden.go | 6 +-
internal/rpc/admin/register_add_friend.go | 12 +-
internal/rpc/admin/register_add_group.go | 12 +-
internal/rpc/admin/start.go | 9 +-
internal/rpc/admin/user.go | 10 +-
internal/rpc/admin/user_ip_limit_login.go | 15 +-
internal/rpc/chat/callback.go | 8 +-
internal/rpc/chat/login.go | 25 ++--
internal/rpc/chat/password.go | 8 +-
internal/rpc/chat/rtc.go | 1 +
internal/rpc/chat/start.go | 3 +-
internal/rpc/chat/user.go | 15 +-
pkg/common/db/database/admin.go | 134 +++++++++---------
pkg/common/db/database/chat.go | 99 ++++++-------
pkg/common/db/model/admin/admin.go | 22 +--
pkg/common/db/model/admin/applet.go | 4 +-
pkg/common/db/model/admin/client_config.go | 2 +-
.../db/model/admin/forbidden_account.go | 1 +
.../db/model/admin/invitation_register.go | 19 +--
pkg/common/db/model/admin/ip_forbidden.go | 21 ++-
.../db/model/admin/limit_user_login_ip.go | 2 +-
.../db/model/admin/register_add_friend.go | 1 +
.../db/model/admin/register_add_group.go | 1 +
pkg/common/imapi/call.go | 8 +-
pkg/common/imapi/caller.go | 9 +-
pkg/common/mctx/get.go | 8 +-
pkg/protocol/chat/chat.go | 6 +-
tools/check-component/main.go | 11 +-
35 files changed, 296 insertions(+), 276 deletions(-)
diff --git a/internal/api/chat/chat.go b/internal/api/chat/chat.go
index b8bb05bf9..47d1dcb42 100644
--- a/internal/api/chat/chat.go
+++ b/internal/api/chat/chat.go
@@ -15,25 +15,26 @@
package chat
import (
- "github.com/openimsdk/chat/internal/api/util"
"io"
"time"
+ "github.com/openimsdk/chat/internal/api/util"
+
"github.com/gin-gonic/gin"
"github.com/openimsdk/chat/pkg/common/apistruct"
- chatconstant "github.com/openimsdk/chat/pkg/common/constant"
+ "github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/common/imapi"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
- "github.com/openimsdk/chat/pkg/protocol/chat"
- "github.com/openimsdk/protocol/constant"
+ chatpb "github.com/openimsdk/chat/pkg/protocol/chat"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/protocol/sdkws"
"github.com/openimsdk/tools/a2r"
"github.com/openimsdk/tools/apiresp"
"github.com/openimsdk/tools/errs"
)
-func New(chatClient chat.ChatClient, adminClient admin.AdminClient, imApiCaller imapi.CallerInterface, api *util.Api) *Api {
+func New(chatClient chatpb.ChatClient, adminClient admin.AdminClient, imApiCaller imapi.CallerInterface, api *util.Api) *Api {
return &Api{
Api: api,
chatClient: chatClient,
@@ -44,7 +45,7 @@ func New(chatClient chat.ChatClient, adminClient admin.AdminClient, imApiCaller
type Api struct {
*util.Api
- chatClient chat.ChatClient
+ chatClient chatpb.ChatClient
adminClient admin.AdminClient
imApiCaller imapi.CallerInterface
}
@@ -52,7 +53,7 @@ type Api struct {
// ################## ACCOUNT ##################
func (o *Api) SendVerifyCode(c *gin.Context) {
- req, err := a2r.ParseRequest[chat.SendVerifyCodeReq](c)
+ req, err := a2r.ParseRequest[chatpb.SendVerifyCodeReq](c)
if err != nil {
apiresp.GinError(c, err)
return
@@ -72,11 +73,11 @@ func (o *Api) SendVerifyCode(c *gin.Context) {
}
func (o *Api) VerifyCode(c *gin.Context) {
- a2r.Call(chat.ChatClient.VerifyCode, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.VerifyCode, o.chatClient, c)
}
func (o *Api) RegisterUser(c *gin.Context) {
- req, err := a2r.ParseRequest[chat.RegisterUserReq](c)
+ req, err := a2r.ParseRequest[chatpb.RegisterUserReq](c)
if err != nil {
apiresp.GinError(c, err)
return
@@ -130,7 +131,7 @@ func (o *Api) RegisterUser(c *gin.Context) {
}
func (o *Api) Login(c *gin.Context) {
- req, err := a2r.ParseRequest[chat.LoginReq](c)
+ req, err := a2r.ParseRequest[chatpb.LoginReq](c)
if err != nil {
apiresp.GinError(c, err)
return
@@ -159,17 +160,17 @@ func (o *Api) Login(c *gin.Context) {
}
func (o *Api) ResetPassword(c *gin.Context) {
- a2r.Call(chat.ChatClient.ResetPassword, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.ResetPassword, o.chatClient, c)
}
func (o *Api) ChangePassword(c *gin.Context) {
- a2r.Call(chat.ChatClient.ChangePassword, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.ChangePassword, o.chatClient, c)
}
// ################## USER ##################
func (o *Api) UpdateUserInfo(c *gin.Context) {
- req, err := a2r.ParseRequest[chat.UpdateUserInfoReq](c)
+ req, err := a2r.ParseRequest[chatpb.UpdateUserInfoReq](c)
if err != nil {
apiresp.GinError(c, err)
return
@@ -185,10 +186,10 @@ func (o *Api) UpdateUserInfo(c *gin.Context) {
return
}
var imToken string
- if opUserType == chatconstant.NormalUser {
+ if opUserType == constant.NormalUser {
imToken, err = o.imApiCaller.ImAdminTokenWithDefaultAdmin(c)
- } else if opUserType == chatconstant.AdminUser {
- imToken, err = o.imApiCaller.UserToken(c, o.GetDefaultIMAdminUserID(), constant.AdminPlatformID)
+ } else if opUserType == constant.AdminUser {
+ imToken, err = o.imApiCaller.UserToken(c, o.GetDefaultIMAdminUserID(), constantpb.AdminPlatformID)
} else {
apiresp.GinError(c, errs.ErrArgs.WrapMsg("opUserType unknown"))
return
@@ -220,23 +221,23 @@ func (o *Api) UpdateUserInfo(c *gin.Context) {
}
func (o *Api) FindUserPublicInfo(c *gin.Context) {
- a2r.Call(chat.ChatClient.FindUserPublicInfo, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.FindUserPublicInfo, o.chatClient, c)
}
func (o *Api) FindUserFullInfo(c *gin.Context) {
- a2r.Call(chat.ChatClient.FindUserFullInfo, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.FindUserFullInfo, o.chatClient, c)
}
func (o *Api) SearchUserFullInfo(c *gin.Context) {
- a2r.Call(chat.ChatClient.SearchUserFullInfo, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.SearchUserFullInfo, o.chatClient, c)
}
func (o *Api) SearchUserPublicInfo(c *gin.Context) {
- a2r.Call(chat.ChatClient.SearchUserPublicInfo, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.SearchUserPublicInfo, o.chatClient, c)
}
func (o *Api) GetTokenForVideoMeeting(c *gin.Context) {
- a2r.Call(chat.ChatClient.GetTokenForVideoMeeting, o.chatClient, c)
+ a2r.Call(chatpb.ChatClient.GetTokenForVideoMeeting, o.chatClient, c)
}
// ################## APPLET ##################
@@ -259,8 +260,8 @@ func (o *Api) OpenIMCallback(c *gin.Context) {
apiresp.GinError(c, err)
return
}
- req := &chat.OpenIMCallbackReq{
- Command: c.Query(constant.CallbackCommand),
+ req := &chatpb.OpenIMCallbackReq{
+ Command: c.Query(constantpb.CallbackCommand),
Body: string(body),
}
if _, err := o.chatClient.OpenIMCallback(c, req); err != nil {
@@ -273,7 +274,7 @@ func (o *Api) OpenIMCallback(c *gin.Context) {
func (o *Api) SearchFriend(c *gin.Context) {
req, err := a2r.ParseRequest[struct {
UserID string `json:"userID"`
- chat.SearchUserInfoReq
+ chatpb.SearchUserInfoReq
}](c)
if err != nil {
apiresp.GinError(c, err)
@@ -293,7 +294,7 @@ func (o *Api) SearchFriend(c *gin.Context) {
return
}
if len(userIDs) == 0 {
- apiresp.GinSuccess(c, &chat.SearchUserInfoResp{})
+ apiresp.GinSuccess(c, &chatpb.SearchUserInfoResp{})
return
}
req.SearchUserInfoReq.UserIDs = userIDs
diff --git a/internal/api/chat/start.go b/internal/api/chat/start.go
index 71a3d4834..22cb38bf1 100644
--- a/internal/api/chat/start.go
+++ b/internal/api/chat/start.go
@@ -3,6 +3,7 @@ package chat
import (
"context"
"fmt"
+
"github.com/gin-gonic/gin"
chatmw "github.com/openimsdk/chat/internal/api/mw"
"github.com/openimsdk/chat/internal/api/util"
diff --git a/internal/api/mw/mw.go b/internal/api/mw/mw.go
index 84375163e..8f8bb2a4c 100644
--- a/internal/api/mw/mw.go
+++ b/internal/api/mw/mw.go
@@ -20,7 +20,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/protocol/admin"
- constant2 "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/apiresp"
"github.com/openimsdk/tools/errs"
)
@@ -66,8 +66,8 @@ func (o *MW) isValidToken(c *gin.Context, userID string, token string) error {
}
if v, ok := resp.TokensMap[token]; ok {
switch v {
- case constant2.NormalToken:
- case constant2.KickedToken:
+ case constantpb.NormalToken:
+ case constantpb.KickedToken:
return errs.ErrTokenExpired.Wrap()
default:
return errs.ErrTokenUnknown.Wrap()
diff --git a/internal/rpc/admin/admin.go b/internal/rpc/admin/admin.go
index 7bf2171c1..547d1aefa 100644
--- a/internal/rpc/admin/admin.go
+++ b/internal/rpc/admin/admin.go
@@ -17,15 +17,16 @@ package admin
import (
"context"
"fmt"
+ "math/rand"
+ "time"
+
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/mcontext"
"github.com/openimsdk/tools/utils/datautil"
- "math/rand"
- "time"
"github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/common/db/dbutil"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/chat/pkg/protocol/admin"
@@ -77,7 +78,7 @@ func (o *adminServer) AddAdminAccount(ctx context.Context, req *admin.AddAdminAc
return nil, errs.ErrDuplicateKey.WrapMsg("the account is registered")
}
- adm := &admin2.Admin{
+ adm := &admindb.Admin{
Account: req.Account,
Password: req.Password,
FaceURL: req.FaceURL,
@@ -86,7 +87,7 @@ func (o *adminServer) AddAdminAccount(ctx context.Context, req *admin.AddAdminAc
Level: 80,
CreateTime: time.Now(),
}
- if err = o.Database.AddAdminAccount(ctx, []*admin2.Admin{adm}); err != nil {
+ if err = o.Database.AddAdminAccount(ctx, []*admindb.Admin{adm}); err != nil {
return nil, err
}
return &admin.AddAdminAccountResp{}, nil
diff --git a/internal/rpc/admin/applet.go b/internal/rpc/admin/applet.go
index 1e09c5651..6b6fd00d5 100644
--- a/internal/rpc/admin/applet.go
+++ b/internal/rpc/admin/applet.go
@@ -16,15 +16,16 @@ package admin
import (
"context"
- "github.com/openimsdk/tools/utils/datautil"
"strings"
"time"
+ "github.com/openimsdk/tools/utils/datautil"
+
"github.com/google/uuid"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/chat/pkg/common/constant"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
"github.com/openimsdk/chat/pkg/protocol/common"
@@ -43,7 +44,7 @@ func (o *adminServer) AddApplet(ctx context.Context, req *admin.AddAppletReq) (*
if !(req.Status == constant.StatusOnShelf || req.Status == constant.StatusUnShelf) {
return nil, errs.ErrArgs.WrapMsg("invalid status")
}
- m := admin2.Applet{
+ m := admindb.Applet{
ID: req.Id,
Name: req.Name,
AppID: req.AppID,
@@ -59,7 +60,7 @@ func (o *adminServer) AddApplet(ctx context.Context, req *admin.AddAppletReq) (*
if m.ID == "" {
m.ID = uuid.New().String()
}
- if err := o.Database.CreateApplet(ctx, []*admin2.Applet{&m}); err != nil {
+ if err := o.Database.CreateApplet(ctx, []*admindb.Applet{&m}); err != nil {
return nil, err
}
return &admin.AddAppletResp{}, nil
@@ -76,7 +77,7 @@ func (o *adminServer) DelApplet(ctx context.Context, req *admin.DelAppletReq) (*
if err != nil {
return nil, err
}
- if ids := datautil.Single(req.AppletIds, datautil.Slice(applets, func(e *admin2.Applet) string { return e.ID })); len(ids) > 0 {
+ if ids := datautil.Single(req.AppletIds, datautil.Slice(applets, func(e *admindb.Applet) string { return e.ID })); len(ids) > 0 {
return nil, errs.ErrArgs.WrapMsg("ids not found: " + strings.Join(ids, ", "))
}
if err := o.Database.DelApplet(ctx, req.AppletIds); err != nil {
diff --git a/internal/rpc/admin/check.go b/internal/rpc/admin/check.go
index 5b15c9b6e..8e0175be8 100644
--- a/internal/rpc/admin/check.go
+++ b/internal/rpc/admin/check.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/chat/pkg/common/db/dbutil"
"github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/chat/pkg/protocol/admin"
diff --git a/internal/rpc/admin/invitation.go b/internal/rpc/admin/invitation.go
index 11aac3bbf..62527f583 100644
--- a/internal/rpc/admin/invitation.go
+++ b/internal/rpc/admin/invitation.go
@@ -16,14 +16,15 @@ package admin
import (
"context"
- "github.com/openimsdk/tools/utils/datautil"
"math/rand"
"strings"
"time"
+ "github.com/openimsdk/tools/utils/datautil"
+
"github.com/openimsdk/tools/errs"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/chat/pkg/protocol/admin"
@@ -44,13 +45,13 @@ func (o *adminServer) AddInvitationCode(ctx context.Context, req *admin.AddInvit
return nil, err
}
if len(irs) > 0 {
- ids := datautil.Slice(irs, func(info *admin2.InvitationRegister) string { return info.InvitationCode })
+ ids := datautil.Slice(irs, func(info *admindb.InvitationRegister) string { return info.InvitationCode })
return nil, errs.ErrArgs.WrapMsg("code existed", "ids", ids)
}
now := time.Now()
- codes := make([]*admin2.InvitationRegister, 0, len(req.Codes))
+ codes := make([]*admindb.InvitationRegister, 0, len(req.Codes))
for _, code := range req.Codes {
- codes = append(codes, &admin2.InvitationRegister{
+ codes = append(codes, &admindb.InvitationRegister{
InvitationCode: code,
UsedByUserID: "",
CreateTime: now,
@@ -73,7 +74,7 @@ func (o *adminServer) GenInvitationCode(ctx context.Context, req *admin.GenInvit
req.Chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
now := time.Now()
- invitationRegisters := make([]*admin2.InvitationRegister, 0, req.Num)
+ invitationRegisters := make([]*admindb.InvitationRegister, 0, req.Num)
codes := make([]string, 0, req.Num)
for i := int32(0); i < req.Num; i++ {
buf := make([]byte, req.Len)
@@ -82,7 +83,7 @@ func (o *adminServer) GenInvitationCode(ctx context.Context, req *admin.GenInvit
buf[i] = req.Chars[b%byte(len(req.Chars))]
}
codes = append(codes, string(buf))
- invitationRegisters = append(invitationRegisters, &admin2.InvitationRegister{
+ invitationRegisters = append(invitationRegisters, &admindb.InvitationRegister{
InvitationCode: string(buf),
UsedByUserID: "",
CreateTime: now,
@@ -96,7 +97,7 @@ func (o *adminServer) GenInvitationCode(ctx context.Context, req *admin.GenInvit
return nil, err
}
if len(irs) > 0 {
- ids := datautil.Single(codes, datautil.Slice(irs, func(ir *admin2.InvitationRegister) string { return ir.InvitationCode }))
+ ids := datautil.Single(codes, datautil.Slice(irs, func(ir *admindb.InvitationRegister) string { return ir.InvitationCode }))
return nil, errs.ErrArgs.WrapMsg(strings.Join(ids, ", "))
}
if err := o.Database.CreatInvitationRegister(ctx, invitationRegisters); err != nil {
@@ -173,7 +174,7 @@ func (o *adminServer) DelInvitationCode(ctx context.Context, req *admin.DelInvit
return nil, err
}
if len(irs) != len(req.Codes) {
- ids := datautil.Single(req.Codes, datautil.Slice(irs, func(ir *admin2.InvitationRegister) string { return ir.InvitationCode }))
+ ids := datautil.Single(req.Codes, datautil.Slice(irs, func(ir *admindb.InvitationRegister) string { return ir.InvitationCode }))
return nil, errs.ErrArgs.WrapMsg("code not found " + strings.Join(ids, ", "))
}
if err := o.Database.DelInvitationRegister(ctx, req.Codes); err != nil {
diff --git a/internal/rpc/admin/ip_forbidden.go b/internal/rpc/admin/ip_forbidden.go
index dbb65a68d..ca900bfff 100644
--- a/internal/rpc/admin/ip_forbidden.go
+++ b/internal/rpc/admin/ip_forbidden.go
@@ -18,7 +18,7 @@ import (
"context"
"time"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
)
@@ -51,9 +51,9 @@ func (o *adminServer) AddIPForbidden(ctx context.Context, req *admin.AddIPForbid
return nil, err
}
now := time.Now()
- tables := make([]*admin2.IPForbidden, 0, len(req.Forbiddens))
+ tables := make([]*admindb.IPForbidden, 0, len(req.Forbiddens))
for _, forbidden := range req.Forbiddens {
- tables = append(tables, &admin2.IPForbidden{
+ tables = append(tables, &admindb.IPForbidden{
IP: forbidden.Ip,
LimitLogin: forbidden.LimitLogin,
LimitRegister: forbidden.LimitRegister,
diff --git a/internal/rpc/admin/register_add_friend.go b/internal/rpc/admin/register_add_friend.go
index f859e8c0d..1b29a8342 100644
--- a/internal/rpc/admin/register_add_friend.go
+++ b/internal/rpc/admin/register_add_friend.go
@@ -21,7 +21,7 @@ import (
"github.com/openimsdk/tools/errs"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
"github.com/openimsdk/chat/pkg/protocol/common"
@@ -52,9 +52,9 @@ func (o *adminServer) AddDefaultFriend(ctx context.Context, req *admin.AddDefaul
return nil, errs.ErrDuplicateKey.WrapMsg("user id existed", "userID", exists)
}
now := time.Now()
- ms := make([]*admin2.RegisterAddFriend, 0, len(req.UserIDs))
+ ms := make([]*admindb.RegisterAddFriend, 0, len(req.UserIDs))
for _, userID := range req.UserIDs {
- ms = append(ms, &admin2.RegisterAddFriend{
+ ms = append(ms, &admindb.RegisterAddFriend{
UserID: userID,
CreateTime: now,
})
@@ -83,9 +83,9 @@ func (o *adminServer) DelDefaultFriend(ctx context.Context, req *admin.DelDefaul
return nil, errs.ErrRecordNotFound.WrapMsg("user id not found", "userID", ids)
}
now := time.Now()
- ms := make([]*admin2.RegisterAddFriend, 0, len(req.UserIDs))
+ ms := make([]*admindb.RegisterAddFriend, 0, len(req.UserIDs))
for _, userID := range req.UserIDs {
- ms = append(ms, &admin2.RegisterAddFriend{
+ ms = append(ms, &admindb.RegisterAddFriend{
UserID: userID,
CreateTime: now,
})
@@ -115,7 +115,7 @@ func (o *adminServer) SearchDefaultFriend(ctx context.Context, req *admin.Search
if err != nil {
return nil, err
}
- userIDs := datautil.Slice(infos, func(info *admin2.RegisterAddFriend) string { return info.UserID })
+ userIDs := datautil.Slice(infos, func(info *admindb.RegisterAddFriend) string { return info.UserID })
userMap, err := o.Chat.MapUserPublicInfo(ctx, userIDs)
if err != nil {
return nil, err
diff --git a/internal/rpc/admin/register_add_group.go b/internal/rpc/admin/register_add_group.go
index 63283071a..4443aea86 100644
--- a/internal/rpc/admin/register_add_group.go
+++ b/internal/rpc/admin/register_add_group.go
@@ -21,7 +21,7 @@ import (
"github.com/openimsdk/tools/errs"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
)
@@ -44,9 +44,9 @@ func (o *adminServer) AddDefaultGroup(ctx context.Context, req *admin.AddDefault
return nil, errs.ErrDuplicateKey.WrapMsg("group id existed", "groupID", exists)
}
now := time.Now()
- ms := make([]*admin2.RegisterAddGroup, 0, len(req.GroupIDs))
+ ms := make([]*admindb.RegisterAddGroup, 0, len(req.GroupIDs))
for _, groupID := range req.GroupIDs {
- ms = append(ms, &admin2.RegisterAddGroup{
+ ms = append(ms, &admindb.RegisterAddGroup{
GroupID: groupID,
CreateTime: now,
})
@@ -75,9 +75,9 @@ func (o *adminServer) DelDefaultGroup(ctx context.Context, req *admin.DelDefault
return nil, errs.ErrRecordNotFound.WrapMsg("group id not found", "groupID", ids)
}
now := time.Now()
- ms := make([]*admin2.RegisterAddGroup, 0, len(req.GroupIDs))
+ ms := make([]*admindb.RegisterAddGroup, 0, len(req.GroupIDs))
for _, groupID := range req.GroupIDs {
- ms = append(ms, &admin2.RegisterAddGroup{
+ ms = append(ms, &admindb.RegisterAddGroup{
GroupID: groupID,
CreateTime: now,
})
@@ -107,5 +107,5 @@ func (o *adminServer) SearchDefaultGroup(ctx context.Context, req *admin.SearchD
if err != nil {
return nil, err
}
- return &admin.SearchDefaultGroupResp{Total: uint32(total), GroupIDs: datautil.Slice(infos, func(info *admin2.RegisterAddGroup) string { return info.GroupID })}, nil
+ return &admin.SearchDefaultGroupResp{Total: uint32(total), GroupIDs: datautil.Slice(infos, func(info *admindb.RegisterAddGroup) string { return info.GroupID })}, nil
}
diff --git a/internal/rpc/admin/start.go b/internal/rpc/admin/start.go
index bc597f58c..54de3be3d 100644
--- a/internal/rpc/admin/start.go
+++ b/internal/rpc/admin/start.go
@@ -4,13 +4,16 @@ import (
"context"
"crypto/md5"
"encoding/hex"
+ "math/rand"
+ "time"
+
"github.com/openimsdk/chat/pkg/common/config"
"github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/common/db/database"
"github.com/openimsdk/chat/pkg/common/db/dbutil"
"github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/tokenverify"
- pbadmin "github.com/openimsdk/chat/pkg/protocol/admin"
+ adminpb "github.com/openimsdk/chat/pkg/protocol/admin"
"github.com/openimsdk/chat/pkg/protocol/chat"
chatClient "github.com/openimsdk/chat/pkg/rpclient/chat"
"github.com/openimsdk/tools/db/mongoutil"
@@ -20,8 +23,6 @@ import (
"github.com/openimsdk/tools/mw"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
- "math/rand"
- "time"
)
type Config struct {
@@ -62,7 +63,7 @@ func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryReg
if err := srv.initAdmin(ctx, config.Share.ChatAdmin, config.Share.OpenIM.AdminUserID); err != nil {
return err
}
- pbadmin.RegisterAdminServer(server, &srv)
+ adminpb.RegisterAdminServer(server, &srv)
return nil
}
diff --git a/internal/rpc/admin/user.go b/internal/rpc/admin/user.go
index e2ddddaa2..68a6fd3cf 100644
--- a/internal/rpc/admin/user.go
+++ b/internal/rpc/admin/user.go
@@ -22,7 +22,7 @@ import (
"time"
"github.com/openimsdk/chat/pkg/common/db/dbutil"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
"github.com/openimsdk/chat/pkg/protocol/chat"
@@ -54,13 +54,13 @@ func (o *adminServer) BlockUser(ctx context.Context, req *admin.BlockUserReq) (*
return nil, err
}
- t := &admin2.ForbiddenAccount{
+ t := &admindb.ForbiddenAccount{
UserID: req.UserID,
Reason: req.Reason,
OperatorUserID: mcontext.GetOpUserID(ctx),
CreateTime: time.Now(),
}
- if err := o.Database.BlockUser(ctx, []*admin2.ForbiddenAccount{t}); err != nil {
+ if err := o.Database.BlockUser(ctx, []*admindb.ForbiddenAccount{t}); err != nil {
return nil, err
}
return &admin.BlockUserResp{}, nil
@@ -81,7 +81,7 @@ func (o *adminServer) UnblockUser(ctx context.Context, req *admin.UnblockUserReq
return nil, err
}
if len(req.UserIDs) != len(bs) {
- ids := datautil.Single(req.UserIDs, datautil.Slice(bs, func(info *admin2.ForbiddenAccount) string { return info.UserID }))
+ ids := datautil.Single(req.UserIDs, datautil.Slice(bs, func(info *admindb.ForbiddenAccount) string { return info.UserID }))
return nil, errs.ErrArgs.WrapMsg("user not blocked " + strings.Join(ids, ", "))
}
if err := o.Database.DelBlockUser(ctx, req.UserIDs); err != nil {
@@ -98,7 +98,7 @@ func (o *adminServer) SearchBlockUser(ctx context.Context, req *admin.SearchBloc
if err != nil {
return nil, err
}
- userIDs := datautil.Slice(infos, func(info *admin2.ForbiddenAccount) string { return info.UserID })
+ userIDs := datautil.Slice(infos, func(info *admindb.ForbiddenAccount) string { return info.UserID })
userMap, err := o.Chat.MapUserFullInfo(ctx, userIDs)
if err != nil {
return nil, err
diff --git a/internal/rpc/admin/user_ip_limit_login.go b/internal/rpc/admin/user_ip_limit_login.go
index f1d6cd42b..b505bd8c0 100644
--- a/internal/rpc/admin/user_ip_limit_login.go
+++ b/internal/rpc/admin/user_ip_limit_login.go
@@ -16,10 +16,11 @@ package admin
import (
"context"
- "github.com/openimsdk/tools/utils/datautil"
"time"
- admin2 "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ "github.com/openimsdk/tools/utils/datautil"
+
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/admin"
"github.com/openimsdk/tools/errs"
@@ -33,7 +34,7 @@ func (o *adminServer) SearchUserIPLimitLogin(ctx context.Context, req *admin.Sea
if err != nil {
return nil, err
}
- userIDs := datautil.Slice(list, func(info *admin2.LimitUserLoginIP) string { return info.UserID })
+ userIDs := datautil.Slice(list, func(info *admindb.LimitUserLoginIP) string { return info.UserID })
userMap, err := o.Chat.MapUserPublicInfo(ctx, datautil.Distinct(userIDs))
if err != nil {
return nil, err
@@ -58,9 +59,9 @@ func (o *adminServer) AddUserIPLimitLogin(ctx context.Context, req *admin.AddUse
return nil, errs.ErrArgs.WrapMsg("limits is empty")
}
now := time.Now()
- ts := make([]*admin2.LimitUserLoginIP, 0, len(req.Limits))
+ ts := make([]*admindb.LimitUserLoginIP, 0, len(req.Limits))
for _, limit := range req.Limits {
- ts = append(ts, &admin2.LimitUserLoginIP{
+ ts = append(ts, &admindb.LimitUserLoginIP{
UserID: limit.UserID,
IP: limit.Ip,
CreateTime: now,
@@ -79,12 +80,12 @@ func (o *adminServer) DelUserIPLimitLogin(ctx context.Context, req *admin.DelUse
if len(req.Limits) == 0 {
return nil, errs.ErrArgs.WrapMsg("limits is empty")
}
- ts := make([]*admin2.LimitUserLoginIP, 0, len(req.Limits))
+ ts := make([]*admindb.LimitUserLoginIP, 0, len(req.Limits))
for _, limit := range req.Limits {
if limit.UserID == "" || limit.Ip == "" {
return nil, errs.ErrArgs.WrapMsg("user_id or ip is empty")
}
- ts = append(ts, &admin2.LimitUserLoginIP{
+ ts = append(ts, &admindb.LimitUserLoginIP{
UserID: limit.UserID,
IP: limit.Ip,
})
diff --git a/internal/rpc/chat/callback.go b/internal/rpc/chat/callback.go
index 8d793927c..b355d7660 100644
--- a/internal/rpc/chat/callback.go
+++ b/internal/rpc/chat/callback.go
@@ -19,10 +19,10 @@ import (
"encoding/json"
"fmt"
- constant2 "github.com/openimsdk/chat/pkg/common/constant"
+ "github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/chat/pkg/protocol/chat"
- "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/errs"
)
@@ -42,7 +42,7 @@ func (c CallbackCommand) GetCallbackCommand() string {
func (o *chatSvr) OpenIMCallback(ctx context.Context, req *chat.OpenIMCallbackReq) (*chat.OpenIMCallbackResp, error) {
switch req.Command {
- case constant.CallbackBeforeAddFriendCommand:
+ case constantpb.CallbackBeforeAddFriendCommand:
var data CallbackBeforeAddFriendReq
if err := json.Unmarshal([]byte(req.Body), &data); err != nil {
return nil, errs.Wrap(err)
@@ -51,7 +51,7 @@ func (o *chatSvr) OpenIMCallback(ctx context.Context, req *chat.OpenIMCallbackRe
if err != nil {
return nil, err
}
- if user.AllowAddFriend != constant2.OrdinaryUserAddFriendEnable {
+ if user.AllowAddFriend != constant.OrdinaryUserAddFriendEnable {
return nil, eerrs.ErrRefuseFriend.WrapMsg(fmt.Sprintf("state %d", user.AllowAddFriend))
}
return &chat.OpenIMCallbackResp{}, nil
diff --git a/internal/rpc/chat/login.go b/internal/rpc/chat/login.go
index 86f6bcc31..f1f2474b8 100644
--- a/internal/rpc/chat/login.go
+++ b/internal/rpc/chat/login.go
@@ -17,13 +17,13 @@ package chat
import (
"context"
"fmt"
- "github.com/openimsdk/tools/utils/datautil"
"math/rand"
"strconv"
"strings"
"time"
- constant2 "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
+ "github.com/openimsdk/tools/utils/datautil"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/log"
@@ -31,7 +31,7 @@ import (
"github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/common/db/dbutil"
- chat2 "github.com/openimsdk/chat/pkg/common/db/table/chat"
+ chatdb "github.com/openimsdk/chat/pkg/common/db/table/chat"
"github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/chat/pkg/protocol/chat"
)
@@ -142,11 +142,11 @@ func (o *chatSvr) SendVerifyCode(ctx context.Context, req *chat.SendVerifyCodeRe
if o.Code.MaxCount < int(count) {
return nil, eerrs.ErrVerifyCodeSendFrequently.Wrap()
}
- platformName := constant2.PlatformIDToName(int(req.Platform))
+ platformName := constantpb.PlatformIDToName(int(req.Platform))
if platformName == "" {
platformName = fmt.Sprintf("platform:%d", req.Platform)
}
- vc := &chat2.VerifyCode{
+ vc := &chatdb.VerifyCode{
Account: account,
Code: code,
Platform: platformName,
@@ -285,7 +285,6 @@ func (o *chatSvr) RegisterUser(ctx context.Context, req *chat.RegisterUserReq) (
return nil, err
}
}
-
}
if req.User.UserID == "" {
for i := 0; i < 20; i++ {
@@ -349,23 +348,23 @@ func (o *chatSvr) RegisterUser(ctx context.Context, req *chat.RegisterUserReq) (
return nil, err
}
}
- register := &chat2.Register{
+ register := &chatdb.Register{
UserID: req.User.UserID,
DeviceID: req.DeviceID,
IP: req.Ip,
- Platform: constant2.PlatformID2Name[int(req.Platform)],
+ Platform: constantpb.PlatformID2Name[int(req.Platform)],
AccountType: "",
Mode: constant.UserMode,
CreateTime: time.Now(),
}
- account := &chat2.Account{
+ account := &chatdb.Account{
UserID: req.User.UserID,
Password: req.User.Password,
OperatorUserID: mcontext.GetOpUserID(ctx),
ChangeTime: register.CreateTime,
CreateTime: register.CreateTime,
}
- attribute := &chat2.Attribute{
+ attribute := &chatdb.Attribute{
UserID: req.User.UserID,
Account: req.User.Account,
PhoneNumber: req.User.PhoneNumber,
@@ -408,7 +407,7 @@ func (o *chatSvr) Login(ctx context.Context, req *chat.LoginReq) (*chat.LoginRes
return nil, errs.ErrArgs.WrapMsg("password or code must be set")
}
var err error
- var attribute *chat2.Attribute
+ var attribute *chatdb.Attribute
if req.Account != "" {
attribute, err = o.Database.GetAttributeByAccount(ctx, req.Account)
} else if req.PhoneNumber != "" {
@@ -464,12 +463,12 @@ func (o *chatSvr) Login(ctx context.Context, req *chat.LoginReq) (*chat.LoginRes
if err != nil {
return nil, err
}
- record := &chat2.UserLoginRecord{
+ record := &chatdb.UserLoginRecord{
UserID: attribute.UserID,
LoginTime: time.Now(),
IP: req.Ip,
DeviceID: req.DeviceID,
- Platform: constant2.PlatformIDToName(int(req.Platform)),
+ Platform: constantpb.PlatformIDToName(int(req.Platform)),
}
if err := o.Database.LoginRecord(ctx, record, verifyCodeID); err != nil {
return nil, err
diff --git a/internal/rpc/chat/password.go b/internal/rpc/chat/password.go
index e673d865b..c1d141a76 100644
--- a/internal/rpc/chat/password.go
+++ b/internal/rpc/chat/password.go
@@ -16,6 +16,7 @@ package chat
import (
"context"
+
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/chat/pkg/common/constant"
@@ -51,10 +52,9 @@ func (o *chatSvr) ResetPassword(ctx context.Context, req *chat.ResetPasswordReq)
return nil, err
}
err = o.Database.UpdatePasswordAndDeleteVerifyCode(ctx, attribute.UserID, req.Password, verifyCodeID)
- }
-
- if err != nil {
- return nil, err
+ if err != nil {
+ return nil, err
+ }
}
return &chat.ResetPasswordResp{}, nil
}
diff --git a/internal/rpc/chat/rtc.go b/internal/rpc/chat/rtc.go
index 2e531f5a3..05a812d77 100644
--- a/internal/rpc/chat/rtc.go
+++ b/internal/rpc/chat/rtc.go
@@ -2,6 +2,7 @@ package chat
import (
"context"
+
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/protocol/chat"
)
diff --git a/internal/rpc/chat/start.go b/internal/rpc/chat/start.go
index fd14fe7cc..71939dd54 100644
--- a/internal/rpc/chat/start.go
+++ b/internal/rpc/chat/start.go
@@ -2,6 +2,8 @@ package chat
import (
"context"
+ "time"
+
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/common/rtc"
"github.com/openimsdk/chat/pkg/protocol/admin"
@@ -12,7 +14,6 @@ import (
"github.com/openimsdk/tools/mw"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
- "time"
"github.com/openimsdk/chat/pkg/common/config"
"github.com/openimsdk/chat/pkg/common/db/database"
diff --git a/internal/rpc/chat/user.go b/internal/rpc/chat/user.go
index 61ac31ece..1dcb88a54 100644
--- a/internal/rpc/chat/user.go
+++ b/internal/rpc/chat/user.go
@@ -16,11 +16,12 @@ package chat
import (
"context"
+ "time"
+
"github.com/openimsdk/chat/pkg/common/db/dbutil"
- chat2 "github.com/openimsdk/chat/pkg/common/db/table/chat"
- constant2 "github.com/openimsdk/protocol/constant"
+ chatdb "github.com/openimsdk/chat/pkg/common/db/table/chat"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/mcontext"
- "time"
"github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/common/mctx"
@@ -142,23 +143,23 @@ func (o *chatSvr) AddUserAccount(ctx context.Context, req *chat.AddUserAccountRe
}
}
- register := &chat2.Register{
+ register := &chatdb.Register{
UserID: req.User.UserID,
DeviceID: req.DeviceID,
IP: req.Ip,
- Platform: constant2.PlatformID2Name[int(req.Platform)],
+ Platform: constantpb.PlatformID2Name[int(req.Platform)],
AccountType: "",
Mode: constant.UserMode,
CreateTime: time.Now(),
}
- account := &chat2.Account{
+ account := &chatdb.Account{
UserID: req.User.UserID,
Password: req.User.Password,
OperatorUserID: mcontext.GetOpUserID(ctx),
ChangeTime: register.CreateTime,
CreateTime: register.CreateTime,
}
- attribute := &chat2.Attribute{
+ attribute := &chatdb.Attribute{
UserID: req.User.UserID,
Account: req.User.Account,
PhoneNumber: req.User.PhoneNumber,
diff --git a/pkg/common/db/database/admin.go b/pkg/common/db/database/admin.go
index 6b076be78..7920555e0 100644
--- a/pkg/common/db/database/admin.go
+++ b/pkg/common/db/database/admin.go
@@ -16,6 +16,7 @@ package database
import (
"context"
+
"github.com/openimsdk/chat/pkg/common/db/cache"
"github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/db/mongoutil"
@@ -24,55 +25,55 @@ import (
"github.com/redis/go-redis/v9"
"github.com/openimsdk/chat/pkg/common/db/model/admin"
- table "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
)
type AdminDatabaseInterface interface {
- GetAdmin(ctx context.Context, account string) (*table.Admin, error)
- GetAdminUserID(ctx context.Context, userID string) (*table.Admin, error)
+ GetAdmin(ctx context.Context, account string) (*admindb.Admin, error)
+ GetAdminUserID(ctx context.Context, userID string) (*admindb.Admin, error)
UpdateAdmin(ctx context.Context, userID string, update map[string]any) error
ChangePassword(ctx context.Context, userID string, newPassword string) error
- AddAdminAccount(ctx context.Context, admin []*table.Admin) error
+ AddAdminAccount(ctx context.Context, admin []*admindb.Admin) error
DelAdminAccount(ctx context.Context, userIDs []string) error
- SearchAdminAccount(ctx context.Context, pagination pagination.Pagination) (int64, []*table.Admin, error)
- CreateApplet(ctx context.Context, applets []*table.Applet) error
+ SearchAdminAccount(ctx context.Context, pagination pagination.Pagination) (int64, []*admindb.Admin, error)
+ CreateApplet(ctx context.Context, applets []*admindb.Applet) error
DelApplet(ctx context.Context, appletIDs []string) error
- GetApplet(ctx context.Context, appletID string) (*table.Applet, error)
- FindApplet(ctx context.Context, appletIDs []string) ([]*table.Applet, error)
- SearchApplet(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.Applet, error)
- FindOnShelf(ctx context.Context) ([]*table.Applet, error)
+ GetApplet(ctx context.Context, appletID string) (*admindb.Applet, error)
+ FindApplet(ctx context.Context, appletIDs []string) ([]*admindb.Applet, error)
+ SearchApplet(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.Applet, error)
+ FindOnShelf(ctx context.Context) ([]*admindb.Applet, error)
UpdateApplet(ctx context.Context, appletID string, update map[string]any) error
GetConfig(ctx context.Context) (map[string]string, error)
SetConfig(ctx context.Context, cs map[string]string) error
DelConfig(ctx context.Context, keys []string) error
- FindInvitationRegister(ctx context.Context, codes []string) ([]*table.InvitationRegister, error)
+ FindInvitationRegister(ctx context.Context, codes []string) ([]*admindb.InvitationRegister, error)
DelInvitationRegister(ctx context.Context, codes []string) error
UpdateInvitationRegister(ctx context.Context, code string, fields map[string]any) error
- CreatInvitationRegister(ctx context.Context, invitationRegisters []*table.InvitationRegister) error
- SearchInvitationRegister(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*table.InvitationRegister, error)
- SearchIPForbidden(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*table.IPForbidden, error)
- AddIPForbidden(ctx context.Context, ms []*table.IPForbidden) error
- FindIPForbidden(ctx context.Context, ms []string) ([]*table.IPForbidden, error)
+ CreatInvitationRegister(ctx context.Context, invitationRegisters []*admindb.InvitationRegister) error
+ SearchInvitationRegister(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*admindb.InvitationRegister, error)
+ SearchIPForbidden(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*admindb.IPForbidden, error)
+ AddIPForbidden(ctx context.Context, ms []*admindb.IPForbidden) error
+ FindIPForbidden(ctx context.Context, ms []string) ([]*admindb.IPForbidden, error)
DelIPForbidden(ctx context.Context, ips []string) error
FindDefaultFriend(ctx context.Context, userIDs []string) ([]string, error)
- AddDefaultFriend(ctx context.Context, ms []*table.RegisterAddFriend) error
+ AddDefaultFriend(ctx context.Context, ms []*admindb.RegisterAddFriend) error
DelDefaultFriend(ctx context.Context, userIDs []string) error
- SearchDefaultFriend(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.RegisterAddFriend, error)
+ SearchDefaultFriend(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.RegisterAddFriend, error)
FindDefaultGroup(ctx context.Context, groupIDs []string) ([]string, error)
- AddDefaultGroup(ctx context.Context, ms []*table.RegisterAddGroup) error
+ AddDefaultGroup(ctx context.Context, ms []*admindb.RegisterAddGroup) error
DelDefaultGroup(ctx context.Context, groupIDs []string) error
- SearchDefaultGroup(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.RegisterAddGroup, error)
- FindBlockInfo(ctx context.Context, userIDs []string) ([]*table.ForbiddenAccount, error)
- GetBlockInfo(ctx context.Context, userID string) (*table.ForbiddenAccount, error)
- BlockUser(ctx context.Context, f []*table.ForbiddenAccount) error
+ SearchDefaultGroup(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.RegisterAddGroup, error)
+ FindBlockInfo(ctx context.Context, userIDs []string) ([]*admindb.ForbiddenAccount, error)
+ GetBlockInfo(ctx context.Context, userID string) (*admindb.ForbiddenAccount, error)
+ BlockUser(ctx context.Context, f []*admindb.ForbiddenAccount) error
DelBlockUser(ctx context.Context, userID []string) error
- SearchBlockUser(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.ForbiddenAccount, error)
- FindBlockUser(ctx context.Context, userIDs []string) ([]*table.ForbiddenAccount, error)
- SearchUserLimitLogin(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.LimitUserLoginIP, error)
- AddUserLimitLogin(ctx context.Context, ms []*table.LimitUserLoginIP) error
- DelUserLimitLogin(ctx context.Context, ms []*table.LimitUserLoginIP) error
+ SearchBlockUser(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.ForbiddenAccount, error)
+ FindBlockUser(ctx context.Context, userIDs []string) ([]*admindb.ForbiddenAccount, error)
+ SearchUserLimitLogin(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.LimitUserLoginIP, error)
+ AddUserLimitLogin(ctx context.Context, ms []*admindb.LimitUserLoginIP) error
+ DelUserLimitLogin(ctx context.Context, ms []*admindb.LimitUserLoginIP) error
CountLimitUserLoginIP(ctx context.Context, userID string) (uint32, error)
- GetLimitUserLoginIP(ctx context.Context, userID string, ip string) (*table.LimitUserLoginIP, error)
+ GetLimitUserLoginIP(ctx context.Context, userID string, ip string) (*admindb.LimitUserLoginIP, error)
CacheToken(ctx context.Context, userID string, token string) error
GetTokens(ctx context.Context, userID string) (map[string]int32, error)
}
@@ -131,23 +132,23 @@ func NewAdminDatabase(cli *mongoutil.Client, rdb redis.UniversalClient) (AdminDa
type AdminDatabase struct {
tx tx.Tx
- admin table.AdminInterface
- ipForbidden table.IPForbiddenInterface
- forbiddenAccount table.ForbiddenAccountInterface
- limitUserLoginIP table.LimitUserLoginIPInterface
- invitationRegister table.InvitationRegisterInterface
- registerAddFriend table.RegisterAddFriendInterface
- registerAddGroup table.RegisterAddGroupInterface
- applet table.AppletInterface
- clientConfig table.ClientConfigInterface
+ admin admindb.AdminInterface
+ ipForbidden admindb.IPForbiddenInterface
+ forbiddenAccount admindb.ForbiddenAccountInterface
+ limitUserLoginIP admindb.LimitUserLoginIPInterface
+ invitationRegister admindb.InvitationRegisterInterface
+ registerAddFriend admindb.RegisterAddFriendInterface
+ registerAddGroup admindb.RegisterAddGroupInterface
+ applet admindb.AppletInterface
+ clientConfig admindb.ClientConfigInterface
cache cache.TokenInterface
}
-func (o *AdminDatabase) GetAdmin(ctx context.Context, account string) (*table.Admin, error) {
+func (o *AdminDatabase) GetAdmin(ctx context.Context, account string) (*admindb.Admin, error) {
return o.admin.Take(ctx, account)
}
-func (o *AdminDatabase) GetAdminUserID(ctx context.Context, userID string) (*table.Admin, error) {
+func (o *AdminDatabase) GetAdminUserID(ctx context.Context, userID string) (*admindb.Admin, error) {
return o.admin.TakeUserID(ctx, userID)
}
@@ -158,7 +159,8 @@ func (o *AdminDatabase) UpdateAdmin(ctx context.Context, userID string, update m
func (o *AdminDatabase) ChangePassword(ctx context.Context, userID string, newPassword string) error {
return o.admin.ChangePassword(ctx, userID, newPassword)
}
-func (o *AdminDatabase) AddAdminAccount(ctx context.Context, admins []*table.Admin) error {
+
+func (o *AdminDatabase) AddAdminAccount(ctx context.Context, admins []*admindb.Admin) error {
return o.admin.Create(ctx, admins)
}
@@ -166,11 +168,11 @@ func (o *AdminDatabase) DelAdminAccount(ctx context.Context, userIDs []string) e
return o.admin.Delete(ctx, userIDs)
}
-func (o *AdminDatabase) SearchAdminAccount(ctx context.Context, pagination pagination.Pagination) (int64, []*table.Admin, error) {
+func (o *AdminDatabase) SearchAdminAccount(ctx context.Context, pagination pagination.Pagination) (int64, []*admindb.Admin, error) {
return o.admin.Search(ctx, pagination)
}
-func (o *AdminDatabase) CreateApplet(ctx context.Context, applets []*table.Applet) error {
+func (o *AdminDatabase) CreateApplet(ctx context.Context, applets []*admindb.Applet) error {
return o.applet.Create(ctx, applets)
}
@@ -178,19 +180,19 @@ func (o *AdminDatabase) DelApplet(ctx context.Context, appletIDs []string) error
return o.applet.Del(ctx, appletIDs)
}
-func (o *AdminDatabase) GetApplet(ctx context.Context, appletID string) (*table.Applet, error) {
+func (o *AdminDatabase) GetApplet(ctx context.Context, appletID string) (*admindb.Applet, error) {
return o.applet.Take(ctx, appletID)
}
-func (o *AdminDatabase) FindApplet(ctx context.Context, appletIDs []string) ([]*table.Applet, error) {
+func (o *AdminDatabase) FindApplet(ctx context.Context, appletIDs []string) ([]*admindb.Applet, error) {
return o.applet.FindID(ctx, appletIDs)
}
-func (o *AdminDatabase) SearchApplet(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.Applet, error) {
+func (o *AdminDatabase) SearchApplet(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.Applet, error) {
return o.applet.Search(ctx, keyword, pagination)
}
-func (o *AdminDatabase) FindOnShelf(ctx context.Context) ([]*table.Applet, error) {
+func (o *AdminDatabase) FindOnShelf(ctx context.Context) ([]*admindb.Applet, error) {
return o.applet.FindOnShelf(ctx)
}
@@ -210,7 +212,7 @@ func (o *AdminDatabase) DelConfig(ctx context.Context, keys []string) error {
return o.clientConfig.Del(ctx, keys)
}
-func (o *AdminDatabase) FindInvitationRegister(ctx context.Context, codes []string) ([]*table.InvitationRegister, error) {
+func (o *AdminDatabase) FindInvitationRegister(ctx context.Context, codes []string) ([]*admindb.InvitationRegister, error) {
return o.invitationRegister.Find(ctx, codes)
}
@@ -222,23 +224,23 @@ func (o *AdminDatabase) UpdateInvitationRegister(ctx context.Context, code strin
return o.invitationRegister.Update(ctx, code, fields)
}
-func (o *AdminDatabase) CreatInvitationRegister(ctx context.Context, invitationRegisters []*table.InvitationRegister) error {
+func (o *AdminDatabase) CreatInvitationRegister(ctx context.Context, invitationRegisters []*admindb.InvitationRegister) error {
return o.invitationRegister.Create(ctx, invitationRegisters)
}
-func (o *AdminDatabase) SearchInvitationRegister(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*table.InvitationRegister, error) {
+func (o *AdminDatabase) SearchInvitationRegister(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*admindb.InvitationRegister, error) {
return o.invitationRegister.Search(ctx, keyword, state, userIDs, codes, pagination)
}
-func (o *AdminDatabase) SearchIPForbidden(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*table.IPForbidden, error) {
+func (o *AdminDatabase) SearchIPForbidden(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*admindb.IPForbidden, error) {
return o.ipForbidden.Search(ctx, keyword, state, pagination)
}
-func (o *AdminDatabase) AddIPForbidden(ctx context.Context, ms []*table.IPForbidden) error {
+func (o *AdminDatabase) AddIPForbidden(ctx context.Context, ms []*admindb.IPForbidden) error {
return o.ipForbidden.Create(ctx, ms)
}
-func (o *AdminDatabase) FindIPForbidden(ctx context.Context, ms []string) ([]*table.IPForbidden, error) {
+func (o *AdminDatabase) FindIPForbidden(ctx context.Context, ms []string) ([]*admindb.IPForbidden, error) {
return o.ipForbidden.Find(ctx, ms)
}
@@ -250,7 +252,7 @@ func (o *AdminDatabase) FindDefaultFriend(ctx context.Context, userIDs []string)
return o.registerAddFriend.FindUserID(ctx, userIDs)
}
-func (o *AdminDatabase) AddDefaultFriend(ctx context.Context, ms []*table.RegisterAddFriend) error {
+func (o *AdminDatabase) AddDefaultFriend(ctx context.Context, ms []*admindb.RegisterAddFriend) error {
return o.registerAddFriend.Add(ctx, ms)
}
@@ -258,7 +260,7 @@ func (o *AdminDatabase) DelDefaultFriend(ctx context.Context, userIDs []string)
return o.registerAddFriend.Del(ctx, userIDs)
}
-func (o *AdminDatabase) SearchDefaultFriend(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.RegisterAddFriend, error) {
+func (o *AdminDatabase) SearchDefaultFriend(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.RegisterAddFriend, error) {
return o.registerAddFriend.Search(ctx, keyword, pagination)
}
@@ -266,7 +268,7 @@ func (o *AdminDatabase) FindDefaultGroup(ctx context.Context, groupIDs []string)
return o.registerAddGroup.FindGroupID(ctx, groupIDs)
}
-func (o *AdminDatabase) AddDefaultGroup(ctx context.Context, ms []*table.RegisterAddGroup) error {
+func (o *AdminDatabase) AddDefaultGroup(ctx context.Context, ms []*admindb.RegisterAddGroup) error {
return o.registerAddGroup.Add(ctx, ms)
}
@@ -274,19 +276,19 @@ func (o *AdminDatabase) DelDefaultGroup(ctx context.Context, groupIDs []string)
return o.registerAddGroup.Del(ctx, groupIDs)
}
-func (o *AdminDatabase) SearchDefaultGroup(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.RegisterAddGroup, error) {
+func (o *AdminDatabase) SearchDefaultGroup(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.RegisterAddGroup, error) {
return o.registerAddGroup.Search(ctx, keyword, pagination)
}
-func (o *AdminDatabase) FindBlockInfo(ctx context.Context, userIDs []string) ([]*table.ForbiddenAccount, error) {
+func (o *AdminDatabase) FindBlockInfo(ctx context.Context, userIDs []string) ([]*admindb.ForbiddenAccount, error) {
return o.forbiddenAccount.Find(ctx, userIDs)
}
-func (o *AdminDatabase) GetBlockInfo(ctx context.Context, userID string) (*table.ForbiddenAccount, error) {
+func (o *AdminDatabase) GetBlockInfo(ctx context.Context, userID string) (*admindb.ForbiddenAccount, error) {
return o.forbiddenAccount.Take(ctx, userID)
}
-func (o *AdminDatabase) BlockUser(ctx context.Context, f []*table.ForbiddenAccount) error {
+func (o *AdminDatabase) BlockUser(ctx context.Context, f []*admindb.ForbiddenAccount) error {
return o.forbiddenAccount.Create(ctx, f)
}
@@ -294,23 +296,23 @@ func (o *AdminDatabase) DelBlockUser(ctx context.Context, userID []string) error
return o.forbiddenAccount.Delete(ctx, userID)
}
-func (o *AdminDatabase) SearchBlockUser(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.ForbiddenAccount, error) {
+func (o *AdminDatabase) SearchBlockUser(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.ForbiddenAccount, error) {
return o.forbiddenAccount.Search(ctx, keyword, pagination)
}
-func (o *AdminDatabase) FindBlockUser(ctx context.Context, userIDs []string) ([]*table.ForbiddenAccount, error) {
+func (o *AdminDatabase) FindBlockUser(ctx context.Context, userIDs []string) ([]*admindb.ForbiddenAccount, error) {
return o.forbiddenAccount.Find(ctx, userIDs)
}
-func (o *AdminDatabase) SearchUserLimitLogin(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*table.LimitUserLoginIP, error) {
+func (o *AdminDatabase) SearchUserLimitLogin(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admindb.LimitUserLoginIP, error) {
return o.limitUserLoginIP.Search(ctx, keyword, pagination)
}
-func (o *AdminDatabase) AddUserLimitLogin(ctx context.Context, ms []*table.LimitUserLoginIP) error {
+func (o *AdminDatabase) AddUserLimitLogin(ctx context.Context, ms []*admindb.LimitUserLoginIP) error {
return o.limitUserLoginIP.Create(ctx, ms)
}
-func (o *AdminDatabase) DelUserLimitLogin(ctx context.Context, ms []*table.LimitUserLoginIP) error {
+func (o *AdminDatabase) DelUserLimitLogin(ctx context.Context, ms []*admindb.LimitUserLoginIP) error {
return o.limitUserLoginIP.Delete(ctx, ms)
}
@@ -318,7 +320,7 @@ func (o *AdminDatabase) CountLimitUserLoginIP(ctx context.Context, userID string
return o.limitUserLoginIP.Count(ctx, userID)
}
-func (o *AdminDatabase) GetLimitUserLoginIP(ctx context.Context, userID string, ip string) (*table.LimitUserLoginIP, error) {
+func (o *AdminDatabase) GetLimitUserLoginIP(ctx context.Context, userID string, ip string) (*admindb.LimitUserLoginIP, error) {
return o.limitUserLoginIP.Take(ctx, userID, ip)
}
diff --git a/pkg/common/db/database/chat.go b/pkg/common/db/database/chat.go
index 3d83cfba9..ea66dcb62 100644
--- a/pkg/common/db/database/chat.go
+++ b/pkg/common/db/database/chat.go
@@ -16,41 +16,42 @@ package database
import (
"context"
+ "time"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"github.com/openimsdk/tools/db/tx"
- "time"
- constant2 "github.com/openimsdk/chat/pkg/common/constant"
- admin2 "github.com/openimsdk/chat/pkg/common/db/model/admin"
+ "github.com/openimsdk/chat/pkg/common/constant"
+ admindb "github.com/openimsdk/chat/pkg/common/db/model/admin"
"github.com/openimsdk/chat/pkg/common/db/model/chat"
"github.com/openimsdk/chat/pkg/common/db/table/admin"
- table "github.com/openimsdk/chat/pkg/common/db/table/chat"
+ chatdb "github.com/openimsdk/chat/pkg/common/db/table/chat"
)
type ChatDatabaseInterface interface {
- GetUser(ctx context.Context, userID string) (account *table.Account, err error)
+ GetUser(ctx context.Context, userID string) (account *chatdb.Account, err error)
UpdateUseInfo(ctx context.Context, userID string, attribute map[string]any) (err error)
- FindAttribute(ctx context.Context, userIDs []string) ([]*table.Attribute, error)
- FindAttributeByAccount(ctx context.Context, accounts []string) ([]*table.Attribute, error)
- TakeAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*table.Attribute, error)
- TakeAttributeByEmail(ctx context.Context, Email string) (*table.Attribute, error)
- TakeAttributeByAccount(ctx context.Context, account string) (*table.Attribute, error)
- TakeAttributeByUserID(ctx context.Context, userID string) (*table.Attribute, error)
- Search(ctx context.Context, normalUser int32, keyword string, gender int32, pagination pagination.Pagination) (int64, []*table.Attribute, error)
- SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*table.Attribute, error)
+ FindAttribute(ctx context.Context, userIDs []string) ([]*chatdb.Attribute, error)
+ FindAttributeByAccount(ctx context.Context, accounts []string) ([]*chatdb.Attribute, error)
+ TakeAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*chatdb.Attribute, error)
+ TakeAttributeByEmail(ctx context.Context, Email string) (*chatdb.Attribute, error)
+ TakeAttributeByAccount(ctx context.Context, account string) (*chatdb.Attribute, error)
+ TakeAttributeByUserID(ctx context.Context, userID string) (*chatdb.Attribute, error)
+ Search(ctx context.Context, normalUser int32, keyword string, gender int32, pagination pagination.Pagination) (int64, []*chatdb.Attribute, error)
+ SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*chatdb.Attribute, error)
CountVerifyCodeRange(ctx context.Context, account string, start time.Time, end time.Time) (int64, error)
- AddVerifyCode(ctx context.Context, verifyCode *table.VerifyCode, fn func() error) error
+ AddVerifyCode(ctx context.Context, verifyCode *chatdb.VerifyCode, fn func() error) error
UpdateVerifyCodeIncrCount(ctx context.Context, id string) error
- TakeLastVerifyCode(ctx context.Context, account string) (*table.VerifyCode, error)
+ TakeLastVerifyCode(ctx context.Context, account string) (*chatdb.VerifyCode, error)
DelVerifyCode(ctx context.Context, id string) error
- RegisterUser(ctx context.Context, register *table.Register, account *table.Account, attribute *table.Attribute) error
- GetAccount(ctx context.Context, userID string) (*table.Account, error)
- GetAttribute(ctx context.Context, userID string) (*table.Attribute, error)
- GetAttributeByAccount(ctx context.Context, account string) (*table.Attribute, error)
- GetAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*table.Attribute, error)
- GetAttributeByEmail(ctx context.Context, email string) (*table.Attribute, error)
- LoginRecord(ctx context.Context, record *table.UserLoginRecord, verifyCodeID *string) error
+ RegisterUser(ctx context.Context, register *chatdb.Register, account *chatdb.Account, attribute *chatdb.Attribute) error
+ GetAccount(ctx context.Context, userID string) (*chatdb.Account, error)
+ GetAttribute(ctx context.Context, userID string) (*chatdb.Attribute, error)
+ GetAttributeByAccount(ctx context.Context, account string) (*chatdb.Attribute, error)
+ GetAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*chatdb.Attribute, error)
+ GetAttributeByEmail(ctx context.Context, email string) (*chatdb.Attribute, error)
+ LoginRecord(ctx context.Context, record *chatdb.UserLoginRecord, verifyCodeID *string) error
UpdatePassword(ctx context.Context, userID string, password string) error
UpdatePasswordAndDeleteVerifyCode(ctx context.Context, userID string, password string, codeID string) error
NewUserCountTotal(ctx context.Context, before *time.Time) (int64, error)
@@ -79,7 +80,7 @@ func NewChatDatabase(cli *mongoutil.Client) (ChatDatabaseInterface, error) {
if err != nil {
return nil, err
}
- forbiddenAccount, err := admin2.NewForbiddenAccount(cli.GetDB())
+ forbiddenAccount, err := admindb.NewForbiddenAccount(cli.GetDB())
if err != nil {
return nil, err
}
@@ -96,15 +97,15 @@ func NewChatDatabase(cli *mongoutil.Client) (ChatDatabaseInterface, error) {
type ChatDatabase struct {
tx tx.Tx
- register table.RegisterInterface
- account table.AccountInterface
- attribute table.AttributeInterface
- userLoginRecord table.UserLoginRecordInterface
- verifyCode table.VerifyCodeInterface
+ register chatdb.RegisterInterface
+ account chatdb.AccountInterface
+ attribute chatdb.AttributeInterface
+ userLoginRecord chatdb.UserLoginRecordInterface
+ verifyCode chatdb.VerifyCodeInterface
forbiddenAccount admin.ForbiddenAccountInterface
}
-func (o *ChatDatabase) GetUser(ctx context.Context, userID string) (account *table.Account, err error) {
+func (o *ChatDatabase) GetUser(ctx context.Context, userID string) (account *chatdb.Account, err error) {
return o.account.Take(ctx, userID)
}
@@ -112,33 +113,33 @@ func (o *ChatDatabase) UpdateUseInfo(ctx context.Context, userID string, attribu
return o.attribute.Update(ctx, userID, attribute)
}
-func (o *ChatDatabase) FindAttribute(ctx context.Context, userIDs []string) ([]*table.Attribute, error) {
+func (o *ChatDatabase) FindAttribute(ctx context.Context, userIDs []string) ([]*chatdb.Attribute, error) {
return o.attribute.Find(ctx, userIDs)
}
-func (o *ChatDatabase) FindAttributeByAccount(ctx context.Context, accounts []string) ([]*table.Attribute, error) {
+func (o *ChatDatabase) FindAttributeByAccount(ctx context.Context, accounts []string) ([]*chatdb.Attribute, error) {
return o.attribute.FindAccount(ctx, accounts)
}
-func (o *ChatDatabase) TakeAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*table.Attribute, error) {
+func (o *ChatDatabase) TakeAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*chatdb.Attribute, error) {
return o.attribute.TakePhone(ctx, areaCode, phoneNumber)
}
-func (o *ChatDatabase) TakeAttributeByEmail(ctx context.Context, email string) (*table.Attribute, error) {
+func (o *ChatDatabase) TakeAttributeByEmail(ctx context.Context, email string) (*chatdb.Attribute, error) {
return o.attribute.TakeEmail(ctx, email)
}
-func (o *ChatDatabase) TakeAttributeByAccount(ctx context.Context, account string) (*table.Attribute, error) {
+func (o *ChatDatabase) TakeAttributeByAccount(ctx context.Context, account string) (*chatdb.Attribute, error) {
return o.attribute.TakeAccount(ctx, account)
}
-func (o *ChatDatabase) TakeAttributeByUserID(ctx context.Context, userID string) (*table.Attribute, error) {
+func (o *ChatDatabase) TakeAttributeByUserID(ctx context.Context, userID string) (*chatdb.Attribute, error) {
return o.attribute.Take(ctx, userID)
}
-func (o *ChatDatabase) Search(ctx context.Context, normalUser int32, keyword string, genders int32, pagination pagination.Pagination) (total int64, attributes []*table.Attribute, err error) {
+func (o *ChatDatabase) Search(ctx context.Context, normalUser int32, keyword string, genders int32, pagination pagination.Pagination) (total int64, attributes []*chatdb.Attribute, err error) {
var forbiddenIDs []string
- if int(normalUser) == constant2.NormalUser {
+ if int(normalUser) == constant.NormalUser {
forbiddenIDs, err = o.forbiddenAccount.FindAllIDs(ctx)
if err != nil {
return 0, nil, err
@@ -151,7 +152,7 @@ func (o *ChatDatabase) Search(ctx context.Context, normalUser int32, keyword str
return total, totalUser, nil
}
-func (o *ChatDatabase) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*table.Attribute, error) {
+func (o *ChatDatabase) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*chatdb.Attribute, error) {
return o.attribute.SearchUser(ctx, keyword, userIDs, genders, pagination)
}
@@ -159,9 +160,9 @@ func (o *ChatDatabase) CountVerifyCodeRange(ctx context.Context, account string,
return o.verifyCode.RangeNum(ctx, account, start, end)
}
-func (o *ChatDatabase) AddVerifyCode(ctx context.Context, verifyCode *table.VerifyCode, fn func() error) error {
+func (o *ChatDatabase) AddVerifyCode(ctx context.Context, verifyCode *chatdb.VerifyCode, fn func() error) error {
return o.tx.Transaction(ctx, func(ctx context.Context) error {
- if err := o.verifyCode.Add(ctx, []*table.VerifyCode{verifyCode}); err != nil {
+ if err := o.verifyCode.Add(ctx, []*chatdb.VerifyCode{verifyCode}); err != nil {
return err
}
if fn != nil {
@@ -175,7 +176,7 @@ func (o *ChatDatabase) UpdateVerifyCodeIncrCount(ctx context.Context, id string)
return o.verifyCode.Incr(ctx, id)
}
-func (o *ChatDatabase) TakeLastVerifyCode(ctx context.Context, account string) (*table.VerifyCode, error) {
+func (o *ChatDatabase) TakeLastVerifyCode(ctx context.Context, account string) (*chatdb.VerifyCode, error) {
return o.verifyCode.TakeLast(ctx, account)
}
@@ -183,7 +184,7 @@ func (o *ChatDatabase) DelVerifyCode(ctx context.Context, id string) error {
return o.verifyCode.Delete(ctx, id)
}
-func (o *ChatDatabase) RegisterUser(ctx context.Context, register *table.Register, account *table.Account, attribute *table.Attribute) error {
+func (o *ChatDatabase) RegisterUser(ctx context.Context, register *chatdb.Register, account *chatdb.Account, attribute *chatdb.Attribute) error {
return o.tx.Transaction(ctx, func(ctx context.Context) error {
if err := o.register.Create(ctx, register); err != nil {
return err
@@ -198,25 +199,27 @@ func (o *ChatDatabase) RegisterUser(ctx context.Context, register *table.Registe
})
}
-func (o *ChatDatabase) GetAccount(ctx context.Context, userID string) (*table.Account, error) {
+func (o *ChatDatabase) GetAccount(ctx context.Context, userID string) (*chatdb.Account, error) {
return o.account.Take(ctx, userID)
}
-func (o *ChatDatabase) GetAttribute(ctx context.Context, userID string) (*table.Attribute, error) {
+func (o *ChatDatabase) GetAttribute(ctx context.Context, userID string) (*chatdb.Attribute, error) {
return o.attribute.Take(ctx, userID)
}
-func (o *ChatDatabase) GetAttributeByAccount(ctx context.Context, account string) (*table.Attribute, error) {
+func (o *ChatDatabase) GetAttributeByAccount(ctx context.Context, account string) (*chatdb.Attribute, error) {
return o.attribute.TakeAccount(ctx, account)
}
-func (o *ChatDatabase) GetAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*table.Attribute, error) {
+func (o *ChatDatabase) GetAttributeByPhone(ctx context.Context, areaCode string, phoneNumber string) (*chatdb.Attribute, error) {
return o.attribute.TakePhone(ctx, areaCode, phoneNumber)
}
-func (o *ChatDatabase) GetAttributeByEmail(ctx context.Context, email string) (*table.Attribute, error) {
+
+func (o *ChatDatabase) GetAttributeByEmail(ctx context.Context, email string) (*chatdb.Attribute, error) {
return o.attribute.TakeEmail(ctx, email)
}
-func (o *ChatDatabase) LoginRecord(ctx context.Context, record *table.UserLoginRecord, verifyCodeID *string) error {
+
+func (o *ChatDatabase) LoginRecord(ctx context.Context, record *chatdb.UserLoginRecord, verifyCodeID *string) error {
return o.tx.Transaction(ctx, func(ctx context.Context) error {
if err := o.userLoginRecord.Create(ctx, record); err != nil {
return err
diff --git a/pkg/common/db/model/admin/admin.go b/pkg/common/db/model/admin/admin.go
index edf87f7d6..57b6f7207 100644
--- a/pkg/common/db/model/admin/admin.go
+++ b/pkg/common/db/model/admin/admin.go
@@ -16,8 +16,9 @@ package admin
import (
"context"
+
"github.com/openimsdk/chat/pkg/common/constant"
- "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"github.com/openimsdk/tools/errs"
@@ -26,7 +27,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
)
-func NewAdmin(db *mongo.Database) (admin.AdminInterface, error) {
+func NewAdmin(db *mongo.Database) (admindb.AdminInterface, error) {
coll := db.Collection("admin")
_, err := coll.Indexes().CreateOne(context.Background(), mongo.IndexModel{
Keys: bson.D{
@@ -46,12 +47,12 @@ type Admin struct {
coll *mongo.Collection
}
-func (o *Admin) Take(ctx context.Context, account string) (*admin.Admin, error) {
- return mongoutil.FindOne[*admin.Admin](ctx, o.coll, bson.M{"account": account})
+func (o *Admin) Take(ctx context.Context, account string) (*admindb.Admin, error) {
+ return mongoutil.FindOne[*admindb.Admin](ctx, o.coll, bson.M{"account": account})
}
-func (o *Admin) TakeUserID(ctx context.Context, userID string) (*admin.Admin, error) {
- return mongoutil.FindOne[*admin.Admin](ctx, o.coll, bson.M{"user_id": userID})
+func (o *Admin) TakeUserID(ctx context.Context, userID string) (*admindb.Admin, error) {
+ return mongoutil.FindOne[*admindb.Admin](ctx, o.coll, bson.M{"user_id": userID})
}
func (o *Admin) Update(ctx context.Context, account string, update map[string]any) error {
@@ -61,13 +62,12 @@ func (o *Admin) Update(ctx context.Context, account string, update map[string]an
return mongoutil.UpdateOne(ctx, o.coll, bson.M{"user_id": account}, bson.M{"$set": update}, false)
}
-func (o *Admin) Create(ctx context.Context, admins []*admin.Admin) error {
+func (o *Admin) Create(ctx context.Context, admins []*admindb.Admin) error {
return mongoutil.InsertMany(ctx, o.coll, admins)
}
func (o *Admin) ChangePassword(ctx context.Context, userID string, newPassword string) error {
return mongoutil.UpdateOne(ctx, o.coll, bson.M{"user_id": userID}, bson.M{"$set": bson.M{"password": newPassword}}, false)
-
}
func (o *Admin) Delete(ctx context.Context, userIDs []string) error {
@@ -77,8 +77,8 @@ func (o *Admin) Delete(ctx context.Context, userIDs []string) error {
return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}})
}
-func (o *Admin) Search(ctx context.Context, pagination pagination.Pagination) (int64, []*admin.Admin, error) {
- opt := options.Find().SetSort(bson.D{{"create_time", -1}})
+func (o *Admin) Search(ctx context.Context, pagination pagination.Pagination) (int64, []*admindb.Admin, error) {
+ opt := options.Find().SetSort(bson.D{{Key: "create_time", Value: -1}})
filter := bson.M{"level": constant.NormalAdmin}
- return mongoutil.FindPage[*admin.Admin](ctx, o.coll, filter, pagination, opt)
+ return mongoutil.FindPage[*admindb.Admin](ctx, o.coll, filter, pagination, opt)
}
diff --git a/pkg/common/db/model/admin/applet.go b/pkg/common/db/model/admin/applet.go
index 57fa6c704..278fab782 100644
--- a/pkg/common/db/model/admin/applet.go
+++ b/pkg/common/db/model/admin/applet.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
@@ -67,7 +68,6 @@ func (o *Applet) Update(ctx context.Context, id string, data map[string]any) err
func (o *Applet) Take(ctx context.Context, id string) (*admin.Applet, error) {
return mongoutil.FindOne[*admin.Applet](ctx, o.coll, bson.M{"id": id})
-
}
func (o *Applet) Search(ctx context.Context, keyword string, pagination pagination.Pagination) (int64, []*admin.Applet, error) {
@@ -88,10 +88,8 @@ func (o *Applet) Search(ctx context.Context, keyword string, pagination paginati
func (o *Applet) FindOnShelf(ctx context.Context) ([]*admin.Applet, error) {
return mongoutil.Find[*admin.Applet](ctx, o.coll, bson.M{"status": constant.StatusOnShelf})
-
}
func (o *Applet) FindID(ctx context.Context, ids []string) ([]*admin.Applet, error) {
return mongoutil.Find[*admin.Applet](ctx, o.coll, bson.M{"id": bson.M{"$in": ids}})
-
}
diff --git a/pkg/common/db/model/admin/client_config.go b/pkg/common/db/model/admin/client_config.go
index cd79759cf..b5b426e47 100644
--- a/pkg/common/db/model/admin/client_config.go
+++ b/pkg/common/db/model/admin/client_config.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
@@ -55,7 +56,6 @@ func (o *ClientConfig) Set(ctx context.Context, config map[string]string) error
if err != nil {
return err
}
-
}
return nil
}
diff --git a/pkg/common/db/model/admin/forbidden_account.go b/pkg/common/db/model/admin/forbidden_account.go
index d1c8cb163..c15e842ec 100644
--- a/pkg/common/db/model/admin/forbidden_account.go
+++ b/pkg/common/db/model/admin/forbidden_account.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
diff --git a/pkg/common/db/model/admin/invitation_register.go b/pkg/common/db/model/admin/invitation_register.go
index 591102f5e..59490509f 100644
--- a/pkg/common/db/model/admin/invitation_register.go
+++ b/pkg/common/db/model/admin/invitation_register.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
@@ -23,11 +24,11 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
"github.com/openimsdk/chat/pkg/common/constant"
- "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/tools/errs"
)
-func NewInvitationRegister(db *mongo.Database) (admin.InvitationRegisterInterface, error) {
+func NewInvitationRegister(db *mongo.Database) (admindb.InvitationRegisterInterface, error) {
coll := db.Collection("invitation_register")
_, err := coll.Indexes().CreateOne(context.Background(), mongo.IndexModel{
Keys: bson.D{
@@ -47,8 +48,8 @@ type InvitationRegister struct {
coll *mongo.Collection
}
-func (o *InvitationRegister) Find(ctx context.Context, codes []string) ([]*admin.InvitationRegister, error) {
- return mongoutil.Find[*admin.InvitationRegister](ctx, o.coll, bson.M{"invitation_code": bson.M{"$in": codes}})
+func (o *InvitationRegister) Find(ctx context.Context, codes []string) ([]*admindb.InvitationRegister, error) {
+ return mongoutil.Find[*admindb.InvitationRegister](ctx, o.coll, bson.M{"invitation_code": bson.M{"$in": codes}})
}
func (o *InvitationRegister) Del(ctx context.Context, codes []string) error {
@@ -58,12 +59,12 @@ func (o *InvitationRegister) Del(ctx context.Context, codes []string) error {
return mongoutil.DeleteMany(ctx, o.coll, bson.M{"invitation_code": bson.M{"$in": codes}})
}
-func (o *InvitationRegister) Create(ctx context.Context, v []*admin.InvitationRegister) error {
+func (o *InvitationRegister) Create(ctx context.Context, v []*admindb.InvitationRegister) error {
return mongoutil.InsertMany(ctx, o.coll, v)
}
-func (o *InvitationRegister) Take(ctx context.Context, code string) (*admin.InvitationRegister, error) {
- return mongoutil.FindOne[*admin.InvitationRegister](ctx, o.coll, bson.M{"code": code})
+func (o *InvitationRegister) Take(ctx context.Context, code string) (*admindb.InvitationRegister, error) {
+ return mongoutil.FindOne[*admindb.InvitationRegister](ctx, o.coll, bson.M{"code": code})
}
func (o *InvitationRegister) Update(ctx context.Context, code string, data map[string]any) error {
@@ -73,7 +74,7 @@ func (o *InvitationRegister) Update(ctx context.Context, code string, data map[s
return mongoutil.UpdateOne(ctx, o.coll, bson.M{"invitation_code": code}, bson.M{"$set": data}, false)
}
-func (o *InvitationRegister) Search(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*admin.InvitationRegister, error) {
+func (o *InvitationRegister) Search(ctx context.Context, keyword string, state int32, userIDs []string, codes []string, pagination pagination.Pagination) (int64, []*admindb.InvitationRegister, error) {
filter := bson.M{}
switch state {
case constant.InvitationCodeUsed:
@@ -94,5 +95,5 @@ func (o *InvitationRegister) Search(ctx context.Context, keyword string, state i
{"user_id": bson.M{"$regex": keyword, "$options": "i"}},
}
}
- return mongoutil.FindPage[*admin.InvitationRegister](ctx, o.coll, filter, pagination)
+ return mongoutil.FindPage[*admindb.InvitationRegister](ctx, o.coll, filter, pagination)
}
diff --git a/pkg/common/db/model/admin/ip_forbidden.go b/pkg/common/db/model/admin/ip_forbidden.go
index 09fd33c2f..06c307ba0 100644
--- a/pkg/common/db/model/admin/ip_forbidden.go
+++ b/pkg/common/db/model/admin/ip_forbidden.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
@@ -23,11 +24,11 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
"github.com/openimsdk/chat/pkg/common/constant"
- "github.com/openimsdk/chat/pkg/common/db/table/admin"
+ admindb "github.com/openimsdk/chat/pkg/common/db/table/admin"
"github.com/openimsdk/tools/errs"
)
-func NewIPForbidden(db *mongo.Database) (admin.IPForbiddenInterface, error) {
+func NewIPForbidden(db *mongo.Database) (admindb.IPForbiddenInterface, error) {
coll := db.Collection("ip_forbidden")
_, err := coll.Indexes().CreateOne(context.Background(), mongo.IndexModel{
Keys: bson.D{
@@ -47,17 +48,15 @@ type IPForbidden struct {
coll *mongo.Collection
}
-func (o *IPForbidden) Take(ctx context.Context, ip string) (*admin.IPForbidden, error) {
- return mongoutil.FindOne[*admin.IPForbidden](ctx, o.coll, bson.M{"ip": ip})
-
+func (o *IPForbidden) Take(ctx context.Context, ip string) (*admindb.IPForbidden, error) {
+ return mongoutil.FindOne[*admindb.IPForbidden](ctx, o.coll, bson.M{"ip": ip})
}
-func (o *IPForbidden) Find(ctx context.Context, ips []string) ([]*admin.IPForbidden, error) {
- return mongoutil.Find[*admin.IPForbidden](ctx, o.coll, bson.M{"ip": bson.M{"$in": ips}})
-
+func (o *IPForbidden) Find(ctx context.Context, ips []string) ([]*admindb.IPForbidden, error) {
+ return mongoutil.Find[*admindb.IPForbidden](ctx, o.coll, bson.M{"ip": bson.M{"$in": ips}})
}
-func (o *IPForbidden) Search(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*admin.IPForbidden, error) {
+func (o *IPForbidden) Search(ctx context.Context, keyword string, state int32, pagination pagination.Pagination) (int64, []*admindb.IPForbidden, error) {
filter := bson.M{}
switch state {
@@ -81,10 +80,10 @@ func (o *IPForbidden) Search(ctx context.Context, keyword string, state int32, p
{"ip": bson.M{"$regex": keyword, "$options": "i"}},
}
}
- return mongoutil.FindPage[*admin.IPForbidden](ctx, o.coll, filter, pagination)
+ return mongoutil.FindPage[*admindb.IPForbidden](ctx, o.coll, filter, pagination)
}
-func (o *IPForbidden) Create(ctx context.Context, ms []*admin.IPForbidden) error {
+func (o *IPForbidden) Create(ctx context.Context, ms []*admindb.IPForbidden) error {
return mongoutil.InsertMany(ctx, o.coll, ms)
}
diff --git a/pkg/common/db/model/admin/limit_user_login_ip.go b/pkg/common/db/model/admin/limit_user_login_ip.go
index 55f717ca3..c2dceffcc 100644
--- a/pkg/common/db/model/admin/limit_user_login_ip.go
+++ b/pkg/common/db/model/admin/limit_user_login_ip.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
@@ -75,7 +76,6 @@ func (o *LimitUserLoginIP) Search(ctx context.Context, keyword string, paginatio
},
}
return mongoutil.FindPage[*admin.LimitUserLoginIP](ctx, o.coll, filter, pagination)
-
}
func (o *LimitUserLoginIP) limitUserLoginIPFilter(ips []*admin.LimitUserLoginIP) bson.M {
diff --git a/pkg/common/db/model/admin/register_add_friend.go b/pkg/common/db/model/admin/register_add_friend.go
index 4810b7eb8..eedd94db0 100644
--- a/pkg/common/db/model/admin/register_add_friend.go
+++ b/pkg/common/db/model/admin/register_add_friend.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
diff --git a/pkg/common/db/model/admin/register_add_group.go b/pkg/common/db/model/admin/register_add_group.go
index 4f7e404e4..f436ec779 100644
--- a/pkg/common/db/model/admin/register_add_group.go
+++ b/pkg/common/db/model/admin/register_add_group.go
@@ -16,6 +16,7 @@ package admin
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"go.mongodb.org/mongo-driver/bson"
diff --git a/pkg/common/imapi/call.go b/pkg/common/imapi/call.go
index 41f97b536..2b5646e3c 100644
--- a/pkg/common/imapi/call.go
+++ b/pkg/common/imapi/call.go
@@ -23,7 +23,7 @@ import (
"time"
"github.com/openimsdk/chat/pkg/common/constant"
- pconstant "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/log"
"gorm.io/gorm/utils"
@@ -75,10 +75,10 @@ func (a caller[Req, Resp]) call(ctx context.Context, apiPrefix string, req *Req)
if err != nil {
return nil, err
}
- operationID := utils.ToString(ctx.Value(pconstant.OperationID))
- request.Header.Set(pconstant.OperationID, operationID)
+ operationID := utils.ToString(ctx.Value(constantpb.OperationID))
+ request.Header.Set(constantpb.OperationID, operationID)
if token, _ := ctx.Value(constant.CtxApiToken).(string); token != "" {
- request.Header.Set(pconstant.Token, token)
+ request.Header.Set(constantpb.Token, token)
}
response, err := client.Do(request)
if err != nil {
diff --git a/pkg/common/imapi/caller.go b/pkg/common/imapi/caller.go
index 22ee431bc..cfe0db688 100644
--- a/pkg/common/imapi/caller.go
+++ b/pkg/common/imapi/caller.go
@@ -16,12 +16,13 @@ package imapi
import (
"context"
- "github.com/openimsdk/tools/log"
"sync"
"time"
+ "github.com/openimsdk/tools/log"
+
"github.com/openimsdk/protocol/auth"
- "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/protocol/friend"
"github.com/openimsdk/protocol/group"
"github.com/openimsdk/protocol/sdkws"
@@ -74,7 +75,7 @@ func (c *Caller) ImAdminTokenWithDefaultAdmin(ctx context.Context) (string, erro
defer c.lock.Unlock()
if c.token == "" || c.timeout.Before(time.Now()) {
userID := c.defaultIMUserID
- token, err := c.UserToken(ctx, userID, constant.AdminPlatformID)
+ token, err := c.UserToken(ctx, userID, constantpb.AdminPlatformID)
if err != nil {
log.ZError(ctx, "get im admin token", err, "userID", userID)
return "", err
@@ -127,7 +128,7 @@ func (c *Caller) RegisterUser(ctx context.Context, users []*sdkws.UserInfo) erro
}
func (c *Caller) ForceOffLine(ctx context.Context, userID string) error {
- for id := range constant.PlatformID2Name {
+ for id := range constantpb.PlatformID2Name {
_, _ = forceOffLine.Call(ctx, c.imApi, &auth.ForceLogoutReq{
PlatformID: int32(id),
UserID: userID,
diff --git a/pkg/common/mctx/get.go b/pkg/common/mctx/get.go
index 6ff3fc115..4f878e281 100644
--- a/pkg/common/mctx/get.go
+++ b/pkg/common/mctx/get.go
@@ -16,10 +16,12 @@ package mctx
import (
"context"
- "github.com/openimsdk/tools/utils/datautil"
"strconv"
- constant2 "github.com/openimsdk/protocol/constant"
+
+ "github.com/openimsdk/tools/utils/datautil"
+
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/chat/pkg/common/constant"
@@ -103,7 +105,7 @@ func CheckAdminOr(ctx context.Context, userIDs ...string) error {
}
func GetOpUserID(ctx context.Context) string {
- userID, _ := ctx.Value(constant2.OpUserID).(string)
+ userID, _ := ctx.Value(constantpb.OpUserID).(string)
return userID
}
diff --git a/pkg/protocol/chat/chat.go b/pkg/protocol/chat/chat.go
index 12b76c870..ade8b7b1c 100644
--- a/pkg/protocol/chat/chat.go
+++ b/pkg/protocol/chat/chat.go
@@ -19,7 +19,7 @@ import (
"strconv"
"github.com/openimsdk/chat/pkg/common/constant"
- pconstant "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/errs"
)
@@ -116,7 +116,7 @@ func (x *RegisterUserReq) Check() error {
if x.User.Nickname == "" {
return errs.ErrArgs.WrapMsg("Nickname is nil")
}
- if x.Platform < pconstant.IOSPlatformID || x.Platform > pconstant.AdminPlatformID {
+ if x.Platform < constantpb.IOSPlatformID || x.Platform > constantpb.AdminPlatformID {
return errs.ErrArgs.WrapMsg("platform is invalid")
}
if x.User == nil {
@@ -142,7 +142,7 @@ func (x *RegisterUserReq) Check() error {
}
func (x *LoginReq) Check() error {
- if x.Platform < pconstant.IOSPlatformID || x.Platform > pconstant.AdminPlatformID {
+ if x.Platform < constantpb.IOSPlatformID || x.Platform > constantpb.AdminPlatformID {
return errs.ErrArgs.WrapMsg("platform is invalid")
}
if x.Email == "" {
diff --git a/tools/check-component/main.go b/tools/check-component/main.go
index 131da4c9b..cc3937baa 100644
--- a/tools/check-component/main.go
+++ b/tools/check-component/main.go
@@ -18,10 +18,13 @@ import (
"context"
"flag"
"fmt"
+ "path/filepath"
+ "time"
+
"github.com/openimsdk/chat/pkg/common/cmd"
"github.com/openimsdk/chat/pkg/common/config"
"github.com/openimsdk/chat/pkg/common/imapi"
- "github.com/openimsdk/protocol/constant"
+ constantpb "github.com/openimsdk/protocol/constant"
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/redisutil"
"github.com/openimsdk/tools/discovery/etcd"
@@ -29,8 +32,6 @@ import (
"github.com/openimsdk/tools/mcontext"
"github.com/openimsdk/tools/system/program"
"github.com/openimsdk/tools/utils/idutil"
- "path/filepath"
- "time"
)
const maxRetry = 180
@@ -56,8 +57,8 @@ func CheckRedis(ctx context.Context, config *config.Redis) error {
}
func CheckOpenIM(ctx context.Context, apiURL, secret, adminUserID string) error {
- api2 := imapi.New(apiURL, secret, adminUserID)
- _, err := api2.UserToken(mcontext.SetOperationID(ctx, "CheckOpenIM"+idutil.OperationIDGenerator()), adminUserID, constant.AdminPlatformID)
+ imAPI := imapi.New(apiURL, secret, adminUserID)
+ _, err := imAPI.UserToken(mcontext.SetOperationID(ctx, "CheckOpenIM"+idutil.OperationIDGenerator()), adminUserID, constantpb.AdminPlatformID)
return err
}
From f4f28c40baf48b6053835c5ce16f3dcb3499c43d Mon Sep 17 00:00:00 2001
From: Monet Lee
Date: Thu, 13 Jun 2024 09:53:22 +0800
Subject: [PATCH 20/26] feat: invaildate the token when change password (#552)
* feat: invaildate the token when change password
* fix: replace CN comments.
* remove unnecessary comments.
* fix: define corrected code.
* fix: fix uncorrect args.
---
go.mod | 2 +-
go.sum | 2 +
internal/api/chat/chat.go | 23 +-
internal/rpc/admin/token.go | 37 +-
internal/rpc/chat/password.go | 4 +
pkg/common/db/cache/token.go | 7 +
pkg/common/db/database/admin.go | 5 +
pkg/common/mctx/get.go | 2 -
pkg/eerrs/predefine.go | 2 +
pkg/protocol/admin/admin.pb.go | 1305 +++++++++++++++++--------------
pkg/protocol/admin/admin.proto | 288 ++++---
pkg/rpclient/chat/admin.go | 6 +
pkg/rpclient/chat/chat.go | 1 +
13 files changed, 948 insertions(+), 736 deletions(-)
diff --git a/go.mod b/go.mod
index 53142888e..89b791bd6 100644
--- a/go.mod
+++ b/go.mod
@@ -27,7 +27,7 @@ require (
github.com/mitchellh/mapstructure v1.5.0
github.com/openimsdk/gomake v0.0.9
github.com/openimsdk/protocol v0.0.63
- github.com/openimsdk/tools v0.0.49-alpha.18
+ github.com/openimsdk/tools v0.0.49-alpha.24
github.com/redis/go-redis/v9 v9.5.1
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
diff --git a/go.sum b/go.sum
index 97b72ffb3..e312afb05 100644
--- a/go.sum
+++ b/go.sum
@@ -191,6 +191,8 @@ github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
github.com/openimsdk/tools v0.0.49-alpha.18 h1:ARQeCiRmExvtB6XYItegThuV63JGOTxddwhSLHYXd78=
github.com/openimsdk/tools v0.0.49-alpha.18/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM=
+github.com/openimsdk/tools v0.0.49-alpha.24 h1:lJsqnjTPujnr91LRQ6QmcTliMIa4fMOBSTri6rFz2ek=
+github.com/openimsdk/tools v0.0.49-alpha.24/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pion/datachannel v1.5.5 h1:10ef4kwdjije+M9d7Xm9im2Y3O6A6ccQb0zcqZcJew8=
diff --git a/internal/api/chat/chat.go b/internal/api/chat/chat.go
index 47d1dcb42..c8a8c99a7 100644
--- a/internal/api/chat/chat.go
+++ b/internal/api/chat/chat.go
@@ -164,7 +164,28 @@ func (o *Api) ResetPassword(c *gin.Context) {
}
func (o *Api) ChangePassword(c *gin.Context) {
- a2r.Call(chatpb.ChatClient.ChangePassword, o.chatClient, c)
+ req, err := a2r.ParseRequest[chatpb.ChangePasswordReq](c)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+ resp, err := o.chatClient.ChangePassword(c, req)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+
+ imToken, err := o.imApiCaller.ImAdminTokenWithDefaultAdmin(c)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+ err = o.imApiCaller.ForceOffLine(mctx.WithApiToken(c, imToken), req.UserID)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+ apiresp.GinSuccess(c, resp)
}
// ################## USER ##################
diff --git a/internal/rpc/admin/token.go b/internal/rpc/admin/token.go
index 41240738f..a98511d74 100644
--- a/internal/rpc/admin/token.go
+++ b/internal/rpc/admin/token.go
@@ -17,10 +17,13 @@ package admin
import (
"context"
- "github.com/openimsdk/chat/pkg/protocol/admin"
+ "github.com/openimsdk/chat/pkg/eerrs"
+ adminpb "github.com/openimsdk/chat/pkg/protocol/admin"
+ "github.com/openimsdk/tools/log"
+ "github.com/redis/go-redis/v9"
)
-func (o *adminServer) CreateToken(ctx context.Context, req *admin.CreateTokenReq) (*admin.CreateTokenResp, error) {
+func (o *adminServer) CreateToken(ctx context.Context, req *adminpb.CreateTokenReq) (*adminpb.CreateTokenResp, error) {
token, err := o.Token.CreateToken(req.UserID, req.UserType)
if err != nil {
return nil, err
@@ -29,26 +32,46 @@ func (o *adminServer) CreateToken(ctx context.Context, req *admin.CreateTokenReq
if err != nil {
return nil, err
}
- return &admin.CreateTokenResp{
+ return &adminpb.CreateTokenResp{
Token: token,
}, nil
}
-func (o *adminServer) ParseToken(ctx context.Context, req *admin.ParseTokenReq) (*admin.ParseTokenResp, error) {
+func (o *adminServer) ParseToken(ctx context.Context, req *adminpb.ParseTokenReq) (*adminpb.ParseTokenResp, error) {
userID, userType, err := o.Token.GetToken(req.Token)
if err != nil {
return nil, err
}
- return &admin.ParseTokenResp{
+ m, err := o.Database.GetTokens(ctx, userID)
+ if err != nil && err != redis.Nil {
+ return nil, err
+ }
+ if len(m) == 0 {
+ return nil, eerrs.ErrTokenNotExist.Wrap()
+ }
+ if _, ok := m[req.Token]; !ok {
+ return nil, eerrs.ErrTokenNotExist.Wrap()
+ }
+
+ return &adminpb.ParseTokenResp{
UserID: userID,
UserType: userType,
}, nil
}
-func (o *adminServer) GetUserToken(ctx context.Context, req *admin.GetUserTokenReq) (*admin.GetUserTokenResp, error) {
+func (o *adminServer) GetUserToken(ctx context.Context, req *adminpb.GetUserTokenReq) (*adminpb.GetUserTokenResp, error) {
tokensMap, err := o.Database.GetTokens(ctx, req.UserID)
if err != nil {
return nil, err
}
- return &admin.GetUserTokenResp{TokensMap: tokensMap}, nil
+ return &adminpb.GetUserTokenResp{TokensMap: tokensMap}, nil
+}
+
+func (o *adminServer) InvalidateToken(ctx context.Context, req *adminpb.InvalidateTokenReq) (*adminpb.InvalidateTokenResp, error) {
+ err := o.Database.DeleteToken(ctx, req.UserID)
+ if err != nil && err != redis.Nil {
+ return nil, err
+ }
+ log.ZDebug(ctx, "delete token from redis", "userID", req.UserID)
+ return &adminpb.InvalidateTokenResp{}, nil
}
diff --git a/internal/rpc/chat/password.go b/internal/rpc/chat/password.go
index c1d141a76..6235a2df7 100644
--- a/internal/rpc/chat/password.go
+++ b/internal/rpc/chat/password.go
@@ -99,5 +99,9 @@ func (o *chatSvr) ChangePassword(ctx context.Context, req *chat.ChangePasswordRe
return nil, err
}
}
+ if err := o.Admin.InvalidateToken(ctx, req.UserID); err != nil {
+ return nil, err
+ }
+
return &chat.ChangePasswordResp{}, nil
}
diff --git a/pkg/common/db/cache/token.go b/pkg/common/db/cache/token.go
index a8c09b45e..9da188a7e 100644
--- a/pkg/common/db/cache/token.go
+++ b/pkg/common/db/cache/token.go
@@ -16,6 +16,7 @@ package cache
import (
"context"
+
"github.com/openimsdk/tools/utils/stringutil"
"github.com/openimsdk/tools/errs"
@@ -29,6 +30,7 @@ const (
type TokenInterface interface {
AddTokenFlag(ctx context.Context, userID string, token string, flag int) error
GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error)
+ DeleteTokenByUid(ctx context.Context, userID string) error
}
type TokenCacheRedis struct {
@@ -56,3 +58,8 @@ func (t *TokenCacheRedis) GetTokensWithoutError(ctx context.Context, userID stri
}
return mm, nil
}
+
+func (t *TokenCacheRedis) DeleteTokenByUid(ctx context.Context, userID string) error {
+ key := chatToken + userID
+ return errs.Wrap(t.rdb.Del(ctx, key).Err())
+}
diff --git a/pkg/common/db/database/admin.go b/pkg/common/db/database/admin.go
index 7920555e0..2b867f5f9 100644
--- a/pkg/common/db/database/admin.go
+++ b/pkg/common/db/database/admin.go
@@ -76,6 +76,7 @@ type AdminDatabaseInterface interface {
GetLimitUserLoginIP(ctx context.Context, userID string, ip string) (*admindb.LimitUserLoginIP, error)
CacheToken(ctx context.Context, userID string, token string) error
GetTokens(ctx context.Context, userID string) (map[string]int32, error)
+ DeleteToken(ctx context.Context, userID string) error
}
func NewAdminDatabase(cli *mongoutil.Client, rdb redis.UniversalClient) (AdminDatabaseInterface, error) {
@@ -331,3 +332,7 @@ func (o *AdminDatabase) CacheToken(ctx context.Context, userID string, token str
func (o *AdminDatabase) GetTokens(ctx context.Context, userID string) (map[string]int32, error) {
return o.cache.GetTokensWithoutError(ctx, userID)
}
+
+func (o *AdminDatabase) DeleteToken(ctx context.Context, userID string) error {
+ return o.cache.DeleteTokenByUid(ctx, userID)
+}
diff --git a/pkg/common/mctx/get.go b/pkg/common/mctx/get.go
index 4f878e281..ace583bb8 100644
--- a/pkg/common/mctx/get.go
+++ b/pkg/common/mctx/get.go
@@ -17,8 +17,6 @@ package mctx
import (
"context"
"strconv"
-
-
"github.com/openimsdk/tools/utils/datautil"
constantpb "github.com/openimsdk/protocol/constant"
diff --git a/pkg/eerrs/predefine.go b/pkg/eerrs/predefine.go
index 6546d53ab..2297a663e 100644
--- a/pkg/eerrs/predefine.go
+++ b/pkg/eerrs/predefine.go
@@ -31,4 +31,6 @@ var (
ErrForbidden = errs.NewCodeError(20012, "Forbidden")
ErrRefuseFriend = errs.NewCodeError(20013, "RefuseFriend")
ErrEmailAlreadyRegister = errs.NewCodeError(20014, "EmailAlreadyRegister")
+
+ ErrTokenNotExist = errs.NewCodeError(20101, "ErrTokenNotExist")
)
diff --git a/pkg/protocol/admin/admin.pb.go b/pkg/protocol/admin/admin.pb.go
index 30df0d2f6..9b8161e14 100644
--- a/pkg/protocol/admin/admin.pb.go
+++ b/pkg/protocol/admin/admin.pb.go
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
-// protoc v5.26.0
+// protoc v5.27.1
// source: admin/admin.proto
package admin
@@ -3288,7 +3288,7 @@ func (*DelIPForbiddenResp) Descriptor() ([]byte, []int) {
return file_admin_admin_proto_rawDescGZIP(), []int{62}
}
-// ################### user limit ###################
+// ################### User Limit ###################
type CheckRegisterForbiddenReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3467,7 +3467,7 @@ func (*CheckLoginForbiddenResp) Descriptor() ([]byte, []int) {
return file_admin_admin_proto_rawDescGZIP(), []int{66}
}
-// ################### logout ###################
+// ################### login out ###################
type CancellationUserReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -3561,7 +3561,7 @@ func (*CancellationUserResp) Descriptor() ([]byte, []int) {
return file_admin_admin_proto_rawDescGZIP(), []int{68}
}
-
+// ################### Block User, Unblock User ###################
type BlockUserReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -4147,8 +4147,8 @@ type CreateTokenReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
- UserType int32 `protobuf:"varint,3,opt,name=userType,proto3" json:"userType"`
+ UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
+ UserType int32 `protobuf:"varint,32,opt,name=userType,proto3" json:"userType"`
}
func (x *CreateTokenReq) Reset() {
@@ -4202,7 +4202,7 @@ type CreateTokenResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
}
func (x *CreateTokenResp) Reset() {
@@ -4249,7 +4249,7 @@ type ParseTokenReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
}
func (x *ParseTokenReq) Reset() {
@@ -4296,9 +4296,9 @@ type ParseTokenResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
- UserType int32 `protobuf:"varint,3,opt,name=userType,proto3" json:"userType"`
- ExpireTimeSeconds int64 `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
+ UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
+ UserType int32 `protobuf:"varint,2,opt,name=userType,proto3" json:"userType"`
+ ExpireTimeSeconds int64 `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
}
func (x *ParseTokenResp) Reset() {
@@ -4354,6 +4354,91 @@ func (x *ParseTokenResp) GetExpireTimeSeconds() int64 {
return 0
}
+type InvalidateTokenReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
+}
+
+func (x *InvalidateTokenReq) Reset() {
+ *x = InvalidateTokenReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_admin_admin_proto_msgTypes[83]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InvalidateTokenReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvalidateTokenReq) ProtoMessage() {}
+
+func (x *InvalidateTokenReq) ProtoReflect() protoreflect.Message {
+ mi := &file_admin_admin_proto_msgTypes[83]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InvalidateTokenReq.ProtoReflect.Descriptor instead.
+func (*InvalidateTokenReq) Descriptor() ([]byte, []int) {
+ return file_admin_admin_proto_rawDescGZIP(), []int{83}
+}
+
+func (x *InvalidateTokenReq) GetUserID() string {
+ if x != nil {
+ return x.UserID
+ }
+ return ""
+}
+
+type InvalidateTokenResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *InvalidateTokenResp) Reset() {
+ *x = InvalidateTokenResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_admin_admin_proto_msgTypes[84]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InvalidateTokenResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvalidateTokenResp) ProtoMessage() {}
+
+func (x *InvalidateTokenResp) ProtoReflect() protoreflect.Message {
+ mi := &file_admin_admin_proto_msgTypes[84]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use InvalidateTokenResp.ProtoReflect.Descriptor instead.
+func (*InvalidateTokenResp) Descriptor() ([]byte, []int) {
+ return file_admin_admin_proto_rawDescGZIP(), []int{84}
+}
+
type AddAppletReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -4375,7 +4460,7 @@ type AddAppletReq struct {
func (x *AddAppletReq) Reset() {
*x = AddAppletReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[83]
+ mi := &file_admin_admin_proto_msgTypes[85]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4388,7 +4473,7 @@ func (x *AddAppletReq) String() string {
func (*AddAppletReq) ProtoMessage() {}
func (x *AddAppletReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[83]
+ mi := &file_admin_admin_proto_msgTypes[85]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4401,7 +4486,7 @@ func (x *AddAppletReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddAppletReq.ProtoReflect.Descriptor instead.
func (*AddAppletReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{83}
+ return file_admin_admin_proto_rawDescGZIP(), []int{85}
}
func (x *AddAppletReq) GetId() string {
@@ -4490,7 +4575,7 @@ type AddAppletResp struct {
func (x *AddAppletResp) Reset() {
*x = AddAppletResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[84]
+ mi := &file_admin_admin_proto_msgTypes[86]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4503,7 +4588,7 @@ func (x *AddAppletResp) String() string {
func (*AddAppletResp) ProtoMessage() {}
func (x *AddAppletResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[84]
+ mi := &file_admin_admin_proto_msgTypes[86]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4516,7 +4601,7 @@ func (x *AddAppletResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use AddAppletResp.ProtoReflect.Descriptor instead.
func (*AddAppletResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{84}
+ return file_admin_admin_proto_rawDescGZIP(), []int{86}
}
type DelAppletReq struct {
@@ -4530,7 +4615,7 @@ type DelAppletReq struct {
func (x *DelAppletReq) Reset() {
*x = DelAppletReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[85]
+ mi := &file_admin_admin_proto_msgTypes[87]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4543,7 +4628,7 @@ func (x *DelAppletReq) String() string {
func (*DelAppletReq) ProtoMessage() {}
func (x *DelAppletReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[85]
+ mi := &file_admin_admin_proto_msgTypes[87]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4556,7 +4641,7 @@ func (x *DelAppletReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelAppletReq.ProtoReflect.Descriptor instead.
func (*DelAppletReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{85}
+ return file_admin_admin_proto_rawDescGZIP(), []int{87}
}
func (x *DelAppletReq) GetAppletIds() []string {
@@ -4575,7 +4660,7 @@ type DelAppletResp struct {
func (x *DelAppletResp) Reset() {
*x = DelAppletResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[86]
+ mi := &file_admin_admin_proto_msgTypes[88]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4588,7 +4673,7 @@ func (x *DelAppletResp) String() string {
func (*DelAppletResp) ProtoMessage() {}
func (x *DelAppletResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[86]
+ mi := &file_admin_admin_proto_msgTypes[88]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4601,7 +4686,7 @@ func (x *DelAppletResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelAppletResp.ProtoReflect.Descriptor instead.
func (*DelAppletResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{86}
+ return file_admin_admin_proto_rawDescGZIP(), []int{88}
}
type UpdateAppletReq struct {
@@ -4625,7 +4710,7 @@ type UpdateAppletReq struct {
func (x *UpdateAppletReq) Reset() {
*x = UpdateAppletReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[87]
+ mi := &file_admin_admin_proto_msgTypes[89]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4638,7 +4723,7 @@ func (x *UpdateAppletReq) String() string {
func (*UpdateAppletReq) ProtoMessage() {}
func (x *UpdateAppletReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[87]
+ mi := &file_admin_admin_proto_msgTypes[89]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4651,7 +4736,7 @@ func (x *UpdateAppletReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateAppletReq.ProtoReflect.Descriptor instead.
func (*UpdateAppletReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{87}
+ return file_admin_admin_proto_rawDescGZIP(), []int{89}
}
func (x *UpdateAppletReq) GetId() string {
@@ -4740,7 +4825,7 @@ type UpdateAppletResp struct {
func (x *UpdateAppletResp) Reset() {
*x = UpdateAppletResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[88]
+ mi := &file_admin_admin_proto_msgTypes[90]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4753,7 +4838,7 @@ func (x *UpdateAppletResp) String() string {
func (*UpdateAppletResp) ProtoMessage() {}
func (x *UpdateAppletResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[88]
+ mi := &file_admin_admin_proto_msgTypes[90]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4766,7 +4851,7 @@ func (x *UpdateAppletResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateAppletResp.ProtoReflect.Descriptor instead.
func (*UpdateAppletResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{88}
+ return file_admin_admin_proto_rawDescGZIP(), []int{90}
}
type FindAppletReq struct {
@@ -4778,7 +4863,7 @@ type FindAppletReq struct {
func (x *FindAppletReq) Reset() {
*x = FindAppletReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[89]
+ mi := &file_admin_admin_proto_msgTypes[91]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4791,7 +4876,7 @@ func (x *FindAppletReq) String() string {
func (*FindAppletReq) ProtoMessage() {}
func (x *FindAppletReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[89]
+ mi := &file_admin_admin_proto_msgTypes[91]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4804,7 +4889,7 @@ func (x *FindAppletReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindAppletReq.ProtoReflect.Descriptor instead.
func (*FindAppletReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{89}
+ return file_admin_admin_proto_rawDescGZIP(), []int{91}
}
type FindAppletResp struct {
@@ -4818,7 +4903,7 @@ type FindAppletResp struct {
func (x *FindAppletResp) Reset() {
*x = FindAppletResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[90]
+ mi := &file_admin_admin_proto_msgTypes[92]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4831,7 +4916,7 @@ func (x *FindAppletResp) String() string {
func (*FindAppletResp) ProtoMessage() {}
func (x *FindAppletResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[90]
+ mi := &file_admin_admin_proto_msgTypes[92]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4844,7 +4929,7 @@ func (x *FindAppletResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use FindAppletResp.ProtoReflect.Descriptor instead.
func (*FindAppletResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{90}
+ return file_admin_admin_proto_rawDescGZIP(), []int{92}
}
func (x *FindAppletResp) GetApplets() []*common.AppletInfo {
@@ -4866,7 +4951,7 @@ type SearchAppletReq struct {
func (x *SearchAppletReq) Reset() {
*x = SearchAppletReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[91]
+ mi := &file_admin_admin_proto_msgTypes[93]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4879,7 +4964,7 @@ func (x *SearchAppletReq) String() string {
func (*SearchAppletReq) ProtoMessage() {}
func (x *SearchAppletReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[91]
+ mi := &file_admin_admin_proto_msgTypes[93]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4892,7 +4977,7 @@ func (x *SearchAppletReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchAppletReq.ProtoReflect.Descriptor instead.
func (*SearchAppletReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{91}
+ return file_admin_admin_proto_rawDescGZIP(), []int{93}
}
func (x *SearchAppletReq) GetKeyword() string {
@@ -4921,7 +5006,7 @@ type SearchAppletResp struct {
func (x *SearchAppletResp) Reset() {
*x = SearchAppletResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[92]
+ mi := &file_admin_admin_proto_msgTypes[94]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4934,7 +5019,7 @@ func (x *SearchAppletResp) String() string {
func (*SearchAppletResp) ProtoMessage() {}
func (x *SearchAppletResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[92]
+ mi := &file_admin_admin_proto_msgTypes[94]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4947,7 +5032,7 @@ func (x *SearchAppletResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use SearchAppletResp.ProtoReflect.Descriptor instead.
func (*SearchAppletResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{92}
+ return file_admin_admin_proto_rawDescGZIP(), []int{94}
}
func (x *SearchAppletResp) GetTotal() uint32 {
@@ -4975,7 +5060,7 @@ type SetClientConfigReq struct {
func (x *SetClientConfigReq) Reset() {
*x = SetClientConfigReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[93]
+ mi := &file_admin_admin_proto_msgTypes[95]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4988,7 +5073,7 @@ func (x *SetClientConfigReq) String() string {
func (*SetClientConfigReq) ProtoMessage() {}
func (x *SetClientConfigReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[93]
+ mi := &file_admin_admin_proto_msgTypes[95]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5001,7 +5086,7 @@ func (x *SetClientConfigReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetClientConfigReq.ProtoReflect.Descriptor instead.
func (*SetClientConfigReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{93}
+ return file_admin_admin_proto_rawDescGZIP(), []int{95}
}
func (x *SetClientConfigReq) GetConfig() map[string]string {
@@ -5020,7 +5105,7 @@ type SetClientConfigResp struct {
func (x *SetClientConfigResp) Reset() {
*x = SetClientConfigResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[94]
+ mi := &file_admin_admin_proto_msgTypes[96]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5033,7 +5118,7 @@ func (x *SetClientConfigResp) String() string {
func (*SetClientConfigResp) ProtoMessage() {}
func (x *SetClientConfigResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[94]
+ mi := &file_admin_admin_proto_msgTypes[96]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5046,7 +5131,7 @@ func (x *SetClientConfigResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use SetClientConfigResp.ProtoReflect.Descriptor instead.
func (*SetClientConfigResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{94}
+ return file_admin_admin_proto_rawDescGZIP(), []int{96}
}
type DelClientConfigReq struct {
@@ -5060,7 +5145,7 @@ type DelClientConfigReq struct {
func (x *DelClientConfigReq) Reset() {
*x = DelClientConfigReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[95]
+ mi := &file_admin_admin_proto_msgTypes[97]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5073,7 +5158,7 @@ func (x *DelClientConfigReq) String() string {
func (*DelClientConfigReq) ProtoMessage() {}
func (x *DelClientConfigReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[95]
+ mi := &file_admin_admin_proto_msgTypes[97]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5086,7 +5171,7 @@ func (x *DelClientConfigReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelClientConfigReq.ProtoReflect.Descriptor instead.
func (*DelClientConfigReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{95}
+ return file_admin_admin_proto_rawDescGZIP(), []int{97}
}
func (x *DelClientConfigReq) GetKeys() []string {
@@ -5105,7 +5190,7 @@ type DelClientConfigResp struct {
func (x *DelClientConfigResp) Reset() {
*x = DelClientConfigResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[96]
+ mi := &file_admin_admin_proto_msgTypes[98]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5118,7 +5203,7 @@ func (x *DelClientConfigResp) String() string {
func (*DelClientConfigResp) ProtoMessage() {}
func (x *DelClientConfigResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[96]
+ mi := &file_admin_admin_proto_msgTypes[98]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5131,7 +5216,7 @@ func (x *DelClientConfigResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use DelClientConfigResp.ProtoReflect.Descriptor instead.
func (*DelClientConfigResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{96}
+ return file_admin_admin_proto_rawDescGZIP(), []int{98}
}
type GetClientConfigReq struct {
@@ -5143,7 +5228,7 @@ type GetClientConfigReq struct {
func (x *GetClientConfigReq) Reset() {
*x = GetClientConfigReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[97]
+ mi := &file_admin_admin_proto_msgTypes[99]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5156,7 +5241,7 @@ func (x *GetClientConfigReq) String() string {
func (*GetClientConfigReq) ProtoMessage() {}
func (x *GetClientConfigReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[97]
+ mi := &file_admin_admin_proto_msgTypes[99]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5169,7 +5254,7 @@ func (x *GetClientConfigReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetClientConfigReq.ProtoReflect.Descriptor instead.
func (*GetClientConfigReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{97}
+ return file_admin_admin_proto_rawDescGZIP(), []int{99}
}
type GetClientConfigResp struct {
@@ -5183,7 +5268,7 @@ type GetClientConfigResp struct {
func (x *GetClientConfigResp) Reset() {
*x = GetClientConfigResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[98]
+ mi := &file_admin_admin_proto_msgTypes[100]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5196,7 +5281,7 @@ func (x *GetClientConfigResp) String() string {
func (*GetClientConfigResp) ProtoMessage() {}
func (x *GetClientConfigResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[98]
+ mi := &file_admin_admin_proto_msgTypes[100]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5209,7 +5294,7 @@ func (x *GetClientConfigResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetClientConfigResp.ProtoReflect.Descriptor instead.
func (*GetClientConfigResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{98}
+ return file_admin_admin_proto_rawDescGZIP(), []int{100}
}
func (x *GetClientConfigResp) GetConfig() map[string]string {
@@ -5230,7 +5315,7 @@ type GetUserTokenReq struct {
func (x *GetUserTokenReq) Reset() {
*x = GetUserTokenReq{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[99]
+ mi := &file_admin_admin_proto_msgTypes[101]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5243,7 +5328,7 @@ func (x *GetUserTokenReq) String() string {
func (*GetUserTokenReq) ProtoMessage() {}
func (x *GetUserTokenReq) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[99]
+ mi := &file_admin_admin_proto_msgTypes[101]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5256,7 +5341,7 @@ func (x *GetUserTokenReq) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUserTokenReq.ProtoReflect.Descriptor instead.
func (*GetUserTokenReq) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{99}
+ return file_admin_admin_proto_rawDescGZIP(), []int{101}
}
func (x *GetUserTokenReq) GetUserID() string {
@@ -5277,7 +5362,7 @@ type GetUserTokenResp struct {
func (x *GetUserTokenResp) Reset() {
*x = GetUserTokenResp{}
if protoimpl.UnsafeEnabled {
- mi := &file_admin_admin_proto_msgTypes[100]
+ mi := &file_admin_admin_proto_msgTypes[102]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -5290,7 +5375,7 @@ func (x *GetUserTokenResp) String() string {
func (*GetUserTokenResp) ProtoMessage() {}
func (x *GetUserTokenResp) ProtoReflect() protoreflect.Message {
- mi := &file_admin_admin_proto_msgTypes[100]
+ mi := &file_admin_admin_proto_msgTypes[102]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -5303,7 +5388,7 @@ func (x *GetUserTokenResp) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUserTokenResp.ProtoReflect.Descriptor instead.
func (*GetUserTokenResp) Descriptor() ([]byte, []int) {
- return file_admin_admin_proto_rawDescGZIP(), []int{100}
+ return file_admin_admin_proto_rawDescGZIP(), []int{102}
}
func (x *GetUserTokenResp) GetTokensMap() map[string]int32 {
@@ -5318,10 +5403,10 @@ var File_admin_admin_proto protoreflect.FileDescriptor
var file_admin_admin_proto_rawDesc = []byte{
0x0a, 0x11, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x1a, 0x1b, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x2f, 0x77, 0x72,
- 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11,
- 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x6e, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64,
+ 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x77, 0x72, 0x61, 0x70, 0x70,
+ 0x65, 0x72, 0x73, 0x70, 0x62, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08,
@@ -5705,395 +5790,405 @@ var file_admin_admin_proto_rawDesc = []byte{
0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63,
0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x22, 0x44, 0x0a,
0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12,
- 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
- 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
+ 0x79, 0x70, 0x65, 0x18, 0x20, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,
0x79, 0x70, 0x65, 0x22, 0x27, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x25, 0x0a, 0x0d,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x25, 0x0a, 0x0d,
0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a,
- 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
+ 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
0x6b, 0x65, 0x6e, 0x22, 0x72, 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18,
- 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a,
- 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a,
+ 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x78, 0x70,
- 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04,
+ 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65,
- 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x82, 0x02, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x41,
- 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
- 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70,
- 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69,
- 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x18,
- 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f,
- 0x72, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f,
- 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a,
- 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03,
- 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x0f, 0x0a, 0x0d,
- 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2c, 0x0a,
- 0x0c, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
- 0x09, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
- 0x52, 0x09, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x64, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x44,
- 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0xaf, 0x04, 0x0a,
- 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71,
- 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
- 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
- 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x12, 0x30, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
- 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x2e, 0x0a, 0x03, 0x6d, 0x64, 0x35, 0x18,
- 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12, 0x2f, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65,
- 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61,
- 0x6c, 0x75, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x76, 0x65, 0x72,
- 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
- 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20,
+ 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x2c, 0x0a, 0x12, 0x49, 0x6e, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
+ 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+ 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x82, 0x02, 0x0a,
+ 0x0c, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a,
+ 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75,
+ 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x10, 0x0a,
+ 0x03, 0x6d, 0x64, 0x35, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12,
+ 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73,
+ 0x69, 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
+ 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
+ 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
+ 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65,
+ 0x73, 0x70, 0x22, 0x2c, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52,
+ 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x64, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x64, 0x73,
+ 0x22, 0x0f, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73,
+ 0x70, 0x22, 0xaf, 0x04, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c,
+ 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
- 0x65, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x73,
- 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49,
- 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
- 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18,
- 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c,
- 0x75, 0x65, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x12,
- 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65,
- 0x73, 0x70, 0x22, 0x0f, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74,
- 0x52, 0x65, 0x71, 0x22, 0x4a, 0x0a, 0x0e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65,
- 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x73,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x63, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c,
- 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x22,
- 0x6c, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52,
- 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3f, 0x0a, 0x0a,
- 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
- 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x62, 0x0a,
- 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
- 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x65,
- 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x41, 0x70,
- 0x70, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74,
- 0x73, 0x22, 0x95, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
- 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x12, 0x44, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e,
- 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39,
- 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
- 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
- 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
- 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x15, 0x0a, 0x13, 0x53, 0x65, 0x74,
- 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
- 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
- 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65,
- 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
- 0x70, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f,
- 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x22, 0x97, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43,
- 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x2d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47,
- 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
- 0x73, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06,
- 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x44, 0x12, 0x30, 0x0a, 0x04, 0x69,
+ 0x63, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x2e, 0x0a,
+ 0x03, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x2e, 0x0a,
+ 0x03, 0x6d, 0x64, 0x35, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6d, 0x64, 0x35, 0x12, 0x2f, 0x0a,
+ 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e,
+ 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x36,
+ 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69,
+ 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33,
+ 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79,
+ 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74,
+ 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x6d, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70,
+ 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x0f, 0x0a, 0x0d, 0x46, 0x69, 0x6e, 0x64, 0x41,
+ 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x22, 0x4a, 0x0a, 0x0e, 0x46, 0x69, 0x6e, 0x64,
+ 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x61, 0x70,
+ 0x70, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x61, 0x70, 0x70,
+ 0x6c, 0x65, 0x74, 0x73, 0x22, 0x6c, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70,
+ 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f,
+ 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72,
+ 0x64, 0x12, 0x3f, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x73,
+ 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69,
+ 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x22, 0x62, 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c,
+ 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x07,
+ 0x61, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x61,
+ 0x70, 0x70, 0x6c, 0x65, 0x74, 0x73, 0x22, 0x95, 0x01, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x43, 0x6c,
+ 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x12, 0x44, 0x0a,
+ 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74,
+ 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x2e,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x15,
+ 0x0a, 0x13, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6b,
+ 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22,
+ 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x14, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x22, 0x97, 0x01, 0x0a,
+ 0x13, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x39, 0x0a, 0x0b, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
+ 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65,
+ 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+ 0x44, 0x22, 0x9d, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
+ 0x4d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
+ 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
+ 0x4d, 0x61, 0x70, 0x1a, 0x3c, 0x0a, 0x0e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4d, 0x61, 0x70,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
- 0x01, 0x22, 0x29, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65,
- 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x9d, 0x01, 0x0a,
- 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x4b, 0x0a, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4d, 0x61, 0x70, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
- 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
- 0x52, 0x65, 0x73, 0x70, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e,
- 0x74, 0x72, 0x79, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4d, 0x61, 0x70, 0x1a, 0x3c,
- 0x0a, 0x0e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
- 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
- 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xe6, 0x1f, 0x0a,
- 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
- 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c,
- 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x53, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
- 0x72, 0x64, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
- 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
- 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x55,
- 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a,
- 0x0c, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74,
- 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41,
- 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f,
- 0x41, 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12,
- 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41,
- 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
- 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
- 0x2e, 0x41, 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64,
- 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67,
- 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65,
- 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
- 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73,
- 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x41,
- 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x41, 0x64,
- 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c,
- 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x64, 0x6d, 0x69,
- 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x6f, 0x70,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+ 0x01, 0x32, 0xbe, 0x20, 0x0a, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x4c,
+ 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x69,
+ 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50,
+ 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73,
+ 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61,
+ 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x41, 0x64,
+ 0x6d, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x6d,
+ 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a,
+ 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41,
+ 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
+ 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
+ 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x47, 0x65, 0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73,
+ 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f,
+ 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63,
+ 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x43, 0x68, 0x61,
+ 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
+ 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77,
+ 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x6d, 0x69,
+ 0x6e, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a,
+ 0x0f, 0x44, 0x65, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x44, 0x65, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52,
+ 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41,
+ 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x6f, 0x70,
0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
- 0x68, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x59, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46,
+ 0x68, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
+ 0x1a, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64,
+ 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73,
+ 0x70, 0x12, 0x59, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
- 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75,
- 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x10,
- 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
- 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
- 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64,
- 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69,
- 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x46, 0x69, 0x6e, 0x64, 0x44,
- 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64,
- 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71,
- 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11,
0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e,
- 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44,
- 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x24, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72,
- 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52,
- 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46,
- 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x41, 0x64, 0x64,
- 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x44,
- 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x21,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64,
- 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47,
- 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
- 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72,
- 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
- 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x10, 0x46, 0x69, 0x6e,
- 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x21, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e,
- 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71,
- 0x1a, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
- 0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65,
- 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
- 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a,
- 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53,
+ 0x64, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65,
+ 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
+ 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x53, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e,
+ 0x64, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72,
+ 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56,
+ 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f,
+ 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x44, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59,
+ 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f,
+ 0x75, 0x70, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f,
+ 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
+ 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x65, 0x61,
+ 0x72, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12,
+ 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53,
0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x47, 0x72, 0x6f, 0x75,
- 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x76, 0x69,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x76,
- 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64,
- 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x49,
- 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x5f, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x6f,
+ 0x70, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c,
+ 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x41, 0x64,
+ 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12,
+ 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41,
+ 0x64, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65,
+ 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x49,
+ 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x6e,
+ 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65,
+ 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x47, 0x65, 0x6e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
+ 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x6e,
+ 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x2e, 0x6f,
0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64,
0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x49, 0x6e,
- 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x5c, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
- 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
- 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x69,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65,
- 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x76, 0x69,
- 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e,
+ 0x71, 0x1a, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x49, 0x6e,
+ 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x49,
+ 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71,
+ 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x55, 0x73, 0x65, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x49, 0x6e, 0x76, 0x69,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x49, 0x6e, 0x76,
+ 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65,
+ 0x6c, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x76,
+ 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x25, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
+ 0x68, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52,
+ 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x16, 0x53, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c,
+ 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50,
+ 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61,
- 0x72, 0x63, 0x68, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64,
- 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x16, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55,
- 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
- 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53,
- 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74,
- 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73,
- 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c,
- 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
- 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a,
- 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41,
- 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67,
- 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65,
- 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x24, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c,
- 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
- 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69,
- 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x53, 0x65,
- 0x61, 0x72, 0x63, 0x68, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12,
- 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53,
- 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e,
- 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69,
- 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x49,
- 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x50, 0x46,
- 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x49, 0x50,
+ 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f,
+ 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x55, 0x73,
+ 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x24,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64,
+ 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69,
+ 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d,
+ 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x44,
+ 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67,
+ 0x69, 0x6e, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74,
+ 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49,
+ 0x50, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
+ 0x5c, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69,
+ 0x64, 0x64, 0x65, 0x6e, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62,
+ 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x49, 0x50,
0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x53, 0x0a,
- 0x0e, 0x44, 0x65, 0x6c, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12,
- 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44,
- 0x65, 0x6c, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71,
+ 0x0e, 0x41, 0x64, 0x64, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12,
+ 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41,
+ 0x64, 0x64, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71,
0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
- 0x44, 0x65, 0x6c, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x59, 0x0a, 0x10, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
- 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a,
- 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55,
- 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0b, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x2e, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
- 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
- 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x56, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
- 0x65, 0x72, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
- 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65,
- 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
- 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55,
- 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11, 0x46, 0x69, 0x6e, 0x64, 0x55,
- 0x73, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64,
- 0x55, 0x73, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
- 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x41, 0x64, 0x64, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65,
+ 0x73, 0x70, 0x12, 0x53, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69,
+ 0x64, 0x64, 0x65, 0x6e, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64,
+ 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x49, 0x50, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64,
+ 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x10, 0x43, 0x61, 0x6e, 0x63, 0x65,
+ 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65,
+ 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x22,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x61,
+ 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+ 0x73, 0x70, 0x12, 0x44, 0x0a, 0x09, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12,
+ 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x42,
+ 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b,
+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0b, 0x55, 0x6e, 0x62, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73,
+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x6e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c,
+ 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x42,
+ 0x6c, 0x6f, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5c, 0x0a, 0x11,
0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e, 0x66,
- 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x16, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
- 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12,
- 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x62,
- 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67,
- 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
- 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
- 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x6f,
- 0x67, 0x69, 0x6e, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a,
- 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43,
- 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64,
- 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
- 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
- 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
- 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
- 0x12, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
- 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72,
- 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, 0x09, 0x41,
- 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65,
- 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
- 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x44, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1a,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65,
- 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70,
- 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70,
- 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c,
- 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70,
- 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
- 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65,
- 0x71, 0x1a, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
- 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x4d, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12,
- 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53,
- 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e,
+ 0x6f, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x6e,
+ 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x42, 0x6c, 0x6f,
+ 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x16, 0x43, 0x68,
+ 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x62, 0x69,
+ 0x64, 0x64, 0x65, 0x6e, 0x12, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
+ 0x72, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64,
+ 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x13, 0x43, 0x68, 0x65, 0x63, 0x6b,
+ 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x24,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68,
+ 0x65, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65,
+ 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x46, 0x6f,
+ 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0b, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
+ 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
+ 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70,
+ 0x12, 0x44, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64,
+ 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x6c,
+ 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70,
+ 0x6c, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a,
+ 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44,
+ 0x65, 0x6c, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0c,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x0a, 0x46,
+ 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70,
+ 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70,
+ 0x70, 0x6c, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74,
+ 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x53,
+ 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20,
0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65,
- 0x61, 0x72, 0x63, 0x68, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56,
- 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
- 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x69,
- 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
- 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65,
- 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c,
- 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56,
- 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
- 0x67, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
- 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
- 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d,
- 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,
- 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
- 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b,
- 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61,
- 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65,
- 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
- 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x68,
- 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f,
- 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
+ 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x53, 0x65, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0c, 0x47,
+ 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73,
+ 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
+ 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0f, 0x49, 0x6e,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x49, 0x6e, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a,
+ 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x49,
+ 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
+ 0x73, 0x70, 0x42, 0x2e, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f,
+ 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -6108,7 +6203,7 @@ func file_admin_admin_proto_rawDescGZIP() []byte {
return file_admin_admin_proto_rawDescData
}
-var file_admin_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 104)
+var file_admin_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 106)
var file_admin_admin_proto_goTypes = []interface{}{
(*LoginReq)(nil), // 0: openim.admin.LoginReq
(*LoginResp)(nil), // 1: openim.admin.LoginResp
@@ -6193,80 +6288,82 @@ var file_admin_admin_proto_goTypes = []interface{}{
(*CreateTokenResp)(nil), // 80: openim.admin.CreateTokenResp
(*ParseTokenReq)(nil), // 81: openim.admin.ParseTokenReq
(*ParseTokenResp)(nil), // 82: openim.admin.ParseTokenResp
- (*AddAppletReq)(nil), // 83: openim.admin.AddAppletReq
- (*AddAppletResp)(nil), // 84: openim.admin.AddAppletResp
- (*DelAppletReq)(nil), // 85: openim.admin.DelAppletReq
- (*DelAppletResp)(nil), // 86: openim.admin.DelAppletResp
- (*UpdateAppletReq)(nil), // 87: openim.admin.UpdateAppletReq
- (*UpdateAppletResp)(nil), // 88: openim.admin.UpdateAppletResp
- (*FindAppletReq)(nil), // 89: openim.admin.FindAppletReq
- (*FindAppletResp)(nil), // 90: openim.admin.FindAppletResp
- (*SearchAppletReq)(nil), // 91: openim.admin.SearchAppletReq
- (*SearchAppletResp)(nil), // 92: openim.admin.SearchAppletResp
- (*SetClientConfigReq)(nil), // 93: openim.admin.SetClientConfigReq
- (*SetClientConfigResp)(nil), // 94: openim.admin.SetClientConfigResp
- (*DelClientConfigReq)(nil), // 95: openim.admin.DelClientConfigReq
- (*DelClientConfigResp)(nil), // 96: openim.admin.DelClientConfigResp
- (*GetClientConfigReq)(nil), // 97: openim.admin.GetClientConfigReq
- (*GetClientConfigResp)(nil), // 98: openim.admin.GetClientConfigResp
- (*GetUserTokenReq)(nil), // 99: openim.admin.GetUserTokenReq
- (*GetUserTokenResp)(nil), // 100: openim.admin.GetUserTokenResp
- nil, // 101: openim.admin.SetClientConfigReq.ConfigEntry
- nil, // 102: openim.admin.GetClientConfigResp.ConfigEntry
- nil, // 103: openim.admin.GetUserTokenResp.TokensMapEntry
- (*wrapperspb.StringValue)(nil), // 104: openim.protobuf.StringValue
- (*wrapperspb.Int32Value)(nil), // 105: openim.protobuf.Int32Value
- (*sdkws.RequestPagination)(nil), // 106: openim.sdkws.RequestPagination
- (*common.UserPublicInfo)(nil), // 107: openim.chat.common.UserPublicInfo
- (*sdkws.GroupInfo)(nil), // 108: openim.sdkws.GroupInfo
- (*wrapperspb.Int64Value)(nil), // 109: openim.protobuf.Int64Value
- (*wrapperspb.UInt32Value)(nil), // 110: openim.protobuf.UInt32Value
- (*common.AppletInfo)(nil), // 111: openim.chat.common.AppletInfo
+ (*InvalidateTokenReq)(nil), // 83: openim.admin.InvalidateTokenReq
+ (*InvalidateTokenResp)(nil), // 84: openim.admin.InvalidateTokenResp
+ (*AddAppletReq)(nil), // 85: openim.admin.AddAppletReq
+ (*AddAppletResp)(nil), // 86: openim.admin.AddAppletResp
+ (*DelAppletReq)(nil), // 87: openim.admin.DelAppletReq
+ (*DelAppletResp)(nil), // 88: openim.admin.DelAppletResp
+ (*UpdateAppletReq)(nil), // 89: openim.admin.UpdateAppletReq
+ (*UpdateAppletResp)(nil), // 90: openim.admin.UpdateAppletResp
+ (*FindAppletReq)(nil), // 91: openim.admin.FindAppletReq
+ (*FindAppletResp)(nil), // 92: openim.admin.FindAppletResp
+ (*SearchAppletReq)(nil), // 93: openim.admin.SearchAppletReq
+ (*SearchAppletResp)(nil), // 94: openim.admin.SearchAppletResp
+ (*SetClientConfigReq)(nil), // 95: openim.admin.SetClientConfigReq
+ (*SetClientConfigResp)(nil), // 96: openim.admin.SetClientConfigResp
+ (*DelClientConfigReq)(nil), // 97: openim.admin.DelClientConfigReq
+ (*DelClientConfigResp)(nil), // 98: openim.admin.DelClientConfigResp
+ (*GetClientConfigReq)(nil), // 99: openim.admin.GetClientConfigReq
+ (*GetClientConfigResp)(nil), // 100: openim.admin.GetClientConfigResp
+ (*GetUserTokenReq)(nil), // 101: openim.admin.GetUserTokenReq
+ (*GetUserTokenResp)(nil), // 102: openim.admin.GetUserTokenResp
+ nil, // 103: openim.admin.SetClientConfigReq.ConfigEntry
+ nil, // 104: openim.admin.GetClientConfigResp.ConfigEntry
+ nil, // 105: openim.admin.GetUserTokenResp.TokensMapEntry
+ (*wrapperspb.StringValue)(nil), // 106: openim.protobuf.StringValue
+ (*wrapperspb.Int32Value)(nil), // 107: openim.protobuf.Int32Value
+ (*sdkws.RequestPagination)(nil), // 108: openim.sdkws.RequestPagination
+ (*common.UserPublicInfo)(nil), // 109: openim.chat.common.UserPublicInfo
+ (*sdkws.GroupInfo)(nil), // 110: openim.sdkws.GroupInfo
+ (*wrapperspb.Int64Value)(nil), // 111: openim.protobuf.Int64Value
+ (*wrapperspb.UInt32Value)(nil), // 112: openim.protobuf.UInt32Value
+ (*common.AppletInfo)(nil), // 113: openim.chat.common.AppletInfo
}
var file_admin_admin_proto_depIdxs = []int32{
- 104, // 0: openim.admin.AdminUpdateInfoReq.account:type_name -> openim.protobuf.StringValue
- 104, // 1: openim.admin.AdminUpdateInfoReq.password:type_name -> openim.protobuf.StringValue
- 104, // 2: openim.admin.AdminUpdateInfoReq.faceURL:type_name -> openim.protobuf.StringValue
- 104, // 3: openim.admin.AdminUpdateInfoReq.nickname:type_name -> openim.protobuf.StringValue
- 105, // 4: openim.admin.AdminUpdateInfoReq.level:type_name -> openim.protobuf.Int32Value
- 106, // 5: openim.admin.SearchAdminAccountReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 106, // 0: openim.admin.AdminUpdateInfoReq.account:type_name -> openim.protobuf.StringValue
+ 106, // 1: openim.admin.AdminUpdateInfoReq.password:type_name -> openim.protobuf.StringValue
+ 106, // 2: openim.admin.AdminUpdateInfoReq.faceURL:type_name -> openim.protobuf.StringValue
+ 106, // 3: openim.admin.AdminUpdateInfoReq.nickname:type_name -> openim.protobuf.StringValue
+ 107, // 4: openim.admin.AdminUpdateInfoReq.level:type_name -> openim.protobuf.Int32Value
+ 108, // 5: openim.admin.SearchAdminAccountReq.pagination:type_name -> openim.sdkws.RequestPagination
15, // 6: openim.admin.SearchAdminAccountResp.adminAccounts:type_name -> openim.admin.GetAdminInfoResp
- 106, // 7: openim.admin.SearchDefaultFriendReq.pagination:type_name -> openim.sdkws.RequestPagination
- 107, // 8: openim.admin.DefaultFriendAttribute.user:type_name -> openim.chat.common.UserPublicInfo
+ 108, // 7: openim.admin.SearchDefaultFriendReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 109, // 8: openim.admin.DefaultFriendAttribute.user:type_name -> openim.chat.common.UserPublicInfo
23, // 9: openim.admin.SearchDefaultFriendResp.users:type_name -> openim.admin.DefaultFriendAttribute
- 106, // 10: openim.admin.SearchDefaultGroupReq.pagination:type_name -> openim.sdkws.RequestPagination
- 108, // 11: openim.admin.GroupAttribute.group:type_name -> openim.sdkws.GroupInfo
+ 108, // 10: openim.admin.SearchDefaultGroupReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 110, // 11: openim.admin.GroupAttribute.group:type_name -> openim.sdkws.GroupInfo
44, // 12: openim.admin.FindInvitationCodeResp.codes:type_name -> openim.admin.InvitationRegister
- 107, // 13: openim.admin.InvitationRegister.usedUser:type_name -> openim.chat.common.UserPublicInfo
- 106, // 14: openim.admin.SearchInvitationCodeReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 109, // 13: openim.admin.InvitationRegister.usedUser:type_name -> openim.chat.common.UserPublicInfo
+ 108, // 14: openim.admin.SearchInvitationCodeReq.pagination:type_name -> openim.sdkws.RequestPagination
44, // 15: openim.admin.SearchInvitationCodeResp.list:type_name -> openim.admin.InvitationRegister
- 106, // 16: openim.admin.SearchUserIPLimitLoginReq.pagination:type_name -> openim.sdkws.RequestPagination
- 107, // 17: openim.admin.LimitUserLoginIP.user:type_name -> openim.chat.common.UserPublicInfo
+ 108, // 16: openim.admin.SearchUserIPLimitLoginReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 109, // 17: openim.admin.LimitUserLoginIP.user:type_name -> openim.chat.common.UserPublicInfo
48, // 18: openim.admin.SearchUserIPLimitLoginResp.limits:type_name -> openim.admin.LimitUserLoginIP
50, // 19: openim.admin.AddUserIPLimitLoginReq.limits:type_name -> openim.admin.UserIPLimitLogin
50, // 20: openim.admin.DelUserIPLimitLoginReq.limits:type_name -> openim.admin.UserIPLimitLogin
- 106, // 21: openim.admin.SearchIPForbiddenReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 108, // 21: openim.admin.SearchIPForbiddenReq.pagination:type_name -> openim.sdkws.RequestPagination
55, // 22: openim.admin.SearchIPForbiddenResp.forbiddens:type_name -> openim.admin.IPForbidden
56, // 23: openim.admin.AddIPForbiddenReq.forbiddens:type_name -> openim.admin.IPForbiddenAdd
- 106, // 24: openim.admin.SearchBlockUserReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 108, // 24: openim.admin.SearchBlockUserReq.pagination:type_name -> openim.sdkws.RequestPagination
74, // 25: openim.admin.SearchBlockUserResp.users:type_name -> openim.admin.BlockUserInfo
77, // 26: openim.admin.FindUserBlockInfoResp.blocks:type_name -> openim.admin.BlockInfo
- 104, // 27: openim.admin.UpdateAppletReq.name:type_name -> openim.protobuf.StringValue
- 104, // 28: openim.admin.UpdateAppletReq.appID:type_name -> openim.protobuf.StringValue
- 104, // 29: openim.admin.UpdateAppletReq.icon:type_name -> openim.protobuf.StringValue
- 104, // 30: openim.admin.UpdateAppletReq.url:type_name -> openim.protobuf.StringValue
- 104, // 31: openim.admin.UpdateAppletReq.md5:type_name -> openim.protobuf.StringValue
- 109, // 32: openim.admin.UpdateAppletReq.size:type_name -> openim.protobuf.Int64Value
- 104, // 33: openim.admin.UpdateAppletReq.version:type_name -> openim.protobuf.StringValue
- 110, // 34: openim.admin.UpdateAppletReq.priority:type_name -> openim.protobuf.UInt32Value
- 110, // 35: openim.admin.UpdateAppletReq.status:type_name -> openim.protobuf.UInt32Value
- 109, // 36: openim.admin.UpdateAppletReq.createTime:type_name -> openim.protobuf.Int64Value
- 111, // 37: openim.admin.FindAppletResp.applets:type_name -> openim.chat.common.AppletInfo
- 106, // 38: openim.admin.SearchAppletReq.pagination:type_name -> openim.sdkws.RequestPagination
- 111, // 39: openim.admin.SearchAppletResp.applets:type_name -> openim.chat.common.AppletInfo
- 101, // 40: openim.admin.SetClientConfigReq.config:type_name -> openim.admin.SetClientConfigReq.ConfigEntry
- 102, // 41: openim.admin.GetClientConfigResp.config:type_name -> openim.admin.GetClientConfigResp.ConfigEntry
- 103, // 42: openim.admin.GetUserTokenResp.tokensMap:type_name -> openim.admin.GetUserTokenResp.TokensMapEntry
+ 106, // 27: openim.admin.UpdateAppletReq.name:type_name -> openim.protobuf.StringValue
+ 106, // 28: openim.admin.UpdateAppletReq.appID:type_name -> openim.protobuf.StringValue
+ 106, // 29: openim.admin.UpdateAppletReq.icon:type_name -> openim.protobuf.StringValue
+ 106, // 30: openim.admin.UpdateAppletReq.url:type_name -> openim.protobuf.StringValue
+ 106, // 31: openim.admin.UpdateAppletReq.md5:type_name -> openim.protobuf.StringValue
+ 111, // 32: openim.admin.UpdateAppletReq.size:type_name -> openim.protobuf.Int64Value
+ 106, // 33: openim.admin.UpdateAppletReq.version:type_name -> openim.protobuf.StringValue
+ 112, // 34: openim.admin.UpdateAppletReq.priority:type_name -> openim.protobuf.UInt32Value
+ 112, // 35: openim.admin.UpdateAppletReq.status:type_name -> openim.protobuf.UInt32Value
+ 111, // 36: openim.admin.UpdateAppletReq.createTime:type_name -> openim.protobuf.Int64Value
+ 113, // 37: openim.admin.FindAppletResp.applets:type_name -> openim.chat.common.AppletInfo
+ 108, // 38: openim.admin.SearchAppletReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 113, // 39: openim.admin.SearchAppletResp.applets:type_name -> openim.chat.common.AppletInfo
+ 103, // 40: openim.admin.SetClientConfigReq.config:type_name -> openim.admin.SetClientConfigReq.ConfigEntry
+ 104, // 41: openim.admin.GetClientConfigResp.config:type_name -> openim.admin.GetClientConfigResp.ConfigEntry
+ 105, // 42: openim.admin.GetUserTokenResp.tokensMap:type_name -> openim.admin.GetUserTokenResp.TokensMapEntry
0, // 43: openim.admin.admin.Login:input_type -> openim.admin.LoginReq
6, // 44: openim.admin.admin.ChangePassword:input_type -> openim.admin.ChangePasswordReq
4, // 45: openim.admin.admin.AdminUpdateInfo:input_type -> openim.admin.AdminUpdateInfoReq
@@ -6304,63 +6401,65 @@ var file_admin_admin_proto_depIdxs = []int32{
65, // 77: openim.admin.admin.CheckLoginForbidden:input_type -> openim.admin.CheckLoginForbiddenReq
79, // 78: openim.admin.admin.CreateToken:input_type -> openim.admin.CreateTokenReq
81, // 79: openim.admin.admin.ParseToken:input_type -> openim.admin.ParseTokenReq
- 83, // 80: openim.admin.admin.AddApplet:input_type -> openim.admin.AddAppletReq
- 85, // 81: openim.admin.admin.DelApplet:input_type -> openim.admin.DelAppletReq
- 87, // 82: openim.admin.admin.UpdateApplet:input_type -> openim.admin.UpdateAppletReq
- 89, // 83: openim.admin.admin.FindApplet:input_type -> openim.admin.FindAppletReq
- 91, // 84: openim.admin.admin.SearchApplet:input_type -> openim.admin.SearchAppletReq
- 97, // 85: openim.admin.admin.GetClientConfig:input_type -> openim.admin.GetClientConfigReq
- 93, // 86: openim.admin.admin.SetClientConfig:input_type -> openim.admin.SetClientConfigReq
- 95, // 87: openim.admin.admin.DelClientConfig:input_type -> openim.admin.DelClientConfigReq
- 99, // 88: openim.admin.admin.GetUserToken:input_type -> openim.admin.GetUserTokenReq
- 1, // 89: openim.admin.admin.Login:output_type -> openim.admin.LoginResp
- 7, // 90: openim.admin.admin.ChangePassword:output_type -> openim.admin.ChangePasswordResp
- 5, // 91: openim.admin.admin.AdminUpdateInfo:output_type -> openim.admin.AdminUpdateInfoResp
- 15, // 92: openim.admin.admin.GetAdminInfo:output_type -> openim.admin.GetAdminInfoResp
- 3, // 93: openim.admin.admin.AddAdminAccount:output_type -> openim.admin.AddAdminAccountResp
- 10, // 94: openim.admin.admin.ChangeAdminPassword:output_type -> openim.admin.ChangeAdminPasswordResp
- 12, // 95: openim.admin.admin.DelAdminAccount:output_type -> openim.admin.DelAdminAccountResp
- 14, // 96: openim.admin.admin.SearchAdminAccount:output_type -> openim.admin.SearchAdminAccountResp
- 17, // 97: openim.admin.admin.AddDefaultFriend:output_type -> openim.admin.AddDefaultFriendResp
- 19, // 98: openim.admin.admin.DelDefaultFriend:output_type -> openim.admin.DelDefaultFriendResp
- 21, // 99: openim.admin.admin.FindDefaultFriend:output_type -> openim.admin.FindDefaultFriendResp
- 24, // 100: openim.admin.admin.SearchDefaultFriend:output_type -> openim.admin.SearchDefaultFriendResp
- 26, // 101: openim.admin.admin.AddDefaultGroup:output_type -> openim.admin.AddDefaultGroupResp
- 28, // 102: openim.admin.admin.DelDefaultGroup:output_type -> openim.admin.DelDefaultGroupResp
- 30, // 103: openim.admin.admin.FindDefaultGroup:output_type -> openim.admin.FindDefaultGroupResp
- 33, // 104: openim.admin.admin.SearchDefaultGroup:output_type -> openim.admin.SearchDefaultGroupResp
- 35, // 105: openim.admin.admin.AddInvitationCode:output_type -> openim.admin.AddInvitationCodeResp
- 37, // 106: openim.admin.admin.GenInvitationCode:output_type -> openim.admin.GenInvitationCodeResp
- 39, // 107: openim.admin.admin.FindInvitationCode:output_type -> openim.admin.FindInvitationCodeResp
- 41, // 108: openim.admin.admin.UseInvitationCode:output_type -> openim.admin.UseInvitationCodeResp
- 43, // 109: openim.admin.admin.DelInvitationCode:output_type -> openim.admin.DelInvitationCodeResp
- 46, // 110: openim.admin.admin.SearchInvitationCode:output_type -> openim.admin.SearchInvitationCodeResp
- 49, // 111: openim.admin.admin.SearchUserIPLimitLogin:output_type -> openim.admin.SearchUserIPLimitLoginResp
- 52, // 112: openim.admin.admin.AddUserIPLimitLogin:output_type -> openim.admin.AddUserIPLimitLoginResp
- 54, // 113: openim.admin.admin.DelUserIPLimitLogin:output_type -> openim.admin.DelUserIPLimitLoginResp
- 58, // 114: openim.admin.admin.SearchIPForbidden:output_type -> openim.admin.SearchIPForbiddenResp
- 60, // 115: openim.admin.admin.AddIPForbidden:output_type -> openim.admin.AddIPForbiddenResp
- 62, // 116: openim.admin.admin.DelIPForbidden:output_type -> openim.admin.DelIPForbiddenResp
- 68, // 117: openim.admin.admin.CancellationUser:output_type -> openim.admin.CancellationUserResp
- 70, // 118: openim.admin.admin.BlockUser:output_type -> openim.admin.BlockUserResp
- 72, // 119: openim.admin.admin.UnblockUser:output_type -> openim.admin.UnblockUserResp
- 75, // 120: openim.admin.admin.SearchBlockUser:output_type -> openim.admin.SearchBlockUserResp
- 78, // 121: openim.admin.admin.FindUserBlockInfo:output_type -> openim.admin.FindUserBlockInfoResp
- 64, // 122: openim.admin.admin.CheckRegisterForbidden:output_type -> openim.admin.CheckRegisterForbiddenResp
- 66, // 123: openim.admin.admin.CheckLoginForbidden:output_type -> openim.admin.CheckLoginForbiddenResp
- 80, // 124: openim.admin.admin.CreateToken:output_type -> openim.admin.CreateTokenResp
- 82, // 125: openim.admin.admin.ParseToken:output_type -> openim.admin.ParseTokenResp
- 84, // 126: openim.admin.admin.AddApplet:output_type -> openim.admin.AddAppletResp
- 86, // 127: openim.admin.admin.DelApplet:output_type -> openim.admin.DelAppletResp
- 88, // 128: openim.admin.admin.UpdateApplet:output_type -> openim.admin.UpdateAppletResp
- 90, // 129: openim.admin.admin.FindApplet:output_type -> openim.admin.FindAppletResp
- 92, // 130: openim.admin.admin.SearchApplet:output_type -> openim.admin.SearchAppletResp
- 98, // 131: openim.admin.admin.GetClientConfig:output_type -> openim.admin.GetClientConfigResp
- 94, // 132: openim.admin.admin.SetClientConfig:output_type -> openim.admin.SetClientConfigResp
- 96, // 133: openim.admin.admin.DelClientConfig:output_type -> openim.admin.DelClientConfigResp
- 100, // 134: openim.admin.admin.GetUserToken:output_type -> openim.admin.GetUserTokenResp
- 89, // [89:135] is the sub-list for method output_type
- 43, // [43:89] is the sub-list for method input_type
+ 85, // 80: openim.admin.admin.AddApplet:input_type -> openim.admin.AddAppletReq
+ 87, // 81: openim.admin.admin.DelApplet:input_type -> openim.admin.DelAppletReq
+ 89, // 82: openim.admin.admin.UpdateApplet:input_type -> openim.admin.UpdateAppletReq
+ 91, // 83: openim.admin.admin.FindApplet:input_type -> openim.admin.FindAppletReq
+ 93, // 84: openim.admin.admin.SearchApplet:input_type -> openim.admin.SearchAppletReq
+ 99, // 85: openim.admin.admin.GetClientConfig:input_type -> openim.admin.GetClientConfigReq
+ 95, // 86: openim.admin.admin.SetClientConfig:input_type -> openim.admin.SetClientConfigReq
+ 97, // 87: openim.admin.admin.DelClientConfig:input_type -> openim.admin.DelClientConfigReq
+ 101, // 88: openim.admin.admin.GetUserToken:input_type -> openim.admin.GetUserTokenReq
+ 83, // 89: openim.admin.admin.InvalidateToken:input_type -> openim.admin.InvalidateTokenReq
+ 1, // 90: openim.admin.admin.Login:output_type -> openim.admin.LoginResp
+ 7, // 91: openim.admin.admin.ChangePassword:output_type -> openim.admin.ChangePasswordResp
+ 5, // 92: openim.admin.admin.AdminUpdateInfo:output_type -> openim.admin.AdminUpdateInfoResp
+ 15, // 93: openim.admin.admin.GetAdminInfo:output_type -> openim.admin.GetAdminInfoResp
+ 3, // 94: openim.admin.admin.AddAdminAccount:output_type -> openim.admin.AddAdminAccountResp
+ 10, // 95: openim.admin.admin.ChangeAdminPassword:output_type -> openim.admin.ChangeAdminPasswordResp
+ 12, // 96: openim.admin.admin.DelAdminAccount:output_type -> openim.admin.DelAdminAccountResp
+ 14, // 97: openim.admin.admin.SearchAdminAccount:output_type -> openim.admin.SearchAdminAccountResp
+ 17, // 98: openim.admin.admin.AddDefaultFriend:output_type -> openim.admin.AddDefaultFriendResp
+ 19, // 99: openim.admin.admin.DelDefaultFriend:output_type -> openim.admin.DelDefaultFriendResp
+ 21, // 100: openim.admin.admin.FindDefaultFriend:output_type -> openim.admin.FindDefaultFriendResp
+ 24, // 101: openim.admin.admin.SearchDefaultFriend:output_type -> openim.admin.SearchDefaultFriendResp
+ 26, // 102: openim.admin.admin.AddDefaultGroup:output_type -> openim.admin.AddDefaultGroupResp
+ 28, // 103: openim.admin.admin.DelDefaultGroup:output_type -> openim.admin.DelDefaultGroupResp
+ 30, // 104: openim.admin.admin.FindDefaultGroup:output_type -> openim.admin.FindDefaultGroupResp
+ 33, // 105: openim.admin.admin.SearchDefaultGroup:output_type -> openim.admin.SearchDefaultGroupResp
+ 35, // 106: openim.admin.admin.AddInvitationCode:output_type -> openim.admin.AddInvitationCodeResp
+ 37, // 107: openim.admin.admin.GenInvitationCode:output_type -> openim.admin.GenInvitationCodeResp
+ 39, // 108: openim.admin.admin.FindInvitationCode:output_type -> openim.admin.FindInvitationCodeResp
+ 41, // 109: openim.admin.admin.UseInvitationCode:output_type -> openim.admin.UseInvitationCodeResp
+ 43, // 110: openim.admin.admin.DelInvitationCode:output_type -> openim.admin.DelInvitationCodeResp
+ 46, // 111: openim.admin.admin.SearchInvitationCode:output_type -> openim.admin.SearchInvitationCodeResp
+ 49, // 112: openim.admin.admin.SearchUserIPLimitLogin:output_type -> openim.admin.SearchUserIPLimitLoginResp
+ 52, // 113: openim.admin.admin.AddUserIPLimitLogin:output_type -> openim.admin.AddUserIPLimitLoginResp
+ 54, // 114: openim.admin.admin.DelUserIPLimitLogin:output_type -> openim.admin.DelUserIPLimitLoginResp
+ 58, // 115: openim.admin.admin.SearchIPForbidden:output_type -> openim.admin.SearchIPForbiddenResp
+ 60, // 116: openim.admin.admin.AddIPForbidden:output_type -> openim.admin.AddIPForbiddenResp
+ 62, // 117: openim.admin.admin.DelIPForbidden:output_type -> openim.admin.DelIPForbiddenResp
+ 68, // 118: openim.admin.admin.CancellationUser:output_type -> openim.admin.CancellationUserResp
+ 70, // 119: openim.admin.admin.BlockUser:output_type -> openim.admin.BlockUserResp
+ 72, // 120: openim.admin.admin.UnblockUser:output_type -> openim.admin.UnblockUserResp
+ 75, // 121: openim.admin.admin.SearchBlockUser:output_type -> openim.admin.SearchBlockUserResp
+ 78, // 122: openim.admin.admin.FindUserBlockInfo:output_type -> openim.admin.FindUserBlockInfoResp
+ 64, // 123: openim.admin.admin.CheckRegisterForbidden:output_type -> openim.admin.CheckRegisterForbiddenResp
+ 66, // 124: openim.admin.admin.CheckLoginForbidden:output_type -> openim.admin.CheckLoginForbiddenResp
+ 80, // 125: openim.admin.admin.CreateToken:output_type -> openim.admin.CreateTokenResp
+ 82, // 126: openim.admin.admin.ParseToken:output_type -> openim.admin.ParseTokenResp
+ 86, // 127: openim.admin.admin.AddApplet:output_type -> openim.admin.AddAppletResp
+ 88, // 128: openim.admin.admin.DelApplet:output_type -> openim.admin.DelAppletResp
+ 90, // 129: openim.admin.admin.UpdateApplet:output_type -> openim.admin.UpdateAppletResp
+ 92, // 130: openim.admin.admin.FindApplet:output_type -> openim.admin.FindAppletResp
+ 94, // 131: openim.admin.admin.SearchApplet:output_type -> openim.admin.SearchAppletResp
+ 100, // 132: openim.admin.admin.GetClientConfig:output_type -> openim.admin.GetClientConfigResp
+ 96, // 133: openim.admin.admin.SetClientConfig:output_type -> openim.admin.SetClientConfigResp
+ 98, // 134: openim.admin.admin.DelClientConfig:output_type -> openim.admin.DelClientConfigResp
+ 102, // 135: openim.admin.admin.GetUserToken:output_type -> openim.admin.GetUserTokenResp
+ 84, // 136: openim.admin.admin.InvalidateToken:output_type -> openim.admin.InvalidateTokenResp
+ 90, // [90:137] is the sub-list for method output_type
+ 43, // [43:90] is the sub-list for method input_type
43, // [43:43] is the sub-list for extension type_name
43, // [43:43] is the sub-list for extension extendee
0, // [0:43] is the sub-list for field type_name
@@ -7369,7 +7468,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[83].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddAppletReq); i {
+ switch v := v.(*InvalidateTokenReq); i {
case 0:
return &v.state
case 1:
@@ -7381,7 +7480,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[84].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*AddAppletResp); i {
+ switch v := v.(*InvalidateTokenResp); i {
case 0:
return &v.state
case 1:
@@ -7393,7 +7492,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DelAppletReq); i {
+ switch v := v.(*AddAppletReq); i {
case 0:
return &v.state
case 1:
@@ -7405,7 +7504,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[86].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DelAppletResp); i {
+ switch v := v.(*AddAppletResp); i {
case 0:
return &v.state
case 1:
@@ -7417,7 +7516,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[87].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateAppletReq); i {
+ switch v := v.(*DelAppletReq); i {
case 0:
return &v.state
case 1:
@@ -7429,7 +7528,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[88].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateAppletResp); i {
+ switch v := v.(*DelAppletResp); i {
case 0:
return &v.state
case 1:
@@ -7441,7 +7540,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[89].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FindAppletReq); i {
+ switch v := v.(*UpdateAppletReq); i {
case 0:
return &v.state
case 1:
@@ -7453,7 +7552,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*FindAppletResp); i {
+ switch v := v.(*UpdateAppletResp); i {
case 0:
return &v.state
case 1:
@@ -7465,7 +7564,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SearchAppletReq); i {
+ switch v := v.(*FindAppletReq); i {
case 0:
return &v.state
case 1:
@@ -7477,7 +7576,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SearchAppletResp); i {
+ switch v := v.(*FindAppletResp); i {
case 0:
return &v.state
case 1:
@@ -7489,7 +7588,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetClientConfigReq); i {
+ switch v := v.(*SearchAppletReq); i {
case 0:
return &v.state
case 1:
@@ -7501,7 +7600,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SetClientConfigResp); i {
+ switch v := v.(*SearchAppletResp); i {
case 0:
return &v.state
case 1:
@@ -7513,7 +7612,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DelClientConfigReq); i {
+ switch v := v.(*SetClientConfigReq); i {
case 0:
return &v.state
case 1:
@@ -7525,7 +7624,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DelClientConfigResp); i {
+ switch v := v.(*SetClientConfigResp); i {
case 0:
return &v.state
case 1:
@@ -7537,7 +7636,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetClientConfigReq); i {
+ switch v := v.(*DelClientConfigReq); i {
case 0:
return &v.state
case 1:
@@ -7549,7 +7648,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetClientConfigResp); i {
+ switch v := v.(*DelClientConfigResp); i {
case 0:
return &v.state
case 1:
@@ -7561,7 +7660,7 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUserTokenReq); i {
+ switch v := v.(*GetClientConfigReq); i {
case 0:
return &v.state
case 1:
@@ -7573,6 +7672,30 @@ func file_admin_admin_proto_init() {
}
}
file_admin_admin_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetClientConfigResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_admin_admin_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetUserTokenReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_admin_admin_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserTokenResp); i {
case 0:
return &v.state
@@ -7591,7 +7714,7 @@ func file_admin_admin_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_admin_admin_proto_rawDesc,
NumEnums: 0,
- NumMessages: 104,
+ NumMessages: 106,
NumExtensions: 0,
NumServices: 1,
},
@@ -7674,6 +7797,8 @@ type AdminClient interface {
SetClientConfig(ctx context.Context, in *SetClientConfigReq, opts ...grpc.CallOption) (*SetClientConfigResp, error)
DelClientConfig(ctx context.Context, in *DelClientConfigReq, opts ...grpc.CallOption) (*DelClientConfigResp, error)
GetUserToken(ctx context.Context, in *GetUserTokenReq, opts ...grpc.CallOption) (*GetUserTokenResp, error)
+ // invalidate token
+ InvalidateToken(ctx context.Context, in *InvalidateTokenReq, opts ...grpc.CallOption) (*InvalidateTokenResp, error)
}
type adminClient struct {
@@ -8098,6 +8223,15 @@ func (c *adminClient) GetUserToken(ctx context.Context, in *GetUserTokenReq, opt
return out, nil
}
+func (c *adminClient) InvalidateToken(ctx context.Context, in *InvalidateTokenReq, opts ...grpc.CallOption) (*InvalidateTokenResp, error) {
+ out := new(InvalidateTokenResp)
+ err := c.cc.Invoke(ctx, "/openim.admin.admin/InvalidateToken", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// AdminServer is the server API for Admin service.
type AdminServer interface {
// Login
@@ -8157,6 +8291,8 @@ type AdminServer interface {
SetClientConfig(context.Context, *SetClientConfigReq) (*SetClientConfigResp, error)
DelClientConfig(context.Context, *DelClientConfigReq) (*DelClientConfigResp, error)
GetUserToken(context.Context, *GetUserTokenReq) (*GetUserTokenResp, error)
+ // invalidate token
+ InvalidateToken(context.Context, *InvalidateTokenReq) (*InvalidateTokenResp, error)
}
// UnimplementedAdminServer can be embedded to have forward compatible implementations.
@@ -8301,6 +8437,9 @@ func (*UnimplementedAdminServer) DelClientConfig(context.Context, *DelClientConf
func (*UnimplementedAdminServer) GetUserToken(context.Context, *GetUserTokenReq) (*GetUserTokenResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUserToken not implemented")
}
+func (*UnimplementedAdminServer) InvalidateToken(context.Context, *InvalidateTokenReq) (*InvalidateTokenResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method InvalidateToken not implemented")
+}
func RegisterAdminServer(s *grpc.Server, srv AdminServer) {
s.RegisterService(&_Admin_serviceDesc, srv)
@@ -9134,6 +9273,24 @@ func _Admin_GetUserToken_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
+func _Admin_InvalidateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(InvalidateTokenReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(AdminServer).InvalidateToken(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/openim.admin.admin/InvalidateToken",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(AdminServer).InvalidateToken(ctx, req.(*InvalidateTokenReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Admin_serviceDesc = grpc.ServiceDesc{
ServiceName: "openim.admin.admin",
HandlerType: (*AdminServer)(nil),
@@ -9322,6 +9479,10 @@ var _Admin_serviceDesc = grpc.ServiceDesc{
MethodName: "GetUserToken",
Handler: _Admin_GetUserToken_Handler,
},
+ {
+ MethodName: "InvalidateToken",
+ Handler: _Admin_InvalidateToken_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "admin/admin.proto",
diff --git a/pkg/protocol/admin/admin.proto b/pkg/protocol/admin/admin.proto
index 87c4cbfd5..2c4ee995a 100644
--- a/pkg/protocol/admin/admin.proto
+++ b/pkg/protocol/admin/admin.proto
@@ -14,13 +14,15 @@
syntax = "proto3";
package openim.admin;
-import "wrapperspb/wrapperspb.proto";
-import "sdkws/sdkws.proto";
+
import "common/common.proto";
+import "sdkws/sdkws.proto";
+import "wrapperspb/wrapperspb.proto";
+
option go_package = "github.com/openimsdk/chat/pkg/protocol/admin";
-//登录
-message LoginReq {
+// login
+message LoginReq {
string account = 1;
string password = 2;
}
@@ -34,15 +36,14 @@ message LoginResp {
string adminUserID = 6;
}
-message AddAdminAccountReq{
- string account=1;
- string password=2;
- string faceURL=3;
- string nickname=4;
+message AddAdminAccountReq {
+ string account = 1;
+ string password = 2;
+ string faceURL = 3;
+ string nickname = 4;
}
-message AddAdminAccountResp{
-}
+message AddAdminAccountResp {}
message AdminUpdateInfoReq {
openim.protobuf.StringValue account = 1;
@@ -58,39 +59,35 @@ message AdminUpdateInfoResp {
string faceURL = 3;
}
-message ChangePasswordReq {
+message ChangePasswordReq {
string password = 1;
}
-message ChangePasswordResp {}
+message ChangePasswordResp {}
+message GetAdminInfoReq {}
-message GetAdminInfoReq {
-}
-
-message ChangeAdminPasswordReq{
- string userID = 1;
- string currentPassword = 2;
- string newPassword = 3;
+message ChangeAdminPasswordReq {
+ string userID = 1;
+ string currentPassword = 2;
+ string newPassword = 3;
}
-message ChangeAdminPasswordResp{
-}
+message ChangeAdminPasswordResp {}
-message DelAdminAccountReq{
- repeated string userIDs=1;
+message DelAdminAccountReq {
+ repeated string userIDs = 1;
}
-message DelAdminAccountResp{
-}
+message DelAdminAccountResp {}
-message SearchAdminAccountReq{
+message SearchAdminAccountReq {
openim.sdkws.RequestPagination pagination = 2;
}
-message SearchAdminAccountResp{
+message SearchAdminAccountResp {
uint32 total = 1;
- repeated GetAdminInfoResp adminAccounts= 2;
+ repeated GetAdminInfoResp adminAccounts = 2;
}
message GetAdminInfoResp {
@@ -99,11 +96,11 @@ message GetAdminInfoResp {
string faceURL = 4;
string nickname = 5;
string userID = 6;
- int32 level = 7;
- int64 createTime = 8;
+ int32 level = 7;
+ int64 createTime = 8;
}
-// ################### 默认好友 ###################
+// ################### Default Friend ###################
message AddDefaultFriendReq {
repeated string userIDs = 1;
@@ -139,8 +136,7 @@ message SearchDefaultFriendResp {
repeated DefaultFriendAttribute users = 2;
}
-// ################### 默认群组 ###################
-
+// ################### DefaultGroup ###################
message AddDefaultGroupReq {
repeated string groupIDs = 1;
@@ -176,7 +172,7 @@ message SearchDefaultGroupResp {
repeated string groupIDs = 2;
}
-// ################### 邀请码 ###################
+// ################### InvitationCode ###################
message AddInvitationCodeReq {
repeated string codes = 1;
@@ -192,22 +188,20 @@ message GenInvitationCodeReq {
message GenInvitationCodeResp {}
-message FindInvitationCodeReq{
+message FindInvitationCodeReq {
repeated string codes = 1;
}
-message FindInvitationCodeResp{
+message FindInvitationCodeResp {
repeated InvitationRegister codes = 1;
}
-message UseInvitationCodeReq{
+message UseInvitationCodeReq {
string code = 1;
string userID = 2;
}
-message UseInvitationCodeResp{
-}
-
+message UseInvitationCodeResp {}
message DelInvitationCodeReq {
repeated string codes = 1;
@@ -222,8 +216,6 @@ message InvitationRegister {
openim.chat.common.UserPublicInfo usedUser = 4;
}
-
-
message SearchInvitationCodeReq {
int32 status = 1;
repeated string userIDs = 2;
@@ -237,7 +229,7 @@ message SearchInvitationCodeResp {
repeated InvitationRegister list = 2;
}
-// ################### 用户登录ip限制 ###################
+// ################### User Login IP Limit ###################
message SearchUserIPLimitLoginReq {
string keyword = 1;
@@ -265,18 +257,15 @@ message AddUserIPLimitLoginReq {
repeated UserIPLimitLogin limits = 1;
}
-message AddUserIPLimitLoginResp {
-}
+message AddUserIPLimitLoginResp {}
message DelUserIPLimitLoginReq {
repeated UserIPLimitLogin limits = 1;
}
-message DelUserIPLimitLoginResp {
-}
-
+message DelUserIPLimitLoginResp {}
-// ################### 用户IP限制 ###################
+// ################### User IP Limit ###################
message IPForbidden {
string ip = 1;
@@ -297,7 +286,7 @@ message SearchIPForbiddenReq {
openim.sdkws.RequestPagination pagination = 3;
}
-message SearchIPForbiddenResp{
+message SearchIPForbiddenResp {
uint32 total = 1;
repeated IPForbidden forbiddens = 2;
}
@@ -312,47 +301,43 @@ message DelIPForbiddenReq {
}
message DelIPForbiddenResp {}
-// ################### 用户限制 ###################
+// ################### User Limit ###################
message CheckRegisterForbiddenReq {
string ip = 1;
}
-message CheckRegisterForbiddenResp {
-}
+message CheckRegisterForbiddenResp {}
message CheckLoginForbiddenReq {
string ip = 1;
string userID = 2;
}
-message CheckLoginForbiddenResp {
-}
+message CheckLoginForbiddenResp {}
-// ################### 注销 ###################
-message CancellationUserReq{
+// ################### login out ###################
+message CancellationUserReq {
string userID = 1;
string reason = 2;
}
message CancellationUserResp {}
-// ################### 封号、解封 ###################
-message BlockUserReq{
+// ################### Block User, Unblock User ###################
+message BlockUserReq {
string userID = 1;
string reason = 2;
}
-message BlockUserResp {
-}
+message BlockUserResp {}
-message UnblockUserReq{
+message UnblockUserReq {
repeated string userIDs = 1;
}
message UnblockUserResp {}
-
-message SearchBlockUserReq{
+message SearchBlockUserReq {
string keyword = 1;
openim.sdkws.RequestPagination pagination = 2;
}
@@ -371,51 +356,56 @@ message BlockUserInfo {
int64 createTime = 11;
}
-message SearchBlockUserResp{
+message SearchBlockUserResp {
uint32 total = 1;
repeated BlockUserInfo users = 2;
}
-message FindUserBlockInfoReq{
+message FindUserBlockInfoReq {
repeated string userIDs = 1;
}
message BlockInfo {
- string userID = 1;
- string reason = 2;
+ string userID = 1;
+ string reason = 2;
string opUserID = 3;
- int64 createTime = 4;
+ int64 createTime = 4;
}
-
-message FindUserBlockInfoResp{
+message FindUserBlockInfoResp {
repeated BlockInfo blocks = 2;
}
// ################### TOKEN ###################
-message CreateTokenReq{
- string userID = 2;
- int32 userType = 3;
+message CreateTokenReq {
+ string userID = 1;
+ int32 userType = 32;
}
-message CreateTokenResp{
- string token = 2;
+message CreateTokenResp {
+ string token = 1;
}
-message ParseTokenReq{
- string token = 2;
+message ParseTokenReq {
+ string token = 1;
}
-message ParseTokenResp{
- string userID = 2;
- int32 userType = 3;
- int64 expireTimeSeconds = 4;
+message ParseTokenResp {
+ string userID = 1;
+ int32 userType = 2;
+ int64 expireTimeSeconds = 3;
+}
+
+message InvalidateTokenReq {
+ string userID = 1;
}
-// ################### 小程序 ###################
+message InvalidateTokenResp {}
+
+// ################### mini program ###################
-message AddAppletReq {
+message AddAppletReq {
string id = 1;
string name = 2;
string appID = 3;
@@ -429,19 +419,15 @@ message AddAppletReq {
int64 createTime = 11;
}
-message AddAppletResp {
-}
-
+message AddAppletResp {}
-message DelAppletReq {
+message DelAppletReq {
repeated string appletIds = 1;
}
-message DelAppletResp {
-}
-
+message DelAppletResp {}
-message UpdateAppletReq {
+message UpdateAppletReq {
string id = 1;
openim.protobuf.StringValue name = 2;
openim.protobuf.StringValue appID = 3;
@@ -455,11 +441,9 @@ message UpdateAppletReq {
openim.protobuf.Int64Value createTime = 11;
}
-message UpdateAppletResp {
-}
+message UpdateAppletResp {}
-message FindAppletReq {
-}
+message FindAppletReq {}
message FindAppletResp {
repeated openim.chat.common.AppletInfo applets = 1;
@@ -475,104 +459,102 @@ message SearchAppletResp {
repeated openim.chat.common.AppletInfo applets = 2;
}
-
message SetClientConfigReq {
map config = 1;
}
-message SetClientConfigResp {
-}
+message SetClientConfigResp {}
message DelClientConfigReq {
repeated string keys = 1;
}
-message DelClientConfigResp {
-}
+message DelClientConfigResp {}
-message GetClientConfigReq {
-}
+message GetClientConfigReq {}
message GetClientConfigResp {
map config = 1;
}
-message GetUserTokenReq{
+message GetUserTokenReq {
string userID = 1;
}
-message GetUserTokenResp{
+message GetUserTokenResp {
map tokensMap = 1;
}
service admin {
// Login
- rpc Login(LoginReq) returns(LoginResp);
- rpc ChangePassword(ChangePasswordReq) returns(ChangePasswordResp);
- rpc AdminUpdateInfo(AdminUpdateInfoReq)returns(AdminUpdateInfoResp);
+ rpc Login(LoginReq) returns (LoginResp);
+ rpc ChangePassword(ChangePasswordReq) returns (ChangePasswordResp);
+ rpc AdminUpdateInfo(AdminUpdateInfoReq) returns (AdminUpdateInfoResp);
// Get administrator information
- rpc GetAdminInfo(GetAdminInfoReq) returns(GetAdminInfoResp);
- rpc AddAdminAccount(AddAdminAccountReq)returns(AddAdminAccountResp);
- rpc ChangeAdminPassword(ChangeAdminPasswordReq)returns(ChangeAdminPasswordResp);
- rpc DelAdminAccount(DelAdminAccountReq)returns(DelAdminAccountResp);
- rpc SearchAdminAccount(SearchAdminAccountReq)returns(SearchAdminAccountResp);
+ rpc GetAdminInfo(GetAdminInfoReq) returns (GetAdminInfoResp);
+ rpc AddAdminAccount(AddAdminAccountReq) returns (AddAdminAccountResp);
+ rpc ChangeAdminPassword(ChangeAdminPasswordReq) returns (ChangeAdminPasswordResp);
+ rpc DelAdminAccount(DelAdminAccountReq) returns (DelAdminAccountResp);
+ rpc SearchAdminAccount(SearchAdminAccountReq) returns (SearchAdminAccountResp);
// Add Remove Get default friend list on registration
- rpc AddDefaultFriend(AddDefaultFriendReq) returns(AddDefaultFriendResp);
- rpc DelDefaultFriend(DelDefaultFriendReq) returns(DelDefaultFriendResp);
- rpc FindDefaultFriend(FindDefaultFriendReq) returns(FindDefaultFriendResp);
- rpc SearchDefaultFriend(SearchDefaultFriendReq) returns(SearchDefaultFriendResp);
-
- rpc AddDefaultGroup(AddDefaultGroupReq) returns(AddDefaultGroupResp);
- rpc DelDefaultGroup(DelDefaultGroupReq) returns(DelDefaultGroupResp);
- rpc FindDefaultGroup(FindDefaultGroupReq) returns(FindDefaultGroupResp);
- rpc SearchDefaultGroup(SearchDefaultGroupReq) returns(SearchDefaultGroupResp);
+ rpc AddDefaultFriend(AddDefaultFriendReq) returns (AddDefaultFriendResp);
+ rpc DelDefaultFriend(DelDefaultFriendReq) returns (DelDefaultFriendResp);
+ rpc FindDefaultFriend(FindDefaultFriendReq) returns (FindDefaultFriendResp);
+ rpc SearchDefaultFriend(SearchDefaultFriendReq) returns (SearchDefaultFriendResp);
+ rpc AddDefaultGroup(AddDefaultGroupReq) returns (AddDefaultGroupResp);
+ rpc DelDefaultGroup(DelDefaultGroupReq) returns (DelDefaultGroupResp);
+ rpc FindDefaultGroup(FindDefaultGroupReq) returns (FindDefaultGroupResp);
+ rpc SearchDefaultGroup(SearchDefaultGroupReq) returns (SearchDefaultGroupResp);
// Invitation Code Generate Query Get
- rpc AddInvitationCode(AddInvitationCodeReq) returns(AddInvitationCodeResp);
- rpc GenInvitationCode(GenInvitationCodeReq) returns(GenInvitationCodeResp);
- rpc FindInvitationCode(FindInvitationCodeReq) returns(FindInvitationCodeResp);
- rpc UseInvitationCode(UseInvitationCodeReq) returns(UseInvitationCodeResp);
- rpc DelInvitationCode(DelInvitationCodeReq) returns(DelInvitationCodeResp);
- rpc SearchInvitationCode(SearchInvitationCodeReq) returns(SearchInvitationCodeResp);
+ rpc AddInvitationCode(AddInvitationCodeReq) returns (AddInvitationCodeResp);
+ rpc GenInvitationCode(GenInvitationCodeReq) returns (GenInvitationCodeResp);
+ rpc FindInvitationCode(FindInvitationCodeReq) returns (FindInvitationCodeResp);
+ rpc UseInvitationCode(UseInvitationCodeReq) returns (UseInvitationCodeResp);
+ rpc DelInvitationCode(DelInvitationCodeReq) returns (DelInvitationCodeResp);
+ rpc SearchInvitationCode(SearchInvitationCodeReq) returns (SearchInvitationCodeResp);
// User login ip limit Query Add Remove
- rpc SearchUserIPLimitLogin(SearchUserIPLimitLoginReq) returns(SearchUserIPLimitLoginResp);
- rpc AddUserIPLimitLogin(AddUserIPLimitLoginReq) returns(AddUserIPLimitLoginResp);
- rpc DelUserIPLimitLogin(DelUserIPLimitLoginReq) returns(DelUserIPLimitLoginResp);
+ rpc SearchUserIPLimitLogin(SearchUserIPLimitLoginReq) returns (SearchUserIPLimitLoginResp);
+ rpc AddUserIPLimitLogin(AddUserIPLimitLoginReq) returns (AddUserIPLimitLoginResp);
+ rpc DelUserIPLimitLogin(DelUserIPLimitLoginReq) returns (DelUserIPLimitLoginResp);
// Prohibit users from registering at certain ip Query Add Remove
- rpc SearchIPForbidden(SearchIPForbiddenReq) returns(SearchIPForbiddenResp);
- rpc AddIPForbidden(AddIPForbiddenReq) returns(AddIPForbiddenResp);
- rpc DelIPForbidden(DelIPForbiddenReq) returns(DelIPForbiddenResp);
+ rpc SearchIPForbidden(SearchIPForbiddenReq) returns (SearchIPForbiddenResp);
+ rpc AddIPForbidden(AddIPForbiddenReq) returns (AddIPForbiddenResp);
+ rpc DelIPForbidden(DelIPForbiddenReq) returns (DelIPForbiddenResp);
// User Management Related Add Block/Unblock Pull
- rpc CancellationUser(CancellationUserReq) returns(CancellationUserResp);
- rpc BlockUser(BlockUserReq) returns(BlockUserResp);
- rpc UnblockUser(UnblockUserReq) returns(UnblockUserResp);
- rpc SearchBlockUser(SearchBlockUserReq) returns(SearchBlockUserResp);
- rpc FindUserBlockInfo(FindUserBlockInfoReq) returns(FindUserBlockInfoResp);
+ rpc CancellationUser(CancellationUserReq) returns (CancellationUserResp);
+ rpc BlockUser(BlockUserReq) returns (BlockUserResp);
+ rpc UnblockUser(UnblockUserReq) returns (UnblockUserResp);
+ rpc SearchBlockUser(SearchBlockUserReq) returns (SearchBlockUserResp);
+ rpc FindUserBlockInfo(FindUserBlockInfoReq) returns (FindUserBlockInfoResp);
- rpc CheckRegisterForbidden(CheckRegisterForbiddenReq)returns(CheckRegisterForbiddenResp);
- rpc CheckLoginForbidden(CheckLoginForbiddenReq)returns(CheckLoginForbiddenResp);
+ rpc CheckRegisterForbidden(CheckRegisterForbiddenReq) returns (CheckRegisterForbiddenResp);
+ rpc CheckLoginForbidden(CheckLoginForbiddenReq) returns (CheckLoginForbiddenResp);
// create token
- rpc CreateToken(CreateTokenReq) returns(CreateTokenResp);
+ rpc CreateToken(CreateTokenReq) returns (CreateTokenResp);
// parse token
- rpc ParseToken(ParseTokenReq) returns(ParseTokenResp);
+ rpc ParseToken(ParseTokenReq) returns (ParseTokenResp);
// app
- rpc AddApplet(AddAppletReq)returns(AddAppletResp);
- rpc DelApplet(DelAppletReq)returns(DelAppletResp);
- rpc UpdateApplet(UpdateAppletReq)returns(UpdateAppletResp);
- rpc FindApplet(FindAppletReq)returns(FindAppletResp);
- rpc SearchApplet(SearchAppletReq)returns(SearchAppletResp);
+ rpc AddApplet(AddAppletReq) returns (AddAppletResp);
+ rpc DelApplet(DelAppletReq) returns (DelAppletResp);
+ rpc UpdateApplet(UpdateAppletReq) returns (UpdateAppletResp);
+ rpc FindApplet(FindAppletReq) returns (FindAppletResp);
+ rpc SearchApplet(SearchAppletReq) returns (SearchAppletResp);
// Client Configuration
- rpc GetClientConfig(GetClientConfigReq) returns(GetClientConfigResp);
- rpc SetClientConfig(SetClientConfigReq) returns(SetClientConfigResp);
- rpc DelClientConfig(DelClientConfigReq) returns(DelClientConfigResp);
+ rpc GetClientConfig(GetClientConfigReq) returns (GetClientConfigResp);
+ rpc SetClientConfig(SetClientConfigReq) returns (SetClientConfigResp);
+ rpc DelClientConfig(DelClientConfigReq) returns (DelClientConfigResp);
rpc GetUserToken(GetUserTokenReq) returns (GetUserTokenResp);
-}
\ No newline at end of file
+
+ // invalidate token
+ rpc InvalidateToken(InvalidateTokenReq) returns (InvalidateTokenResp);
+}
diff --git a/pkg/rpclient/chat/admin.go b/pkg/rpclient/chat/admin.go
index 03f20be28..e65d8c1af 100644
--- a/pkg/rpclient/chat/admin.go
+++ b/pkg/rpclient/chat/admin.go
@@ -16,6 +16,7 @@ package chat
import (
"context"
+
"github.com/openimsdk/chat/pkg/common/mctx"
"github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/chat/pkg/protocol/admin"
@@ -101,3 +102,8 @@ func (o *AdminClient) GetDefaultGroupID(ctx context.Context) ([]string, error) {
}
return resp.GroupIDs, nil
}
+
+func (o *AdminClient) InvalidateToken(ctx context.Context, userID string) error {
+ _, err := o.client.InvalidateToken(ctx, &admin.InvalidateTokenReq{UserID: userID})
+ return err
+}
diff --git a/pkg/rpclient/chat/chat.go b/pkg/rpclient/chat/chat.go
index 4fc87e1df..d259693c3 100644
--- a/pkg/rpclient/chat/chat.go
+++ b/pkg/rpclient/chat/chat.go
@@ -16,6 +16,7 @@ package chat
import (
"context"
+
"github.com/openimsdk/chat/pkg/protocol/chat"
"github.com/openimsdk/chat/pkg/protocol/common"
"github.com/openimsdk/tools/errs"
From ad261decddbb8f7f2b320794c68a60a21245990e Mon Sep 17 00:00:00 2001
From: Monet Lee
Date: Sat, 15 Jun 2024 08:55:47 +0800
Subject: [PATCH 21/26] feat: refactor effect of registerUser order. (#555)
* feat: refactor effect of register order.
* feat: implement checkPhone method in `Chat` and rewrite register user logic.
* fix: fix error condition logic.
* feat: implement check `Chat` user exist logic.
* feat: implement correct is registered logic.
---
go.sum | 2 -
internal/api/chat/chat.go | 41 +-
internal/rpc/chat/user.go | 41 ++
pkg/common/db/database/chat.go | 16 +
pkg/common/db/model/chat/account.go | 10 +-
pkg/common/db/model/chat/attribute.go | 12 +
pkg/common/db/model/chat/register.go | 10 +-
pkg/common/db/table/chat/account.go | 1 +
pkg/common/db/table/chat/attribute.go | 6 +-
pkg/common/db/table/chat/register.go | 3 +-
pkg/common/imapi/api.go | 1 +
pkg/common/imapi/caller.go | 14 +
pkg/protocol/chat/chat.pb.go | 697 +++++++++++++++++++-------
pkg/protocol/chat/chat.proto | 138 ++---
pkg/rpclient/chat/chat.go | 10 +
15 files changed, 745 insertions(+), 257 deletions(-)
diff --git a/go.sum b/go.sum
index e312afb05..012886d2b 100644
--- a/go.sum
+++ b/go.sum
@@ -189,8 +189,6 @@ github.com/openimsdk/gomake v0.0.9 h1:ouf25ygN2PMQ68Gfgns/EQRPiLPnp+77SIr68GfE+n
github.com/openimsdk/gomake v0.0.9/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
-github.com/openimsdk/tools v0.0.49-alpha.18 h1:ARQeCiRmExvtB6XYItegThuV63JGOTxddwhSLHYXd78=
-github.com/openimsdk/tools v0.0.49-alpha.18/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM=
github.com/openimsdk/tools v0.0.49-alpha.24 h1:lJsqnjTPujnr91LRQ6QmcTliMIa4fMOBSTri6rFz2ek=
github.com/openimsdk/tools v0.0.49-alpha.24/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
diff --git a/internal/api/chat/chat.go b/internal/api/chat/chat.go
index c8a8c99a7..6ab2e4bbc 100644
--- a/internal/api/chat/chat.go
+++ b/internal/api/chat/chat.go
@@ -32,6 +32,7 @@ import (
"github.com/openimsdk/tools/a2r"
"github.com/openimsdk/tools/apiresp"
"github.com/openimsdk/tools/errs"
+ "github.com/openimsdk/tools/log"
)
func New(chatClient chatpb.ChatClient, adminClient admin.AdminClient, imApiCaller imapi.CallerInterface, api *util.Api) *Api {
@@ -88,6 +89,38 @@ func (o *Api) RegisterUser(c *gin.Context) {
return
}
req.Ip = ip
+
+ imToken, err := o.imApiCaller.ImAdminTokenWithDefaultAdmin(c)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+ apiCtx := mctx.WithApiToken(c, imToken)
+ rpcCtx := o.WithAdminUser(c)
+
+ checkResp, err := o.chatClient.CheckUserExist(rpcCtx, &chatpb.CheckUserExistReq{User: req.User})
+ if err != nil {
+ log.ZDebug(rpcCtx, "Not else", errs.Unwrap(err))
+ apiresp.GinError(c, err)
+ return
+ }
+ if checkResp.IsRegistered {
+ isUserNotExist, err := o.imApiCaller.AccountCheckSingle(apiCtx, checkResp.Userid)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+ // if User is not exist in SDK server. You need delete this user and register new user again.
+ if isUserNotExist {
+ _, err := o.chatClient.DelUserAccount(rpcCtx, &chatpb.DelUserAccountReq{UserIDs: []string{checkResp.Userid}})
+ log.ZDebug(c, "Delete Succsssss", checkResp.Userid)
+ if err != nil {
+ apiresp.GinError(c, err)
+ return
+ }
+ }
+ }
+
respRegisterUser, err := o.chatClient.RegisterUser(c, req)
if err != nil {
apiresp.GinError(c, err)
@@ -104,13 +137,7 @@ func (o *Api) RegisterUser(c *gin.Context) {
apiresp.GinError(c, err)
return
}
- imToken, err := o.imApiCaller.ImAdminTokenWithDefaultAdmin(c)
- if err != nil {
- apiresp.GinError(c, err)
- return
- }
- apiCtx := mctx.WithApiToken(c, imToken)
- rpcCtx := o.WithAdminUser(c)
+
if resp, err := o.adminClient.FindDefaultFriend(rpcCtx, &admin.FindDefaultFriendReq{}); err == nil {
_ = o.imApiCaller.ImportFriend(apiCtx, respRegisterUser.UserID, resp.UserIDs)
}
diff --git a/internal/rpc/chat/user.go b/internal/rpc/chat/user.go
index 1dcb88a54..ff53c9177 100644
--- a/internal/rpc/chat/user.go
+++ b/internal/rpc/chat/user.go
@@ -21,7 +21,9 @@ import (
"github.com/openimsdk/chat/pkg/common/db/dbutil"
chatdb "github.com/openimsdk/chat/pkg/common/db/table/chat"
constantpb "github.com/openimsdk/protocol/constant"
+ "github.com/openimsdk/tools/log"
"github.com/openimsdk/tools/mcontext"
+ "go.mongodb.org/mongo-driver/mongo"
"github.com/openimsdk/chat/pkg/common/constant"
"github.com/openimsdk/chat/pkg/common/mctx"
@@ -293,3 +295,42 @@ func (o *chatSvr) checkTheUniqueness(ctx context.Context, req *chat.AddUserAccou
}
return nil
}
+
+func (o *chatSvr) CheckUserExist(ctx context.Context, req *chat.CheckUserExistReq) (resp *chat.CheckUserExistResp, err error) {
+ if req.User.PhoneNumber != "" {
+ attributeByPhone, err := o.Database.TakeAttributeByPhone(ctx, req.User.AreaCode, req.User.PhoneNumber)
+ // err != nil is not found User
+ if err != nil && errs.Unwrap(err) != mongo.ErrNoDocuments {
+ return nil, err
+ }
+ if attributeByPhone != nil {
+ log.ZDebug(ctx, "Check Number is ", attributeByPhone.PhoneNumber)
+ log.ZDebug(ctx, "Check userID is ", attributeByPhone.UserID)
+ if attributeByPhone.PhoneNumber == req.User.PhoneNumber {
+ return &chat.CheckUserExistResp{Userid: attributeByPhone.UserID, IsRegistered: true}, nil
+ }
+ }
+ } else {
+ if req.User.Email != "" {
+ attributeByEmail, err := o.Database.TakeAttributeByEmail(ctx, req.User.Email)
+ if err != nil && errs.Unwrap(err) != mongo.ErrNoDocuments {
+ return nil, err
+ }
+ if attributeByEmail != nil {
+ log.ZDebug(ctx, "Check email is ", attributeByEmail.Email)
+ log.ZDebug(ctx, "Check userID is ", attributeByEmail.UserID)
+ if attributeByEmail.Email == req.User.Email {
+ return &chat.CheckUserExistResp{Userid: attributeByEmail.UserID, IsRegistered: true}, nil
+ }
+ }
+ }
+ }
+ return nil, nil
+}
+
+func (o *chatSvr) DelUserAccount(ctx context.Context, req *chat.DelUserAccountReq) (resp *chat.DelUserAccountResp, err error) {
+ if err := o.Database.DelUserAccount(ctx, req.UserIDs); err != nil && errs.Unwrap(err) != mongo.ErrNoDocuments {
+ return nil, err
+ }
+ return nil, nil
+}
diff --git a/pkg/common/db/database/chat.go b/pkg/common/db/database/chat.go
index ea66dcb62..e618845a4 100644
--- a/pkg/common/db/database/chat.go
+++ b/pkg/common/db/database/chat.go
@@ -57,6 +57,7 @@ type ChatDatabaseInterface interface {
NewUserCountTotal(ctx context.Context, before *time.Time) (int64, error)
UserLoginCountTotal(ctx context.Context, before *time.Time) (int64, error)
UserLoginCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, int64, error)
+ DelUserAccount(ctx context.Context, userIDs []string) error
}
func NewChatDatabase(cli *mongoutil.Client) (ChatDatabaseInterface, error) {
@@ -260,3 +261,18 @@ func (o *ChatDatabase) UserLoginCountTotal(ctx context.Context, before *time.Tim
func (o *ChatDatabase) UserLoginCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, int64, error) {
return o.userLoginRecord.CountRangeEverydayTotal(ctx, start, end)
}
+
+func (o *ChatDatabase) DelUserAccount(ctx context.Context, userIDs []string) error {
+ return o.tx.Transaction(ctx, func(ctx context.Context) error {
+ if err := o.register.Delete(ctx, userIDs); err != nil {
+ return err
+ }
+ if err := o.account.Delete(ctx, userIDs); err != nil {
+ return err
+ }
+ if err := o.attribute.Delete(ctx, userIDs); err != nil {
+ return err
+ }
+ return nil
+ })
+}
diff --git a/pkg/common/db/model/chat/account.go b/pkg/common/db/model/chat/account.go
index 4ca37bf45..c9c8fa9c4 100644
--- a/pkg/common/db/model/chat/account.go
+++ b/pkg/common/db/model/chat/account.go
@@ -16,12 +16,13 @@ package chat
import (
"context"
+ "time"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/errs"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
- "time"
"github.com/openimsdk/chat/pkg/common/db/table/chat"
)
@@ -62,3 +63,10 @@ func (o *Account) Update(ctx context.Context, userID string, data map[string]any
func (o *Account) UpdatePassword(ctx context.Context, userId string, password string) error {
return mongoutil.UpdateOne(ctx, o.coll, bson.M{"user_id": userId}, bson.M{"$set": bson.M{"password": password, "change_time": time.Now()}}, false)
}
+
+func (o *Account) Delete(ctx context.Context, userIDs []string) error {
+ if len(userIDs) == 0 {
+ return nil
+ }
+ return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}})
+}
diff --git a/pkg/common/db/model/chat/attribute.go b/pkg/common/db/model/chat/attribute.go
index f01549aa5..9b83b2df3 100644
--- a/pkg/common/db/model/chat/attribute.go
+++ b/pkg/common/db/model/chat/attribute.go
@@ -16,6 +16,7 @@ package chat
import (
"context"
+
"github.com/openimsdk/tools/db/mongoutil"
"github.com/openimsdk/tools/db/pagination"
"github.com/openimsdk/tools/errs"
@@ -81,6 +82,10 @@ func (o *Attribute) FindAccount(ctx context.Context, accounts []string) ([]*chat
return mongoutil.Find[*chat.Attribute](ctx, o.coll, bson.M{"account": bson.M{"$in": accounts}})
}
+func (o *Attribute) FindPhone(ctx context.Context, phoneNumbers []string) ([]*chat.Attribute, error) {
+ return mongoutil.Find[*chat.Attribute](ctx, o.coll, bson.M{"phone_number": bson.M{"$in": phoneNumbers}})
+}
+
func (o *Attribute) Search(ctx context.Context, keyword string, genders []int32, pagination pagination.Pagination) (int64, []*chat.Attribute, error) {
filter := bson.M{}
if len(genders) > 0 {
@@ -162,3 +167,10 @@ func (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []st
}
return mongoutil.FindPage[*chat.Attribute](ctx, o.coll, filter, pagination)
}
+
+func (o *Attribute) Delete(ctx context.Context, userIDs []string) error {
+ if len(userIDs) == 0 {
+ return nil
+ }
+ return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}})
+}
diff --git a/pkg/common/db/model/chat/register.go b/pkg/common/db/model/chat/register.go
index 38695b561..b4784331d 100644
--- a/pkg/common/db/model/chat/register.go
+++ b/pkg/common/db/model/chat/register.go
@@ -16,11 +16,12 @@ package chat
import (
"context"
+ "time"
+
"github.com/openimsdk/tools/db/mongoutil"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
- "time"
"github.com/openimsdk/chat/pkg/common/db/table/chat"
"github.com/openimsdk/tools/errs"
@@ -57,3 +58,10 @@ func (o *Register) CountTotal(ctx context.Context, before *time.Time) (int64, er
}
return mongoutil.Count(ctx, o.coll, filter)
}
+
+func (o *Register) Delete(ctx context.Context, userIDs []string) error {
+ if len(userIDs) == 0 {
+ return nil
+ }
+ return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}})
+}
diff --git a/pkg/common/db/table/chat/account.go b/pkg/common/db/table/chat/account.go
index dba6d68d1..162975093 100644
--- a/pkg/common/db/table/chat/account.go
+++ b/pkg/common/db/table/chat/account.go
@@ -36,4 +36,5 @@ type AccountInterface interface {
Take(ctx context.Context, userId string) (*Account, error)
Update(ctx context.Context, userID string, data map[string]any) error
UpdatePassword(ctx context.Context, userId string, password string) error
+ Delete(ctx context.Context, userIDs []string) error
}
diff --git a/pkg/common/db/table/chat/attribute.go b/pkg/common/db/table/chat/attribute.go
index 57f62f7ef..d77f06176 100644
--- a/pkg/common/db/table/chat/attribute.go
+++ b/pkg/common/db/table/chat/attribute.go
@@ -16,8 +16,9 @@ package chat
import (
"context"
- "github.com/openimsdk/tools/db/pagination"
"time"
+
+ "github.com/openimsdk/tools/db/pagination"
)
type Attribute struct {
@@ -45,7 +46,7 @@ func (Attribute) TableName() string {
}
type AttributeInterface interface {
- //NewTx(tx any) AttributeInterface
+ // NewTx(tx any) AttributeInterface
Create(ctx context.Context, attribute ...*Attribute) error
Update(ctx context.Context, userID string, data map[string]any) error
Find(ctx context.Context, userIds []string) ([]*Attribute, error)
@@ -57,4 +58,5 @@ type AttributeInterface interface {
Take(ctx context.Context, userID string) (*Attribute, error)
SearchNormalUser(ctx context.Context, keyword string, forbiddenID []string, gender int32, pagination pagination.Pagination) (int64, []*Attribute, error)
SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*Attribute, error)
+ Delete(ctx context.Context, userIDs []string) error
}
diff --git a/pkg/common/db/table/chat/register.go b/pkg/common/db/table/chat/register.go
index 647037ef4..05d154774 100644
--- a/pkg/common/db/table/chat/register.go
+++ b/pkg/common/db/table/chat/register.go
@@ -34,7 +34,8 @@ func (Register) TableName() string {
}
type RegisterInterface interface {
- //NewTx(tx any) RegisterInterface
+ // NewTx(tx any) RegisterInterface
Create(ctx context.Context, registers ...*Register) error
CountTotal(ctx context.Context, before *time.Time) (int64, error)
+ Delete(ctx context.Context, userIDs []string) error
}
diff --git a/pkg/common/imapi/api.go b/pkg/common/imapi/api.go
index d5c6cca1e..6d5aff2fd 100644
--- a/pkg/common/imapi/api.go
+++ b/pkg/common/imapi/api.go
@@ -32,4 +32,5 @@ var (
getGroupsInfo = NewApiCaller[group.GetGroupsInfoReq, group.GetGroupsInfoResp]("/group/get_groups_info")
registerUserCount = NewApiCaller[user.UserRegisterCountReq, user.UserRegisterCountResp]("/statistics/user/register")
friendUserIDs = NewApiCaller[friend.GetFriendIDsReq, friend.GetFriendIDsResp]("/friend/get_friend_id")
+ accountCheck = NewApiCaller[user.AccountCheckReq, user.AccountCheckResp]("/user/account_check")
)
diff --git a/pkg/common/imapi/caller.go b/pkg/common/imapi/caller.go
index cfe0db688..c6ca3f1e6 100644
--- a/pkg/common/imapi/caller.go
+++ b/pkg/common/imapi/caller.go
@@ -19,6 +19,7 @@ import (
"sync"
"time"
+ "github.com/openimsdk/chat/pkg/eerrs"
"github.com/openimsdk/tools/log"
"github.com/openimsdk/protocol/auth"
@@ -40,6 +41,7 @@ type CallerInterface interface {
FindGroupInfo(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error)
UserRegisterCount(ctx context.Context, start int64, end int64) (map[string]int64, int64, error)
FriendUserIDs(ctx context.Context, userID string) ([]string, error)
+ AccountCheckSingle(ctx context.Context, userID string) (bool, error)
}
type Caller struct {
@@ -165,3 +167,15 @@ func (c *Caller) FriendUserIDs(ctx context.Context, userID string) ([]string, er
}
return resp.FriendIDs, nil
}
+
+// return true when isUserNotExist.
+func (c *Caller) AccountCheckSingle(ctx context.Context, userID string) (bool, error) {
+ resp, err := accountCheck.Call(ctx, c.imApi, &user.AccountCheckReq{CheckUserIDs: []string{userID}})
+ if err != nil {
+ return false, err
+ }
+ if resp.Results[0].AccountStatus == "registered" {
+ return false, eerrs.ErrAccountAlreadyRegister.Wrap()
+ }
+ return true, nil
+}
diff --git a/pkg/protocol/chat/chat.pb.go b/pkg/protocol/chat/chat.pb.go
index 16b85c937..992e9b2e5 100644
--- a/pkg/protocol/chat/chat.pb.go
+++ b/pkg/protocol/chat/chat.pb.go
@@ -15,7 +15,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.33.0
-// protoc v5.26.0
+// protoc v5.27.1
// source: chat/chat.proto
package chat
@@ -2580,15 +2580,202 @@ func (x *GetTokenForVideoMeetingResp) GetToken() string {
return ""
}
+type CheckUserExistReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *RegisterUserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user"`
+}
+
+func (x *CheckUserExistReq) Reset() {
+ *x = CheckUserExistReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_chat_chat_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CheckUserExistReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckUserExistReq) ProtoMessage() {}
+
+func (x *CheckUserExistReq) ProtoReflect() protoreflect.Message {
+ mi := &file_chat_chat_proto_msgTypes[39]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckUserExistReq.ProtoReflect.Descriptor instead.
+func (*CheckUserExistReq) Descriptor() ([]byte, []int) {
+ return file_chat_chat_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *CheckUserExistReq) GetUser() *RegisterUserInfo {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+type CheckUserExistResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid"`
+ IsRegistered bool `protobuf:"varint,2,opt,name=isRegistered,proto3" json:"isRegistered"`
+}
+
+func (x *CheckUserExistResp) Reset() {
+ *x = CheckUserExistResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_chat_chat_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CheckUserExistResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckUserExistResp) ProtoMessage() {}
+
+func (x *CheckUserExistResp) ProtoReflect() protoreflect.Message {
+ mi := &file_chat_chat_proto_msgTypes[40]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CheckUserExistResp.ProtoReflect.Descriptor instead.
+func (*CheckUserExistResp) Descriptor() ([]byte, []int) {
+ return file_chat_chat_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *CheckUserExistResp) GetUserid() string {
+ if x != nil {
+ return x.Userid
+ }
+ return ""
+}
+
+func (x *CheckUserExistResp) GetIsRegistered() bool {
+ if x != nil {
+ return x.IsRegistered
+ }
+ return false
+}
+
+type DelUserAccountReq struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"`
+}
+
+func (x *DelUserAccountReq) Reset() {
+ *x = DelUserAccountReq{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_chat_chat_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DelUserAccountReq) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DelUserAccountReq) ProtoMessage() {}
+
+func (x *DelUserAccountReq) ProtoReflect() protoreflect.Message {
+ mi := &file_chat_chat_proto_msgTypes[41]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DelUserAccountReq.ProtoReflect.Descriptor instead.
+func (*DelUserAccountReq) Descriptor() ([]byte, []int) {
+ return file_chat_chat_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *DelUserAccountReq) GetUserIDs() []string {
+ if x != nil {
+ return x.UserIDs
+ }
+ return nil
+}
+
+type DelUserAccountResp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DelUserAccountResp) Reset() {
+ *x = DelUserAccountResp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_chat_chat_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DelUserAccountResp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DelUserAccountResp) ProtoMessage() {}
+
+func (x *DelUserAccountResp) ProtoReflect() protoreflect.Message {
+ mi := &file_chat_chat_proto_msgTypes[42]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DelUserAccountResp.ProtoReflect.Descriptor instead.
+func (*DelUserAccountResp) Descriptor() ([]byte, []int) {
+ return file_chat_chat_proto_rawDescGZIP(), []int{42}
+}
+
var File_chat_chat_proto protoreflect.FileDescriptor
var file_chat_chat_proto_rawDesc = []byte{
0x0a, 0x0f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x12, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x1a, 0x1b,
- 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70,
- 0x65, 0x72, 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x73, 0x64, 0x6b,
- 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13,
+ 0x6f, 0x12, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x1a, 0x13,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73,
+ 0x70, 0x62, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e,
0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72,
@@ -2935,106 +3122,131 @@ var file_chat_chat_proto_rawDesc = []byte{
0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c,
0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xfd, 0x0b, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12,
- 0x51, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
- 0x6f, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
- 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68,
- 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68,
- 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
- 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55,
- 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e,
- 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72,
- 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f,
- 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
- 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c,
- 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x46, 0x69,
+ 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x46, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
+ 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x04, 0x75,
+ 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
+ 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x50,
+ 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c,
+ 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64,
+ 0x22, 0x2d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22,
+ 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0xa3, 0x0d, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x51,
+ 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
+ 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71,
+ 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73,
+ 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f,
+ 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
+ 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
+ 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73,
+ 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
+ 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+ 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
+ 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69,
+ 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x46, 0x69, 0x6e,
+ 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12,
+ 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69,
0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f,
- 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46,
- 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66,
- 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68,
- 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69,
- 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x61,
- 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12,
- 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65,
- 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
- 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c,
- 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64,
- 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55,
- 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x21,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e,
- 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73,
- 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43,
- 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
- 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65,
- 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
- 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65,
- 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f,
- 0x64, 0x65, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
- 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b,
- 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72,
- 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x52,
- 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6f, 0x70,
- 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
- 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
- 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
- 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69,
- 0x6e, 0x12, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
- 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
- 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
- 0x64, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
- 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71,
- 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52,
- 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70,
- 0x12, 0x51, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f,
- 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
- 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52,
- 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
- 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52,
- 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
- 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
- 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x46, 0x69, 0x6e,
- 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
- 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e,
+ 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
+ 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61,
+ 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+ 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
+ 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49,
+ 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x55,
+ 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73,
+ 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e,
0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64,
- 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12,
- 0x51, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
- 0x6b, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
- 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65,
+ 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70,
+ 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f,
+ 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
+ 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52,
+ 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
+ 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64,
+ 0x65, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
+ 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69,
+ 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
+ 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55,
+ 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e,
+ 0x12, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c,
+ 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
+ 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64,
+ 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52,
+ 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a,
+ 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65,
+ 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12,
+ 0x51, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
+ 0x64, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
+ 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65,
0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
- 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65,
- 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43,
- 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68,
- 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e,
+ 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65,
+ 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45,
+ 0x78, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68,
+ 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73,
0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68,
- 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e,
- 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55,
- 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
- 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72,
- 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54,
- 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74,
- 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61,
- 0x74, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64,
- 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x6f,
- 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f,
- 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69,
- 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
- 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x73, 0x64, 0x6b, 0x2f, 0x63,
- 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
- 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72,
+ 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64,
+ 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73,
+ 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55,
+ 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54,
+ 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65,
+ 0x72, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
+ 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74,
+ 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61,
+ 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62,
+ 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e,
+ 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62,
+ 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c,
+ 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69,
+ 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69,
+ 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
+ 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
+ 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a,
+ 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65,
+ 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46,
+ 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65,
+ 0x71, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
+ 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f,
+ 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2d, 0x5a, 0x2b, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d,
+ 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
}
var (
@@ -3049,7 +3261,7 @@ func file_chat_chat_proto_rawDescGZIP() []byte {
return file_chat_chat_proto_rawDescData
}
-var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 42)
+var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 46)
var file_chat_chat_proto_goTypes = []interface{}{
(*UserIdentity)(nil), // 0: openim.chat.UserIdentity
(*UpdateUserInfoReq)(nil), // 1: openim.chat.UpdateUserInfoReq
@@ -3090,86 +3302,95 @@ var file_chat_chat_proto_goTypes = []interface{}{
(*SearchUserInfoResp)(nil), // 36: openim.chat.SearchUserInfoResp
(*GetTokenForVideoMeetingReq)(nil), // 37: openim.chat.GetTokenForVideoMeetingReq
(*GetTokenForVideoMeetingResp)(nil), // 38: openim.chat.GetTokenForVideoMeetingResp
- nil, // 39: openim.chat.FindUserAccountResp.UserAccountMapEntry
- nil, // 40: openim.chat.FindAccountUserResp.AccountUserMapEntry
- nil, // 41: openim.chat.UserLoginCountResp.CountEntry
- (*wrapperspb.StringValue)(nil), // 42: openim.protobuf.StringValue
- (*wrapperspb.Int32Value)(nil), // 43: openim.protobuf.Int32Value
- (*wrapperspb.Int64Value)(nil), // 44: openim.protobuf.Int64Value
- (*common.UserPublicInfo)(nil), // 45: openim.chat.common.UserPublicInfo
- (*sdkws.RequestPagination)(nil), // 46: openim.sdkws.RequestPagination
- (*common.UserFullInfo)(nil), // 47: openim.chat.common.UserFullInfo
+ (*CheckUserExistReq)(nil), // 39: openim.chat.CheckUserExistReq
+ (*CheckUserExistResp)(nil), // 40: openim.chat.CheckUserExistResp
+ (*DelUserAccountReq)(nil), // 41: openim.chat.DelUserAccountReq
+ (*DelUserAccountResp)(nil), // 42: openim.chat.DelUserAccountResp
+ nil, // 43: openim.chat.FindUserAccountResp.UserAccountMapEntry
+ nil, // 44: openim.chat.FindAccountUserResp.AccountUserMapEntry
+ nil, // 45: openim.chat.UserLoginCountResp.CountEntry
+ (*wrapperspb.StringValue)(nil), // 46: openim.protobuf.StringValue
+ (*wrapperspb.Int32Value)(nil), // 47: openim.protobuf.Int32Value
+ (*wrapperspb.Int64Value)(nil), // 48: openim.protobuf.Int64Value
+ (*common.UserPublicInfo)(nil), // 49: openim.chat.common.UserPublicInfo
+ (*sdkws.RequestPagination)(nil), // 50: openim.sdkws.RequestPagination
+ (*common.UserFullInfo)(nil), // 51: openim.chat.common.UserFullInfo
}
var file_chat_chat_proto_depIdxs = []int32{
- 42, // 0: openim.chat.UpdateUserInfoReq.account:type_name -> openim.protobuf.StringValue
- 42, // 1: openim.chat.UpdateUserInfoReq.phoneNumber:type_name -> openim.protobuf.StringValue
- 42, // 2: openim.chat.UpdateUserInfoReq.areaCode:type_name -> openim.protobuf.StringValue
- 42, // 3: openim.chat.UpdateUserInfoReq.email:type_name -> openim.protobuf.StringValue
- 42, // 4: openim.chat.UpdateUserInfoReq.nickname:type_name -> openim.protobuf.StringValue
- 42, // 5: openim.chat.UpdateUserInfoReq.faceURL:type_name -> openim.protobuf.StringValue
- 43, // 6: openim.chat.UpdateUserInfoReq.gender:type_name -> openim.protobuf.Int32Value
- 43, // 7: openim.chat.UpdateUserInfoReq.level:type_name -> openim.protobuf.Int32Value
- 44, // 8: openim.chat.UpdateUserInfoReq.birth:type_name -> openim.protobuf.Int64Value
- 43, // 9: openim.chat.UpdateUserInfoReq.allowAddFriend:type_name -> openim.protobuf.Int32Value
- 43, // 10: openim.chat.UpdateUserInfoReq.allowBeep:type_name -> openim.protobuf.Int32Value
- 43, // 11: openim.chat.UpdateUserInfoReq.allowVibration:type_name -> openim.protobuf.Int32Value
- 43, // 12: openim.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> openim.protobuf.Int32Value
- 43, // 13: openim.chat.UpdateUserInfoReq.RegisterType:type_name -> openim.protobuf.Int32Value
- 45, // 14: openim.chat.FindUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo
- 46, // 15: openim.chat.SearchUserPublicInfoReq.pagination:type_name -> openim.sdkws.RequestPagination
- 45, // 16: openim.chat.SearchUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo
- 47, // 17: openim.chat.FindUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo
+ 46, // 0: openim.chat.UpdateUserInfoReq.account:type_name -> openim.protobuf.StringValue
+ 46, // 1: openim.chat.UpdateUserInfoReq.phoneNumber:type_name -> openim.protobuf.StringValue
+ 46, // 2: openim.chat.UpdateUserInfoReq.areaCode:type_name -> openim.protobuf.StringValue
+ 46, // 3: openim.chat.UpdateUserInfoReq.email:type_name -> openim.protobuf.StringValue
+ 46, // 4: openim.chat.UpdateUserInfoReq.nickname:type_name -> openim.protobuf.StringValue
+ 46, // 5: openim.chat.UpdateUserInfoReq.faceURL:type_name -> openim.protobuf.StringValue
+ 47, // 6: openim.chat.UpdateUserInfoReq.gender:type_name -> openim.protobuf.Int32Value
+ 47, // 7: openim.chat.UpdateUserInfoReq.level:type_name -> openim.protobuf.Int32Value
+ 48, // 8: openim.chat.UpdateUserInfoReq.birth:type_name -> openim.protobuf.Int64Value
+ 47, // 9: openim.chat.UpdateUserInfoReq.allowAddFriend:type_name -> openim.protobuf.Int32Value
+ 47, // 10: openim.chat.UpdateUserInfoReq.allowBeep:type_name -> openim.protobuf.Int32Value
+ 47, // 11: openim.chat.UpdateUserInfoReq.allowVibration:type_name -> openim.protobuf.Int32Value
+ 47, // 12: openim.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> openim.protobuf.Int32Value
+ 47, // 13: openim.chat.UpdateUserInfoReq.RegisterType:type_name -> openim.protobuf.Int32Value
+ 49, // 14: openim.chat.FindUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo
+ 50, // 15: openim.chat.SearchUserPublicInfoReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 49, // 16: openim.chat.SearchUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo
+ 51, // 17: openim.chat.FindUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo
13, // 18: openim.chat.RegisterUserReq.user:type_name -> openim.chat.RegisterUserInfo
13, // 19: openim.chat.AddUserAccountReq.user:type_name -> openim.chat.RegisterUserInfo
- 39, // 20: openim.chat.FindUserAccountResp.userAccountMap:type_name -> openim.chat.FindUserAccountResp.UserAccountMapEntry
- 40, // 21: openim.chat.FindAccountUserResp.accountUserMap:type_name -> openim.chat.FindAccountUserResp.AccountUserMapEntry
- 45, // 22: openim.chat.SignalRecord.inviterUserList:type_name -> openim.chat.common.UserPublicInfo
- 46, // 23: openim.chat.SearchUserFullInfoReq.pagination:type_name -> openim.sdkws.RequestPagination
- 47, // 24: openim.chat.SearchUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo
- 41, // 25: openim.chat.UserLoginCountResp.count:type_name -> openim.chat.UserLoginCountResp.CountEntry
- 46, // 26: openim.chat.SearchUserInfoReq.pagination:type_name -> openim.sdkws.RequestPagination
- 47, // 27: openim.chat.SearchUserInfoResp.users:type_name -> openim.chat.common.UserFullInfo
- 1, // 28: openim.chat.chat.UpdateUserInfo:input_type -> openim.chat.UpdateUserInfoReq
- 16, // 29: openim.chat.chat.AddUserAccount:input_type -> openim.chat.AddUserAccountReq
- 5, // 30: openim.chat.chat.SearchUserPublicInfo:input_type -> openim.chat.SearchUserPublicInfoReq
- 3, // 31: openim.chat.chat.FindUserPublicInfo:input_type -> openim.chat.FindUserPublicInfoReq
- 30, // 32: openim.chat.chat.SearchUserFullInfo:input_type -> openim.chat.SearchUserFullInfoReq
- 7, // 33: openim.chat.chat.FindUserFullInfo:input_type -> openim.chat.FindUserFullInfoReq
- 9, // 34: openim.chat.chat.SendVerifyCode:input_type -> openim.chat.SendVerifyCodeReq
- 11, // 35: openim.chat.chat.VerifyCode:input_type -> openim.chat.VerifyCodeReq
- 14, // 36: openim.chat.chat.RegisterUser:input_type -> openim.chat.RegisterUserReq
- 18, // 37: openim.chat.chat.Login:input_type -> openim.chat.LoginReq
- 19, // 38: openim.chat.chat.ResetPassword:input_type -> openim.chat.ResetPasswordReq
- 21, // 39: openim.chat.chat.ChangePassword:input_type -> openim.chat.ChangePasswordReq
- 23, // 40: openim.chat.chat.FindUserAccount:input_type -> openim.chat.FindUserAccountReq
- 25, // 41: openim.chat.chat.FindAccountUser:input_type -> openim.chat.FindAccountUserReq
- 28, // 42: openim.chat.chat.OpenIMCallback:input_type -> openim.chat.OpenIMCallbackReq
- 32, // 43: openim.chat.chat.UserLoginCount:input_type -> openim.chat.UserLoginCountReq
- 35, // 44: openim.chat.chat.SearchUserInfo:input_type -> openim.chat.SearchUserInfoReq
- 37, // 45: openim.chat.chat.GetTokenForVideoMeeting:input_type -> openim.chat.GetTokenForVideoMeetingReq
- 2, // 46: openim.chat.chat.UpdateUserInfo:output_type -> openim.chat.UpdateUserInfoResp
- 17, // 47: openim.chat.chat.AddUserAccount:output_type -> openim.chat.AddUserAccountResp
- 6, // 48: openim.chat.chat.SearchUserPublicInfo:output_type -> openim.chat.SearchUserPublicInfoResp
- 4, // 49: openim.chat.chat.FindUserPublicInfo:output_type -> openim.chat.FindUserPublicInfoResp
- 31, // 50: openim.chat.chat.SearchUserFullInfo:output_type -> openim.chat.SearchUserFullInfoResp
- 8, // 51: openim.chat.chat.FindUserFullInfo:output_type -> openim.chat.FindUserFullInfoResp
- 10, // 52: openim.chat.chat.SendVerifyCode:output_type -> openim.chat.SendVerifyCodeResp
- 12, // 53: openim.chat.chat.VerifyCode:output_type -> openim.chat.VerifyCodeResp
- 15, // 54: openim.chat.chat.RegisterUser:output_type -> openim.chat.RegisterUserResp
- 34, // 55: openim.chat.chat.Login:output_type -> openim.chat.LoginResp
- 20, // 56: openim.chat.chat.ResetPassword:output_type -> openim.chat.ResetPasswordResp
- 22, // 57: openim.chat.chat.ChangePassword:output_type -> openim.chat.ChangePasswordResp
- 24, // 58: openim.chat.chat.FindUserAccount:output_type -> openim.chat.FindUserAccountResp
- 26, // 59: openim.chat.chat.FindAccountUser:output_type -> openim.chat.FindAccountUserResp
- 29, // 60: openim.chat.chat.OpenIMCallback:output_type -> openim.chat.OpenIMCallbackResp
- 33, // 61: openim.chat.chat.UserLoginCount:output_type -> openim.chat.UserLoginCountResp
- 36, // 62: openim.chat.chat.SearchUserInfo:output_type -> openim.chat.SearchUserInfoResp
- 38, // 63: openim.chat.chat.GetTokenForVideoMeeting:output_type -> openim.chat.GetTokenForVideoMeetingResp
- 46, // [46:64] is the sub-list for method output_type
- 28, // [28:46] is the sub-list for method input_type
- 28, // [28:28] is the sub-list for extension type_name
- 28, // [28:28] is the sub-list for extension extendee
- 0, // [0:28] is the sub-list for field type_name
+ 43, // 20: openim.chat.FindUserAccountResp.userAccountMap:type_name -> openim.chat.FindUserAccountResp.UserAccountMapEntry
+ 44, // 21: openim.chat.FindAccountUserResp.accountUserMap:type_name -> openim.chat.FindAccountUserResp.AccountUserMapEntry
+ 49, // 22: openim.chat.SignalRecord.inviterUserList:type_name -> openim.chat.common.UserPublicInfo
+ 50, // 23: openim.chat.SearchUserFullInfoReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 51, // 24: openim.chat.SearchUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo
+ 45, // 25: openim.chat.UserLoginCountResp.count:type_name -> openim.chat.UserLoginCountResp.CountEntry
+ 50, // 26: openim.chat.SearchUserInfoReq.pagination:type_name -> openim.sdkws.RequestPagination
+ 51, // 27: openim.chat.SearchUserInfoResp.users:type_name -> openim.chat.common.UserFullInfo
+ 13, // 28: openim.chat.CheckUserExistReq.user:type_name -> openim.chat.RegisterUserInfo
+ 1, // 29: openim.chat.chat.UpdateUserInfo:input_type -> openim.chat.UpdateUserInfoReq
+ 16, // 30: openim.chat.chat.AddUserAccount:input_type -> openim.chat.AddUserAccountReq
+ 5, // 31: openim.chat.chat.SearchUserPublicInfo:input_type -> openim.chat.SearchUserPublicInfoReq
+ 3, // 32: openim.chat.chat.FindUserPublicInfo:input_type -> openim.chat.FindUserPublicInfoReq
+ 30, // 33: openim.chat.chat.SearchUserFullInfo:input_type -> openim.chat.SearchUserFullInfoReq
+ 7, // 34: openim.chat.chat.FindUserFullInfo:input_type -> openim.chat.FindUserFullInfoReq
+ 9, // 35: openim.chat.chat.SendVerifyCode:input_type -> openim.chat.SendVerifyCodeReq
+ 11, // 36: openim.chat.chat.VerifyCode:input_type -> openim.chat.VerifyCodeReq
+ 14, // 37: openim.chat.chat.RegisterUser:input_type -> openim.chat.RegisterUserReq
+ 18, // 38: openim.chat.chat.Login:input_type -> openim.chat.LoginReq
+ 19, // 39: openim.chat.chat.ResetPassword:input_type -> openim.chat.ResetPasswordReq
+ 21, // 40: openim.chat.chat.ChangePassword:input_type -> openim.chat.ChangePasswordReq
+ 39, // 41: openim.chat.chat.CheckUserExist:input_type -> openim.chat.CheckUserExistReq
+ 41, // 42: openim.chat.chat.DelUserAccount:input_type -> openim.chat.DelUserAccountReq
+ 23, // 43: openim.chat.chat.FindUserAccount:input_type -> openim.chat.FindUserAccountReq
+ 25, // 44: openim.chat.chat.FindAccountUser:input_type -> openim.chat.FindAccountUserReq
+ 28, // 45: openim.chat.chat.OpenIMCallback:input_type -> openim.chat.OpenIMCallbackReq
+ 32, // 46: openim.chat.chat.UserLoginCount:input_type -> openim.chat.UserLoginCountReq
+ 35, // 47: openim.chat.chat.SearchUserInfo:input_type -> openim.chat.SearchUserInfoReq
+ 37, // 48: openim.chat.chat.GetTokenForVideoMeeting:input_type -> openim.chat.GetTokenForVideoMeetingReq
+ 2, // 49: openim.chat.chat.UpdateUserInfo:output_type -> openim.chat.UpdateUserInfoResp
+ 17, // 50: openim.chat.chat.AddUserAccount:output_type -> openim.chat.AddUserAccountResp
+ 6, // 51: openim.chat.chat.SearchUserPublicInfo:output_type -> openim.chat.SearchUserPublicInfoResp
+ 4, // 52: openim.chat.chat.FindUserPublicInfo:output_type -> openim.chat.FindUserPublicInfoResp
+ 31, // 53: openim.chat.chat.SearchUserFullInfo:output_type -> openim.chat.SearchUserFullInfoResp
+ 8, // 54: openim.chat.chat.FindUserFullInfo:output_type -> openim.chat.FindUserFullInfoResp
+ 10, // 55: openim.chat.chat.SendVerifyCode:output_type -> openim.chat.SendVerifyCodeResp
+ 12, // 56: openim.chat.chat.VerifyCode:output_type -> openim.chat.VerifyCodeResp
+ 15, // 57: openim.chat.chat.RegisterUser:output_type -> openim.chat.RegisterUserResp
+ 34, // 58: openim.chat.chat.Login:output_type -> openim.chat.LoginResp
+ 20, // 59: openim.chat.chat.ResetPassword:output_type -> openim.chat.ResetPasswordResp
+ 22, // 60: openim.chat.chat.ChangePassword:output_type -> openim.chat.ChangePasswordResp
+ 40, // 61: openim.chat.chat.CheckUserExist:output_type -> openim.chat.CheckUserExistResp
+ 42, // 62: openim.chat.chat.DelUserAccount:output_type -> openim.chat.DelUserAccountResp
+ 24, // 63: openim.chat.chat.FindUserAccount:output_type -> openim.chat.FindUserAccountResp
+ 26, // 64: openim.chat.chat.FindAccountUser:output_type -> openim.chat.FindAccountUserResp
+ 29, // 65: openim.chat.chat.OpenIMCallback:output_type -> openim.chat.OpenIMCallbackResp
+ 33, // 66: openim.chat.chat.UserLoginCount:output_type -> openim.chat.UserLoginCountResp
+ 36, // 67: openim.chat.chat.SearchUserInfo:output_type -> openim.chat.SearchUserInfoResp
+ 38, // 68: openim.chat.chat.GetTokenForVideoMeeting:output_type -> openim.chat.GetTokenForVideoMeetingResp
+ 49, // [49:69] is the sub-list for method output_type
+ 29, // [29:49] is the sub-list for method input_type
+ 29, // [29:29] is the sub-list for extension type_name
+ 29, // [29:29] is the sub-list for extension extendee
+ 0, // [0:29] is the sub-list for field type_name
}
func init() { file_chat_chat_proto_init() }
@@ -3646,6 +3867,54 @@ func file_chat_chat_proto_init() {
return nil
}
}
+ file_chat_chat_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CheckUserExistReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_chat_chat_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CheckUserExistResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_chat_chat_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DelUserAccountReq); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_chat_chat_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DelUserAccountResp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -3653,7 +3922,7 @@ func file_chat_chat_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_chat_chat_proto_rawDesc,
NumEnums: 0,
- NumMessages: 42,
+ NumMessages: 46,
NumExtensions: 0,
NumServices: 1,
},
@@ -3694,6 +3963,8 @@ type ChatClient interface {
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error)
ResetPassword(ctx context.Context, in *ResetPasswordReq, opts ...grpc.CallOption) (*ResetPasswordResp, error)
ChangePassword(ctx context.Context, in *ChangePasswordReq, opts ...grpc.CallOption) (*ChangePasswordResp, error)
+ CheckUserExist(ctx context.Context, in *CheckUserExistReq, opts ...grpc.CallOption) (*CheckUserExistResp, error)
+ DelUserAccount(ctx context.Context, in *DelUserAccountReq, opts ...grpc.CallOption) (*DelUserAccountResp, error)
FindUserAccount(ctx context.Context, in *FindUserAccountReq, opts ...grpc.CallOption) (*FindUserAccountResp, error)
FindAccountUser(ctx context.Context, in *FindAccountUserReq, opts ...grpc.CallOption) (*FindAccountUserResp, error)
OpenIMCallback(ctx context.Context, in *OpenIMCallbackReq, opts ...grpc.CallOption) (*OpenIMCallbackResp, error)
@@ -3820,6 +4091,24 @@ func (c *chatClient) ChangePassword(ctx context.Context, in *ChangePasswordReq,
return out, nil
}
+func (c *chatClient) CheckUserExist(ctx context.Context, in *CheckUserExistReq, opts ...grpc.CallOption) (*CheckUserExistResp, error) {
+ out := new(CheckUserExistResp)
+ err := c.cc.Invoke(ctx, "/openim.chat.chat/CheckUserExist", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *chatClient) DelUserAccount(ctx context.Context, in *DelUserAccountReq, opts ...grpc.CallOption) (*DelUserAccountResp, error) {
+ out := new(DelUserAccountResp)
+ err := c.cc.Invoke(ctx, "/openim.chat.chat/DelUserAccount", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *chatClient) FindUserAccount(ctx context.Context, in *FindUserAccountReq, opts ...grpc.CallOption) (*FindUserAccountResp, error) {
out := new(FindUserAccountResp)
err := c.cc.Invoke(ctx, "/openim.chat.chat/FindUserAccount", in, out, opts...)
@@ -3891,6 +4180,8 @@ type ChatServer interface {
Login(context.Context, *LoginReq) (*LoginResp, error)
ResetPassword(context.Context, *ResetPasswordReq) (*ResetPasswordResp, error)
ChangePassword(context.Context, *ChangePasswordReq) (*ChangePasswordResp, error)
+ CheckUserExist(context.Context, *CheckUserExistReq) (*CheckUserExistResp, error)
+ DelUserAccount(context.Context, *DelUserAccountReq) (*DelUserAccountResp, error)
FindUserAccount(context.Context, *FindUserAccountReq) (*FindUserAccountResp, error)
FindAccountUser(context.Context, *FindAccountUserReq) (*FindAccountUserResp, error)
OpenIMCallback(context.Context, *OpenIMCallbackReq) (*OpenIMCallbackResp, error)
@@ -3941,6 +4232,12 @@ func (*UnimplementedChatServer) ResetPassword(context.Context, *ResetPasswordReq
func (*UnimplementedChatServer) ChangePassword(context.Context, *ChangePasswordReq) (*ChangePasswordResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
}
+func (*UnimplementedChatServer) CheckUserExist(context.Context, *CheckUserExistReq) (*CheckUserExistResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CheckUserExist not implemented")
+}
+func (*UnimplementedChatServer) DelUserAccount(context.Context, *DelUserAccountReq) (*DelUserAccountResp, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DelUserAccount not implemented")
+}
func (*UnimplementedChatServer) FindUserAccount(context.Context, *FindUserAccountReq) (*FindUserAccountResp, error) {
return nil, status.Errorf(codes.Unimplemented, "method FindUserAccount not implemented")
}
@@ -4180,6 +4477,42 @@ func _Chat_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
+func _Chat_CheckUserExist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CheckUserExistReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ChatServer).CheckUserExist(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/openim.chat.chat/CheckUserExist",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ChatServer).CheckUserExist(ctx, req.(*CheckUserExistReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _Chat_DelUserAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DelUserAccountReq)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ChatServer).DelUserAccount(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/openim.chat.chat/DelUserAccount",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ChatServer).DelUserAccount(ctx, req.(*DelUserAccountReq))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _Chat_FindUserAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FindUserAccountReq)
if err := dec(in); err != nil {
@@ -4340,6 +4673,14 @@ var _Chat_serviceDesc = grpc.ServiceDesc{
MethodName: "ChangePassword",
Handler: _Chat_ChangePassword_Handler,
},
+ {
+ MethodName: "CheckUserExist",
+ Handler: _Chat_CheckUserExist_Handler,
+ },
+ {
+ MethodName: "DelUserAccount",
+ Handler: _Chat_DelUserAccount_Handler,
+ },
{
MethodName: "FindUserAccount",
Handler: _Chat_FindUserAccount_Handler,
diff --git a/pkg/protocol/chat/chat.proto b/pkg/protocol/chat/chat.proto
index a11c2cd42..c66bbd62c 100644
--- a/pkg/protocol/chat/chat.proto
+++ b/pkg/protocol/chat/chat.proto
@@ -14,9 +14,11 @@
syntax = "proto3";
package openim.chat;
-import "wrapperspb/wrapperspb.proto";
-import "sdkws/sdkws.proto";
+
import "common/common.proto";
+import "sdkws/sdkws.proto";
+import "wrapperspb/wrapperspb.proto";
+
option go_package = "github.com/openimsdk/chat/pkg/protocol/chat";
message UserIdentity {
@@ -28,54 +30,53 @@ message UserIdentity {
string account = 6;
}
-
-message UpdateUserInfoReq{
- string userID = 1;
- openim.protobuf.StringValue account = 2;
- openim.protobuf.StringValue phoneNumber = 3;
- openim.protobuf.StringValue areaCode = 4;
- openim.protobuf.StringValue email = 5;
- openim.protobuf.StringValue nickname = 6;
- openim.protobuf.StringValue faceURL = 7;
- openim.protobuf.Int32Value gender = 8;
- openim.protobuf.Int32Value level = 9;
+message UpdateUserInfoReq {
+ string userID = 1;
+ openim.protobuf.StringValue account = 2;
+ openim.protobuf.StringValue phoneNumber = 3;
+ openim.protobuf.StringValue areaCode = 4;
+ openim.protobuf.StringValue email = 5;
+ openim.protobuf.StringValue nickname = 6;
+ openim.protobuf.StringValue faceURL = 7;
+ openim.protobuf.Int32Value gender = 8;
+ openim.protobuf.Int32Value level = 9;
openim.protobuf.Int64Value birth = 10;
- openim.protobuf.Int32Value allowAddFriend = 11;
- openim.protobuf.Int32Value allowBeep = 12;
- openim.protobuf.Int32Value allowVibration = 13;
- openim.protobuf.Int32Value globalRecvMsgOpt = 14;
+ openim.protobuf.Int32Value allowAddFriend = 11;
+ openim.protobuf.Int32Value allowBeep = 12;
+ openim.protobuf.Int32Value allowVibration = 13;
+ openim.protobuf.Int32Value globalRecvMsgOpt = 14;
openim.protobuf.Int32Value RegisterType = 15;
}
-message UpdateUserInfoResp{
+message UpdateUserInfoResp {
string faceUrl = 1;
string nickName = 2;
}
-message FindUserPublicInfoReq{
- repeated string userIDs = 1;
+message FindUserPublicInfoReq {
+ repeated string userIDs = 1;
}
-message FindUserPublicInfoResp{
+message FindUserPublicInfoResp {
repeated openim.chat.common.UserPublicInfo users = 1;
}
-message SearchUserPublicInfoReq{
+message SearchUserPublicInfoReq {
string keyword = 1;
openim.sdkws.RequestPagination pagination = 2;
int32 genders = 3;
}
-message SearchUserPublicInfoResp{
+message SearchUserPublicInfoResp {
uint32 total = 1;
repeated openim.chat.common.UserPublicInfo users = 2;
}
-message FindUserFullInfoReq{
+message FindUserFullInfoReq {
repeated string userIDs = 1;
}
-message FindUserFullInfoResp{
+message FindUserFullInfoResp {
repeated openim.chat.common.UserFullInfo users = 1;
}
@@ -90,8 +91,7 @@ message SendVerifyCodeReq {
string email = 8;
}
-message SendVerifyCodeResp {
-}
+message SendVerifyCodeResp {}
message VerifyCodeReq {
string areaCode = 1;
@@ -100,8 +100,7 @@ message VerifyCodeReq {
string email = 4;
}
-message VerifyCodeResp {
-}
+message VerifyCodeResp {}
message RegisterUserInfo {
string userID = 1;
@@ -132,15 +131,14 @@ message RegisterUserResp {
string chatToken = 3;
}
-message AddUserAccountReq{
+message AddUserAccountReq {
string ip = 1;
string deviceID = 2;
int32 platform = 3;
RegisterUserInfo user = 4;
}
-message AddUserAccountResp{
-}
+message AddUserAccountResp {}
message LoginReq {
string areaCode = 1;
@@ -162,8 +160,7 @@ message ResetPasswordReq {
string email = 5;
}
-message ResetPasswordResp {
-}
+message ResetPasswordResp {}
message ChangePasswordReq {
string userID = 1;
@@ -171,14 +168,12 @@ message ChangePasswordReq {
string newPassword = 3;
}
-message ChangePasswordResp {
-}
+message ChangePasswordResp {}
message FindUserAccountReq {
repeated string userIDs = 1;
}
-
message FindUserAccountResp {
map userAccountMap = 1; // userID account
}
@@ -213,28 +208,26 @@ message OpenIMCallbackReq {
string body = 2;
}
-message OpenIMCallbackResp {
-
-}
+message OpenIMCallbackResp {}
-message SearchUserFullInfoReq{
+message SearchUserFullInfoReq {
string keyword = 1;
openim.sdkws.RequestPagination pagination = 2;
int32 genders = 3;
int32 normal = 4;
}
-message SearchUserFullInfoResp{
+message SearchUserFullInfoResp {
uint32 total = 1;
repeated openim.chat.common.UserFullInfo users = 2;
}
-message UserLoginCountReq{
+message UserLoginCountReq {
int64 start = 1;
int64 end = 2;
}
-message UserLoginCountResp{
+message UserLoginCountResp {
int64 loginCount = 1;
int64 unloginCount = 2;
map count = 3;
@@ -245,7 +238,7 @@ message LoginResp {
string userID = 3;
}
-message SearchUserInfoReq{
+message SearchUserInfoReq {
string keyword = 1;
openim.sdkws.RequestPagination pagination = 2;
repeated int32 genders = 3;
@@ -267,34 +260,49 @@ message GetTokenForVideoMeetingResp {
string token = 2;
}
+message CheckUserExistReq {
+ RegisterUserInfo user = 1;
+}
+
+message CheckUserExistResp {
+ string userid = 1;
+ bool isRegistered = 2;
+}
+
+message DelUserAccountReq {
+ repeated string userIDs = 1;
+}
+message DelUserAccountResp {}
+
service chat {
// Edit personal information - called by the user or an administrator
- rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
- rpc AddUserAccount(AddUserAccountReq) returns(AddUserAccountResp);
+ rpc UpdateUserInfo(UpdateUserInfoReq) returns (UpdateUserInfoResp);
+ rpc AddUserAccount(AddUserAccountReq) returns (AddUserAccountResp);
// Get user's public information - called by strangers
- rpc SearchUserPublicInfo(SearchUserPublicInfoReq) returns(SearchUserPublicInfoResp);
- rpc FindUserPublicInfo(FindUserPublicInfoReq) returns(FindUserPublicInfoResp);
+ rpc SearchUserPublicInfo(SearchUserPublicInfoReq) returns (SearchUserPublicInfoResp);
+ rpc FindUserPublicInfo(FindUserPublicInfoReq) returns (FindUserPublicInfoResp);
// Search user information - called by administrators, other users get public fields
- rpc SearchUserFullInfo(SearchUserFullInfoReq) returns(SearchUserFullInfoResp);
- rpc FindUserFullInfo(FindUserFullInfoReq) returns(FindUserFullInfoResp);
-
- rpc SendVerifyCode(SendVerifyCodeReq) returns(SendVerifyCodeResp);
- rpc VerifyCode(VerifyCodeReq) returns(VerifyCodeResp);
- rpc RegisterUser(RegisterUserReq) returns(RegisterUserResp);
- rpc Login(LoginReq) returns(LoginResp);
- rpc ResetPassword(ResetPasswordReq) returns(ResetPasswordResp);
- rpc ChangePassword(ChangePasswordReq) returns(ChangePasswordResp);
-
- rpc FindUserAccount(FindUserAccountReq) returns(FindUserAccountResp);
- rpc FindAccountUser(FindAccountUserReq) returns(FindAccountUserResp);
-
- rpc OpenIMCallback(OpenIMCallbackReq) returns(OpenIMCallbackResp);
+ rpc SearchUserFullInfo(SearchUserFullInfoReq) returns (SearchUserFullInfoResp);
+ rpc FindUserFullInfo(FindUserFullInfoReq) returns (FindUserFullInfoResp);
+
+ rpc SendVerifyCode(SendVerifyCodeReq) returns (SendVerifyCodeResp);
+ rpc VerifyCode(VerifyCodeReq) returns (VerifyCodeResp);
+ rpc RegisterUser(RegisterUserReq) returns (RegisterUserResp);
+ rpc Login(LoginReq) returns (LoginResp);
+ rpc ResetPassword(ResetPasswordReq) returns (ResetPasswordResp);
+ rpc ChangePassword(ChangePasswordReq) returns (ChangePasswordResp);
+ rpc CheckUserExist(CheckUserExistReq) returns (CheckUserExistResp);
+ rpc DelUserAccount(DelUserAccountReq) returns (DelUserAccountResp);
+
+ rpc FindUserAccount(FindUserAccountReq) returns (FindUserAccountResp);
+ rpc FindAccountUser(FindAccountUserReq) returns (FindAccountUserResp);
+ rpc OpenIMCallback(OpenIMCallbackReq) returns (OpenIMCallbackResp);
// Statistics
rpc UserLoginCount(UserLoginCountReq) returns (UserLoginCountResp);
- rpc SearchUserInfo(SearchUserInfoReq)returns(SearchUserInfoResp);
+ rpc SearchUserInfo(SearchUserInfoReq) returns (SearchUserInfoResp);
// Audio/video call and video meeting
rpc GetTokenForVideoMeeting(GetTokenForVideoMeetingReq) returns (GetTokenForVideoMeetingResp);
-}
\ No newline at end of file
+}
diff --git a/pkg/rpclient/chat/chat.go b/pkg/rpclient/chat/chat.go
index d259693c3..34a82ff24 100644
--- a/pkg/rpclient/chat/chat.go
+++ b/pkg/rpclient/chat/chat.go
@@ -103,3 +103,13 @@ func (o *ChatClient) UpdateUser(ctx context.Context, req *chat.UpdateUserInfoReq
_, err := o.client.UpdateUserInfo(ctx, req)
return err
}
+
+func (o *ChatClient) CheckUserExist(ctx context.Context, req *chat.CheckUserExistReq) (resp *chat.CheckUserExistResp, err error) {
+ resp, err = o.client.CheckUserExist(ctx, req)
+ return resp, err
+}
+
+func (o *ChatClient) DelUserAccount(ctx context.Context, req *chat.DelUserAccountReq) (resp *chat.DelUserAccountResp, err error) {
+ resp, err = o.client.DelUserAccount(ctx, req)
+ return resp, err
+}
From 6936944310207d1c44a5a0f420b0298b25b2a012 Mon Sep 17 00:00:00 2001
From: chao <48119764+withchao@users.noreply.github.com>
Date: Wed, 3 Jul 2024 14:28:04 +0800
Subject: [PATCH 22/26] update gomake version (#558)
* update gomake version
* update gomake version
---
Dockerfile | 2 +-
go.mod | 2 +-
go.sum | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index ed17db92e..8090d9682 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -43,7 +43,7 @@ COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/
COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
-RUN go get github.com/openimsdk/gomake@v0.0.9
+RUN go get github.com/openimsdk/v0.0.14-alpha.5
# Set the command to run when the container starts
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"]
diff --git a/go.mod b/go.mod
index 89b791bd6..723dd02e8 100644
--- a/go.mod
+++ b/go.mod
@@ -25,7 +25,7 @@ require (
require (
github.com/livekit/protocol v1.10.1
github.com/mitchellh/mapstructure v1.5.0
- github.com/openimsdk/gomake v0.0.9
+ github.com/openimsdk/gomake v0.0.14-alpha.5
github.com/openimsdk/protocol v0.0.63
github.com/openimsdk/tools v0.0.49-alpha.24
github.com/redis/go-redis/v9 v9.5.1
diff --git a/go.sum b/go.sum
index 012886d2b..6587e0cdc 100644
--- a/go.sum
+++ b/go.sum
@@ -185,8 +185,8 @@ github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADym
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
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/openimsdk/gomake v0.0.9 h1:ouf25ygN2PMQ68Gfgns/EQRPiLPnp+77SIr68GfE+n4=
-github.com/openimsdk/gomake v0.0.9/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
+github.com/openimsdk/gomake v0.0.14-alpha.5 h1:VY9c5x515lTfmdhhPjMvR3BBRrRquAUCFsz7t7vbv7Y=
+github.com/openimsdk/gomake v0.0.14-alpha.5/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI=
github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ=
github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8=
github.com/openimsdk/tools v0.0.49-alpha.24 h1:lJsqnjTPujnr91LRQ6QmcTliMIa4fMOBSTri6rFz2ek=
From 75a9583a39e78d6a95f823fbb907ae5906c447eb Mon Sep 17 00:00:00 2001
From: blooming <37789413+Bloomingg@users.noreply.github.com>
Date: Fri, 26 Jul 2024 18:03:56 +0800
Subject: [PATCH 23/26] fix: keep default livekit key same in config (#560)
---
livekit/livekit.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/livekit/livekit.yaml b/livekit/livekit.yaml
index 5d1f955f4..e199bbf00 100644
--- a/livekit/livekit.yaml
+++ b/livekit/livekit.yaml
@@ -6,4 +6,4 @@ rtc:
use_external_ip: true
enable_loopback_candidate: false
keys:
- APIftrpEkL9x2pa: 23ztfSqsfQ8hKkHzHTl3Z4bvaxro0snjk5jwbp5p6Q3
\ No newline at end of file
+ APIGPW3gnFTzqHH: 23ztfSqsfQ8hKkHzHTl3Z4bvaxro0snjk5jwbp5p6Q3
\ No newline at end of file
From 858136520899a8ce1249fbcb61ce72d6ebb19380 Mon Sep 17 00:00:00 2001
From: chao <48119764+withchao@users.noreply.github.com>
Date: Fri, 2 Aug 2024 17:38:17 +0800
Subject: [PATCH 24/26] feat: update chat version (#562)
* update gomake version
* update gomake version
* update version
---
pkg/common/config/version | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/common/config/version b/pkg/common/config/version
index b7c8e167d..4e2cea3bb 100644
--- a/pkg/common/config/version
+++ b/pkg/common/config/version
@@ -1 +1 @@
-v1.7.0
\ No newline at end of file
+v1.8.0
\ No newline at end of file
From 2e7893ef0a3b2aabbfa7a7e3b78b25aedaad1dcd Mon Sep 17 00:00:00 2001
From: icey-yu <119291641+icey-yu@users.noreply.github.com>
Date: Fri, 2 Aug 2024 18:27:12 +0800
Subject: [PATCH 25/26] fix:create token can set expire time (#553)
Co-authored-by: skiffer-git <72860476+skiffer-git@users.noreply.github.com>
---
internal/rpc/admin/token.go | 7 ++++---
pkg/common/db/cache/token.go | 21 ++++++++++++++++++++-
pkg/common/db/database/admin.go | 17 ++++++++++++++---
pkg/common/tokenverify/token_verify.go | 8 ++++----
4 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/internal/rpc/admin/token.go b/internal/rpc/admin/token.go
index a98511d74..c06ad344b 100644
--- a/internal/rpc/admin/token.go
+++ b/internal/rpc/admin/token.go
@@ -23,12 +23,13 @@ import (
"github.com/redis/go-redis/v9"
)
-func (o *adminServer) CreateToken(ctx context.Context, req *adminpb.CreateTokenReq) (*adminpb.CreateTokenResp, error) {
- token, err := o.Token.CreateToken(req.UserID, req.UserType)
+func (o *adminServer) CreateToken(ctx context.Context, req *admin.CreateTokenReq) (*admin.CreateTokenResp, error) {
+ token, expire, err := o.Token.CreateToken(req.UserID, req.UserType)
+
if err != nil {
return nil, err
}
- err = o.Database.CacheToken(ctx, req.UserID, token)
+ err = o.Database.CacheToken(ctx, req.UserID, token, expire)
if err != nil {
return nil, err
}
diff --git a/pkg/common/db/cache/token.go b/pkg/common/db/cache/token.go
index 9da188a7e..a57571ebc 100644
--- a/pkg/common/db/cache/token.go
+++ b/pkg/common/db/cache/token.go
@@ -18,6 +18,7 @@ import (
"context"
"github.com/openimsdk/tools/utils/stringutil"
+ "time"
"github.com/openimsdk/tools/errs"
"github.com/redis/go-redis/v9"
@@ -29,12 +30,14 @@ const (
type TokenInterface interface {
AddTokenFlag(ctx context.Context, userID string, token string, flag int) error
+ AddTokenFlagNXEx(ctx context.Context, userID string, token string, flag int, expire time.Duration) (bool, error)
GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error)
DeleteTokenByUid(ctx context.Context, userID string) error
}
type TokenCacheRedis struct {
- rdb redis.UniversalClient
+ rdb redis.UniversalClient
+ accessExpire int64
}
func NewTokenInterface(rdb redis.UniversalClient) *TokenCacheRedis {
@@ -46,6 +49,22 @@ func (t *TokenCacheRedis) AddTokenFlag(ctx context.Context, userID string, token
return errs.Wrap(t.rdb.HSet(ctx, key, token, flag).Err())
}
+func (t *TokenCacheRedis) AddTokenFlagNXEx(ctx context.Context, userID string, token string, flag int, expire time.Duration) (bool, error) {
+ key := chatToken + userID
+ isSet, err := t.rdb.HSetNX(ctx, key, token, flag).Result()
+ if err != nil {
+ return false, errs.Wrap(err)
+ }
+ if !isSet {
+ // key already exists
+ return false, nil
+ }
+ if err = t.rdb.Expire(ctx, key, expire).Err(); err != nil {
+ return false, errs.Wrap(err)
+ }
+ return isSet, nil
+}
+
func (t *TokenCacheRedis) GetTokensWithoutError(ctx context.Context, userID string) (map[string]int32, error) {
key := chatToken + userID
m, err := t.rdb.HGetAll(ctx, key).Result()
diff --git a/pkg/common/db/database/admin.go b/pkg/common/db/database/admin.go
index 2b867f5f9..820864df1 100644
--- a/pkg/common/db/database/admin.go
+++ b/pkg/common/db/database/admin.go
@@ -16,6 +16,7 @@ package database
import (
"context"
+ "time"
"github.com/openimsdk/chat/pkg/common/db/cache"
"github.com/openimsdk/protocol/constant"
@@ -74,7 +75,7 @@ type AdminDatabaseInterface interface {
DelUserLimitLogin(ctx context.Context, ms []*admindb.LimitUserLoginIP) error
CountLimitUserLoginIP(ctx context.Context, userID string) (uint32, error)
GetLimitUserLoginIP(ctx context.Context, userID string, ip string) (*admindb.LimitUserLoginIP, error)
- CacheToken(ctx context.Context, userID string, token string) error
+ CacheToken(ctx context.Context, userID string, token string, expire time.Duration) error
GetTokens(ctx context.Context, userID string) (map[string]int32, error)
DeleteToken(ctx context.Context, userID string) error
}
@@ -325,8 +326,18 @@ func (o *AdminDatabase) GetLimitUserLoginIP(ctx context.Context, userID string,
return o.limitUserLoginIP.Take(ctx, userID, ip)
}
-func (o *AdminDatabase) CacheToken(ctx context.Context, userID string, token string) error {
- return o.cache.AddTokenFlag(ctx, userID, token, constant.NormalToken)
+func (o *AdminDatabase) CacheToken(ctx context.Context, userID string, token string, expire time.Duration) error {
+ isSet, err := o.cache.AddTokenFlagNXEx(ctx, userID, token, constant.NormalToken, expire)
+ if err != nil {
+ return err
+ }
+ if !isSet {
+ // already exists, update
+ if err = o.cache.AddTokenFlag(ctx, userID, token, constant.NormalToken); err != nil {
+ return err
+ }
+ }
+ return nil
}
func (o *AdminDatabase) GetTokens(ctx context.Context, userID string) (map[string]int32, error) {
diff --git a/pkg/common/tokenverify/token_verify.go b/pkg/common/tokenverify/token_verify.go
index 9fdfbac54..3c35ffa71 100644
--- a/pkg/common/tokenverify/token_verify.go
+++ b/pkg/common/tokenverify/token_verify.go
@@ -86,16 +86,16 @@ func (t *Token) getToken(str string) (string, int32, error) {
}
}
-func (t *Token) CreateToken(UserID string, userType int32) (string, error) {
+func (t *Token) CreateToken(UserID string, userType int32) (string, time.Duration, error) {
if !(userType == TokenUser || userType == TokenAdmin) {
- return "", errs.ErrTokenUnknown.WrapMsg("token type unknown")
+ return "", 0, errs.ErrTokenUnknown.WrapMsg("token type unknown")
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, t.buildClaims(UserID, userType))
str, err := token.SignedString([]byte(t.Secret))
if err != nil {
- return "", errs.Wrap(err)
+ return "", 0, errs.Wrap(err)
}
- return str, nil
+ return str, t.Expires, nil
}
func (t *Token) GetToken(token string) (string, int32, error) {
From 1009a0fc65a6166d2c4c484acc6d2fd3546d155a Mon Sep 17 00:00:00 2001
From: Monet Lee
Date: Fri, 2 Aug 2024 19:35:30 +0800
Subject: [PATCH 26/26] update dockerfile contents. (#563)
---
Dockerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile b/Dockerfile
index 8090d9682..c0076d9cd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -43,7 +43,7 @@ COPY --from=builder $SERVER_DIR/start-config.yml $SERVER_DIR/
COPY --from=builder $SERVER_DIR/go.mod $SERVER_DIR/
COPY --from=builder $SERVER_DIR/go.sum $SERVER_DIR/
-RUN go get github.com/openimsdk/v0.0.14-alpha.5
+RUN go get github.com/openimsdk/gomake@v0.0.14-alpha.5
# Set the command to run when the container starts
ENTRYPOINT ["sh", "-c", "mage start && tail -f /dev/null"]